Commit 5b137ef2 by BellCodeEditor

save project

parent 4eb1370b
Showing with 18 additions and 7 deletions
import pygame
cacti=pygame.image.load('cacti.png')
rect=cacti.get_rect()
print(rect)
print(rect.x)
\ No newline at end of file
j="runing"
t=30
y=400
while True:
if j=="up":
if t>0:
y-=t
t-=2
else:
j='down'
print(y)
if t<=30:
y+=t
t+=2
else:
j='runing'
\ No newline at end of file
......@@ -6,6 +6,7 @@ pygame.init() # 初始化
screen = pygame.display.set_mode((1000, 600))
FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 载入图片
pygame.display.
background = pygame.image.load('bg.png') # 背景
road = pygame.image.load('road.png') # 路
stone = pygame.image.load('stone.png') # 石头
......
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