bylge-logo

    Bylge

    Pygame Kemik Yapı

    İ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

    Picture of the Python

    Python

    @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 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ı



    Pygame_Kemik_Yapı


    Published Date:

    March 09, 2021

    Updated Date:

    December 02, 2023