Commit cf1d7c99 by BellCodeEditor

auto save

parent 4f2d856a
Showing with 4 additions and 4 deletions
......@@ -23,7 +23,7 @@ class Player(pygame.sprite.Sprite): # 悟空
# image的get_rect()方法,可以返回pygame.Rect(0,0,图像宽,图像高)的对象
self.rect = self.image.get_rect()
self.rect.x = 150
self.rect.y = 500
self.rect.y = 400
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
......@@ -40,8 +40,8 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
basic_font = pygame.font.Font('STKAITI.TTF',32)
stone_audio = pygame.mixer.Sound("score.wav")
basic_font = pygame.font.Font('STKAITI.TTF',18)
score_audio = pygame.mixer.Sound("score.wav")
index = 0
y = 400
......@@ -79,7 +79,7 @@ while True:
if t > 0:
y -= t
wukong.rect.y = y
t -= 1
t -= 2
else:
jumpState = "down"
if jumpState == "down": # 降落状态
......
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