猫史档案馆


很屑的功德系统

用户:JMY_ESJMY_ES查看:0 回复:0 评论:0 创建时间:2023-03-12T15:01:25


import pygame
pygame.init()
screen = pygame.display.set_mode((1554, 916))
pygame.display.set_caption("赛博功德系统")
bg_music = pygame.mixer.Sound('images/南无观世音菩萨-许巍.128.mp3')
bg = pygame.image.load('images/1.png')
font_style = pygame.font.Font('images/腾讯体 W3.otf', 50)
paiwei = pygame.image.load('images/3.png')
jia = pygame.mixer.Sound('images/10.mp3')
jian = pygame.mixer.Sound('images/11.mp3')
haha = pygame.mixer.Sound('images/1.mp3')
bg_music.play()
gongde=0
def message(msg, color,x,y):
    mesg = font_style.render(msg, True, color)
    screen.blit(mesg,(x,y))
while True:
    for event in pygame.event.get():
        screen.blit(bg,(0,0))
        message('按f加功德,按j佛祖陪你笑',(255,255,25),0,0)
        message('功德'+str(gongde),(255,255,25),1000,0)
        if event.type == pygame.QUIT:
            pygame.quit()
            quit()
        if event.type == pygame.KEYDOWN and event.key == pygame.K_f:
            gongde=gongde+1
            jia.play()
        if event.type == pygame.KEYDOWN and event.key == pygame.K_j:
            gongde=gongde-10
            haha.play()
            jian.play()
        if gongde >=100:
            screen.blit(paiwei,(0,128))
    pygame.display.update()
    pygame.time.delay(15)


回复

上一页1 页 / 共 0下一页