Commit 7c0dc73f by BellCodeEditor

save project

parent cb9a91e0
Showing with 6 additions and 2 deletions
import pygame import pygame
from pygame import locals from pygame import locals
import random
pygame.init() # 初始化 pygame.init() # 初始化
# 创建一个窗口 # 创建一个窗口
...@@ -22,7 +22,11 @@ index = 0 ...@@ -22,7 +22,11 @@ index = 0
jumpState = "runing" jumpState = "runing"
y = 400 y = 400
t = 30 t = 30
obstacle = random.choice([bush,stone,cacti])
rect = obstacle.get_rect()
rect.x = 1000
rect.y = 500 - rect.height
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
......
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