Commit 4b9e83d4 by BellCodeEditor

save project

parent 080ee70a
Showing with 2 additions and 1 deletions
......@@ -3,6 +3,7 @@ from pygame import locals
import random
pygame.init() # 初始化
class Block
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
......@@ -61,7 +62,7 @@ while True:
screen.blit(background, (0, 0)) # 远处背景
screen.blit(road, (0, 500)) # 路
screen.blit(wukong, (150, y)) # 悟空
bg_x
if rect.x <= 0-rect.width: # 障碍物消失
# 创建障碍物对象
obstacle = random.choice([bush,stone,cacti])
......
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