From f16e5530a2bb5a39264af656c506bf9e7710c3de Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Fri, 13 Jan 2023 20:46:07 +0800 Subject: [PATCH] save project --- my_game.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/my_game.py b/my_game.py index 0c98b22..cc1696f 100644 --- a/my_game.py +++ b/my_game.py @@ -23,8 +23,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 = 1500 + self.rect.y = 4000 # 创建一个窗口 screen = pygame.display.set_mode((1000, 600)) @@ -47,13 +47,13 @@ basic_font = pygame.font.Font('STKAITI.TTF', 18) # 字体 index = 0 y = 400 jumpState = "runing" -t = 35 +t = 1200 road_x = 0 bg_x = 0 time = 0 gamestate = True score = 0 -speed=8 +speed=99999 old_score = score block_list = pygame.sprite.Group() # 创建精灵组 @@ -85,13 +85,13 @@ while True: else: jumpState = "down" if jumpState == "down": # 降落状态 - if t <= 35: + if t <=1200 : y += t wukong.rect.y = y t += 2 else: jumpState = "runing" - t = 35 + t = 1200 # 将背景图画上去 bg_x -= 1 @@ -136,4 +136,4 @@ while True: # 刷新画面 pygame.display.update() - FPS.tick(60) \ No newline at end of file + FPS.tick(1000) \ No newline at end of file -- libgit2 0.25.0