Commit e82a3760 by BellCodeEditor

save project

parent c126bf55
Showing with 6 additions and 6 deletions
...@@ -28,7 +28,7 @@ while True: ...@@ -28,7 +28,7 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if jumpState == "running" if jumpState == "runing":
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpState = "up" jumpState = "up"
...@@ -64,14 +64,14 @@ while True: ...@@ -64,14 +64,14 @@ while True:
if rect.x <= 0 - rect.width: if rect.x <= 0 - rect.width:
obstacle = random.choice([bush,stone,cacti]) obstacle = random.choice([bush,stone,cacti])
rect = obstacle.get rect() rect = obstacle.get_rect()
rect.x = 1000 rect.x = 1000
rect.y = 500 - rect.height rect.y = 500 - rect.height
rect.x -= 8 rect.x -= 8
screen.blit(obstacle,(rect.x,rect.y)) screen.blit(obstacle,(rect.x,rect.y))
pygame.display.update() pygame.display.update()
FPS.tick(30) FPS.tick(30)
......
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