Commit 75901ccf by BellCodeEditor

save project

parent a127a36a
Showing with 4 additions and 1 deletions
import pygame
import random
from pygame import locals
pygame.init() # 初始化
......@@ -23,6 +24,7 @@ jumpState="running"
y=400
t=36
new_stone=random.choice([stone,cacti,apple])
stone_x=1000
while True:
......@@ -59,10 +61,11 @@ while True:
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
screen.blit(hero[index], (150, y))
screen.blit(stone,(stone_x,400))
screen.blit(new_stone,(stone_x,400))
if stone_x<-200:
stone_x=1000
new_stone=random.choice([stone,cacti,apple])
stone_x-=20
# 刷新画面
......
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