猫史档案馆


【Python作品分享】主程序【求助帖】

用户:启航出品必属精品1219启航出品必属精品1219查看:0 回复:0 评论:0 创建时间:2024-03-09T11:44:29


【作品展示】

center_image

 

【作品介绍】

da

 

【作品源代码】

import pygame,sys,plane
from setting import *
from background import Background
im = pygame.image.load('./images/play.jpg')
a.blit(im, (0, 0))
ik = pygame.image.load('./images/play_buttom.png')
a.blit(ik, (330, 400))
pygame.display.flip()
clock = pygame.time.Clock()
while 1:
    for i in pygame.event.get():
        if i.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
        elif i.type == pygame.MOUSEBUTTONDOWN:
            x = i.pos[0]
            y = i.pos[1]
            if x > 390 and x < 560 and y > 503 and y < 560:
                wf = plane.wf()
                Background(0, 0)
                h = 0
                while 1:
                    clock.tick(FPS)
                    allGroup.update()
                    allGroup.draw(a)
                    h += 1
                    if h >= 10:
                        df = plane .df()
                        allGroup.add(df)
                        h = 0
                    pygame.display.flip()
                    for i in pygame.event.get():
                        if i.type == pygame.QUIT:
                            pygame.quit()
                            sys.exit()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页