Pygame Kemik Yapı
Python
İlk Önce Kütüphane import pygame import sys Sınıfımız class game(object): __init__ Fonksiyonumuz def __init__(self): self.init() self.loop() init
İlk Önce Kütüphane
import pygame
import sys
Sınıfımız
class game(object):
__init__ Fonksiyonumuz
def __init__(self):
self.init()
self.loop()
init Fonksiyonumu
pygame.init()
self.window=pygame.display.set_mode((w,h)) #w Genişlik h Yükseklik
loop Fonksiyonumuz
while True:
self.window.fill(color) # (r,g,b)
for event in pygame.event.get():
if event.type==pygame.QUIT:
sys.exit()
pygame.display.update()
Sonrada
game()
Çıktı
Share Your Expertise, Earn Rewards!
Found this insightful? Imagine your knowledge generating income. Contribute your articles to bylge.com and connect with readers while unlocking your earning potential.