Commit 2089c6e1 by BellCodeEditor

save project

parent 8b3c3110
Showing with 13 additions and 3 deletions
......@@ -17,7 +17,10 @@ index = 0
y=400
jumpstate = 'runing'
t=30
a = random
a = random.choice([stone,cacti,apple])
b = a.get_rect()
b.x = 1000
b.y = 500-b.height
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -49,6 +52,13 @@ while True:
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
screen.blit(wukong, (150, y))
if b.x<0-b.width:
a = random.choice([stone,cacti,apple])
b = a.get_rect()
b.x = 1000
b.y = 500-b.height
b.x-=8
screen.blit(a,(b.x,b.y))
# 刷新画面
pygame.display.update()
FPS.tick(20)
\ No newline at end of file
FPS.tick(100)
\ 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