Menda Pygame hujjatlari bor, nega men ushbu qo'llanmani ishlatishim kerak?


Download 280.46 Kb.
Pdf ko'rish
bet3/77
Sana02.01.2022
Hajmi280.46 Kb.
#193820
1   2   3   4   5   6   7   8   9   ...   77
Bog'liq
pygame docs-Uzbek

Siz kimsiz?

Mening ismim Gabriel Alejandro Zorrilla va bundan buyon uni qayta nomlash

shart emas. Buenos-Ayres, Argentinadan kelgan I´ma 21 yoshda. Hozirda UTN da

sanoat muhandisligi bo'yicha o'qiyapman. Mening sevimli mashg'ulotlarim juda

ko'p va ulardan biri dasturlashdir.

Bo'ldi shu!. Ushbu qo'llanmadan zavqlaning!.




???

2018-04-02 121 2

 

Pygame 1


 

Asosiy indeks

pygame ................................................. .................................................. ......................................

pygame.cdrom ............................................... .................................................. .............................

pygame.constants ............................................... .................................................. ........................

pygame.display ............................................... .................................................. .........................

pygame.draw ............................................... .................................................. .............................

pygame.event ............................................... .................................................. ............................

pygame.font ............................................... .................................................. ...............................

pygame.image ............................................... .................................................. ...........................

pygame.joystick ............................................... .................................................. ........................

pygame.key ............................................... .................................................. ...............................

pygame.mixer ............................................... .................................................. ............................

pygame.mixer.music ............................................. .................................................. ...................

pygame.mouse ............................................... .................................................. ...........................

pygame.movie ............................................... .................................................. ...........................

pygame.sndarray ............................................... .................................................. .......................

pygame.surfarray ............................................... .................................................. .......................

pygame.time ............................................... .................................................. ..............................

pygame.transform ............................................... .................................................. .....................

CD ................................................. .................................................. ...........................................

Kanal ................................................. .................................................. ...................................

Soat ................................................. .................................................. .......................................

Shrift ................................................. .................................................. .........................................

Joystik ................................................. .................................................. ....................................

Film ................................................. .................................................. ......................................

Rekt ................................................. .................................................. .........................................

Ovoz ................................................. .................................................. ......................................

Ovoz ................................................. .................................................. ......................................

Yuzaki ................................................. .................................................. ....................................

pygame.cursors ............................................... .................................................. .........................

pygame.sprite ............................................... .................................................. ............................

???


3


Pygame 1.5.5 qo'llanmasi

pygame

Boshqa pygame modullari tomonidan ishlatiladigan asosiy tartiblarni o'z ichiga

oladi. U muntazam ravishda to'g'ridan-to'g'ri pygame nom maydoniga

birlashtiriladi. Bunga asosan avtomatik boshlash 

init ()

 va 


chiqish ()

 tartib-


qoidalari kiradi.

© localals © nomli kichik modul mavjud bo'lib, u ham ushbu nom maydoniga

qo'shilib ketadi. Bu pygame uchun zarur bo'lgan barcha doimiylarni o'z ichiga

oladi. Ob'ekt konstruktorlari ushbu nom maydoniga joylashadilar, siz 

Rect ()

 va


Surface ()

 kabi funktsiyalarni chaqirib , ushbu turdagi ob'ektlarni yaratishingiz

mumkin. Qulaylik sifatida siz pygame.locals a'zolarini to'g'ridan-to'g'ri modulingiz

nomlari maydoniga © bilan pygame.locals import * © dan import qilishingiz

mumkin .Pigame o'yinlarining aksariyati buni o'zingiz ko'rib chiqmoqchi

bo'lsangiz bajaradi.

Rekt

- yangi to'rtburchak yarating



Yuzaki

- yangi Sirt yaratish

get_error

- joriy xato xabari

init

- barcha import qilingan pygame modullarini avtomatik ravishda ishga tush



chiqish

- barcha pygame modullarini ishga tushirish

registrdan chiqish- pygame tugaganda qo'ng'iroq qilish uchun odatiy

Rekt

pygame.Rect (rectstyle) -> Rect

Yangi to'rtburchak ob'ektini yaratadi. Berilgan rektstyle to'rtburchaklar

ma'lumotlarini ifodalashning turli usullaridan birini aks ettiradi. Bu odatda

topleft burchagi uchun x va y holatlarining ketma-ketligi, kengligi va balandligi.

Rect metodlaridan ba'zilari uchun ikkita versiya mavjud. Masalan, 

move ()

va 


move_ip () mavjud

 . Nomidagi © ip © qo'shimchasini ushlab turish

usullari ushbu funktsiyalarning © joyidagi © versiyasidir . Ular yangi Rect

ob'ektini qaytarish o'rniga haqiqiy manba ob'ektiga ta'sir ko'rsatadi.



Yuzaki

pygame.Surface (hajmi, [bayroqlar, [Yuzaki | chuqurlik, [maskalari]]]]) -> Yuzaki

Yangi sirt ob'ektini yaratadi. Hajmi - bu kenglik va balandlikni o'z ichiga olgan

2-int-ketma-ketlik . Chuqurlik - bu piksel uchun ishlatiladigan bitlar soni.

O'tkazib yuborilgan bo'lsa, chuqurlik joriy ekran chuqurligidan foydalanadi.

Maskalar - r, g, b va a uchun bitmaskni o'z ichiga olgan to'rtta element ketma-

ketligi. Agar olib tashlansa, niqoblar belgilangan chuqurlik uchun odatiy

qiymatlarga mos keladi. Bayroqlar quyidagi bayroqlarning aralashmasi:

SWSURFACE, HWSURFACE, ASYNCBLIT yoki SRCALPHA. (bayroqlar = 0

SWSURFACE bilan bir xil). Chuqurlik va niqoblar boshqa sirt ob'ekti bilan

almashtirilishi mumkin, ular yangi sirtni berilgan formatda bo'lgan formatda

yaratadi. Standart niqoblardan foydalanganda alfa har doim e'tiborga

olinmaydi, agar siz SRCALPHA-ni bayroq sifatida o'tkazmasangiz. Oddiy dasturiy

ta'minot yuzasi uchun 0 bayroq uchun ishlatilishi mumkin. Oddiy apparat

yuzasi bayroq uchun faqat 1 dan foydalanishi mumkin.


Download 280.46 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   77




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling