Commit e84179fe by BellCodeEditor

save project

parent 0729724e
Showing with 2 additions and 3 deletions
import pygame import pygame
import random import random
from pygame import locals from pygame import locals
pygame.sprite.Sprite
pygame.init() # 初始化 pygame.init() # 初始化
# 创建一个窗口 # 创建一个窗口
...@@ -18,9 +19,7 @@ y = 400 ...@@ -18,9 +19,7 @@ y = 400
jumpstate = "running" jumpstate = "running"
t = 30 t = 30
obstacle = random.choice([stone,cacti,apple]) obstacle = random.choice([stone,cacti,apple])
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():
......
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