Commit 5b603a7c by BellCodeEditor

save project

parent 602209a8
Showing with 7 additions and 7 deletions
......@@ -24,8 +24,8 @@ class Player(pygame.sprite.Sprite): # 悟空
self.image = image
# image的get_rect()方法,可以返回pygame.Rect(0,0,图像宽,图像高)的对象
self.rect = self.image.get_rect()
self.rect.x = 150
self.rect.y = 400
self.rect.x = 15
self.rect.y = 40
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
......@@ -48,7 +48,7 @@ basic_font = pygame.font.Font('STKAITI.TTF', 18) # 字体
index = 0
y = 400
jumpState = "runing"
t = 35
t = 100
road_x = 0
bg_x = 0
time = 0
......@@ -92,13 +92,13 @@ while True:
else:
jumpState = "down"
if jumpState == "down": # 降落状态
if t <= 35:
if t <= 100:
y += t
wukong.rect.y = y
t += 2
else:
jumpState = "runing"
t = 35
t = 100
# 将背景图画上去
bg_x -= 1
......
{"第1名": 2, "第2名": 0, "第3名": 0}
\ No newline at end of file
{"第1名": 9, "第2名": 2, "第3名": 0}
\ No newline at end of file
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