Commit b08fa0d3 by BellCodeEditor

save project

parent 2742489a
Showing with 10 additions and 1 deletions
......@@ -13,7 +13,7 @@ pygame.init() # 初始化
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
pygame.display.set_caption("悟空酷跑")
pygame.display.set_caption("坤坤酷跑")
# 载入图片
background = pygame.image.load('bg.png') # 背景
road = pygame.image.load('road.png') # 路
......@@ -31,6 +31,15 @@ index = 0
y = 400
jumpState = "runing"
t = 30
bg_x = 0
road_x = 0
obstacle = random.choice([bush,stone,cacti])
rect = obstacle.get_rect()
rect.x = 1000
rect.y = 500 - rect.height
aa=Block(bush,cacti,stone)
while True:
......
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