pygameミニゲームフレームワーク

1481 ワード

"""
pygame       
"""
import pygame, sys
#         
import random

"""
    :   
"""
def menu():
    # 1.      
    pygame.display.set_caption("XXX")
    # 2.   
    while True:
        # 3.        
        screen.fill((255, 255, 255))
        #      ,       
        # screen.blit(back, (0, 0))

        # 4.        
        action()
        # 5.          
        paint()
        # 7.      
        pygame.time.delay(10)
        # 6.        
        pygame.display.update()

"""
    :         
"""
#      :(800,600)    
screen = pygame.display.set_mode((800, 600), 0, 0)
#     
# back = pygame.image.load("1.jpg")


"""
    :        
"""
def action():
    # 4.1         
    for event in pygame.event.get():
        # 4.2         
        if event.type == pygame.QUIT:
            sys.exit()
    # 4.3         
    pass
    
"""
    :        
"""
def paint():
    # 4.1      
    pygame.font.init()
    # 4.2        (ps: wryh.ttf       ,       ,                )
    font = pygame.font.Font("wryh.ttf", 28)
    # 4.3       
    # fontRead = font.render(chr(word[i]),True,(0,0,0)) # int    ,     
    # 4.4          
    # screen.blit(fontRead,(xx[i],yy[i]))  #            

"""
    :     
"""
def init():
    pass

# main  
if __name__ == '__main__':
    init()
    menu()