]> Skullheadx's Git Forge - fruit-ninja.git/commitdiff
larger font + inc vel + better text
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Fri, 2 Jun 2023 22:43:19 +0000 (18:43 -0400)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Fri, 2 Jun 2023 22:43:19 +0000 (18:43 -0400)
combo_counter.py
game.py
setup.py

index 31e5d21e576d35fd741de258e2aced199708bd31..cb9eb1aeccc1b2e8762aad19f269f9fe61670dfa 100644 (file)
@@ -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 c408ec7cbb22f0ea1f4b927b44dc954943a47db7..89d62e7306188989c1822c0b46a435f655826771 100644 (file)
--- 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
 
index 801367d1b45e46f4bd535dc05a5966733225d194..2b4b01238106dffd58b441851a6caeea09b248d3 100644 (file)
--- 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