From 3f1a665fb86fd4a1fda7d58eb5e1cc400415273b Mon Sep 17 00:00:00 2001 From: Skullheadx <94652084+Skullheadx@users.noreply.github.com> Date: Fri, 2 Jun 2023 18:43:19 -0400 Subject: [PATCH] larger font + inc vel + better text --- combo_counter.py | 4 ++-- game.py | 3 ++- setup.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/combo_counter.py b/combo_counter.py index 31e5d21..cb9eb1a 100644 --- a/combo_counter.py +++ b/combo_counter.py @@ -6,10 +6,10 @@ class ComboCounter: def __init__(self, position, combo): self.position = pygame.Vector2(position) - self.velocity = pygame.Vector2(0, -1) + self.velocity = pygame.Vector2(0, -100) self.time = self.LIFE_TIME self.combo = combo - self.text_surface = font.render(self.combo, True, BLACK) + self.text_surface = font_large.render(self.combo, True, BLACK) def update(self, delta): self.position += self.velocity * delta / 1000 diff --git a/game.py b/game.py index c408ec7..89d62e7 100644 --- a/game.py +++ b/game.py @@ -52,7 +52,8 @@ class Game: self.score += 1 if self.time_since_last_hit < self.COMBO_TIME: self.current_combo += 1 - self.combo_counters.append(ComboCounter(hit.position, str(self.current_combo))) + if self.current_combo > 1: + self.combo_counters.append(ComboCounter(hit.position, f"x{self.current_combo+1}")) self.time_since_last_hit = 0 diff --git a/setup.py b/setup.py index 801367d..2b4b012 100644 --- a/setup.py +++ b/setup.py @@ -44,3 +44,4 @@ def lerp(start, end, weight): font = pygame.font.SysFont("Arial", 50) +font_large = pygame.font.SysFont("Arial", 80) \ No newline at end of file -- 2.54.0