diff --git a/src/config/game_config.py b/src/config/game_config.py index 0693aa7..a5f3647 100644 --- a/src/config/game_config.py +++ b/src/config/game_config.py @@ -3,8 +3,8 @@ import os class GameConfig: game_name = "Test Game" - window_x = 1920/2 - window_y = 1080/2 + window_x = 1920 + window_y = 1080 bg_color = (0, 0, 0) def data_path(): diff --git a/src/scenes/main_menu_scene.py b/src/scenes/main_menu_scene.py index 1102765..6b09185 100644 --- a/src/scenes/main_menu_scene.py +++ b/src/scenes/main_menu_scene.py @@ -29,7 +29,7 @@ class MainMenuScene(BaseScene): # 设置字体 font_file = os.path.join(data_path(),"Dymon-ShouXieTi.otf") - self.font = pygame.font.Font(font_file,16) + self.font = pygame.font.Font(font_file,32) self.text_rect_list = [] self.__init_text_list() @@ -225,26 +225,26 @@ class MainMenuScene(BaseScene): # 当状态在区间1时绘制雨滴线条 if rain["status"] <= self.rain_live_max - 3: # 设计高度 - rain_high = 10 * self.rain_live_max + rain_high = 10 * self.rain_live_max * 2 # 起点位置 # x坐标与最后落点x一致 x = rain["dest"][0] - # y坐标为落点位置向上移动设计高度后,加上生命周期去掉尾帧后落下的位置 - y = (rain["dest"][1] - rain_high) + (rain["status"] * (self.rain_live_max + 2)) - y2 = y + 10 + # y坐标为落点位置向上移动设计高度后,加上生命周期落下的位置 + y = (rain["dest"][1] - rain_high) + (rain["status"] * self.rain_live_max) * 2 + y2 = y + 20 line_start_point = (x, y) line_end_point = (x, y2) pygame.draw.line(self.screen, Color.white, line_start_point, line_end_point, 1) # 状态在区间2时绘制涟漪 - elif self.rain_live_max - 3 < rain["status"]: - point_width = rain["status"] - (self.rain_live_max - 3) + elif self.rain_live_max - 6 < rain["status"]: + point_width = (rain["status"] - (self.rain_live_max - 3)) * 2 pygame.draw.circle(self.screen, Color.white, rain["dest"], point_width, 1) # # 椭圆 # rain_point_rect = [rain["dest"][0], rain["dest"][1], rain["status"], rain["status"]] # pygame.draw.ellipse(self.screen, Color.white, rain_point_rect, 1) # 雨滴状态每d_status毫秒变化一次 - d_status = 30 + d_status = 1000/30 if rain["timer"] > d_status: rain["status"] += 1 rain["timer"] -= d_status # 不设为0,避免累计时间误差