Commit 877cc5aa by BellCodeEditor

auto save

parent 68e3c245
Showing with 12 additions and 3 deletions
......@@ -9,7 +9,8 @@ class Block(pygame.sprite.Sprite):
self.rect=self.image.get_rect()
self.rect.x=1000
self.rect.y=500-self.rect.height
pygame.init() # 初始化
pygame.init()
Block=pygame.sprite.Group() # 初始化
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
......@@ -56,7 +57,7 @@ while True:
else:
jumpState = "runing"
t =30
time=0
# 悟空造型
wukong = hero[index]
if jumpState == "runing": # 跑步状态下
......@@ -81,6 +82,13 @@ while True:
screen.blit(aa.image, (aa.rect.x, aa.rect.y))
# 刷新画面
time+=1
if time >60:
t=0
Block.random.randint(0,50)
else:
time>20
aa.add(pygame.sprite.Sprite)
aa.Sprite.kill(pygame.sprite.Sprite) # 刷新画面
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment