diff --git a/assets.py b/assets.py index 4bb381b..73f4e99 100644 --- a/assets.py +++ b/assets.py @@ -7,7 +7,7 @@ def __init__(self): self.player_frames = {} self.load_player_frames() - self.unicorn_bullet = self.load_unicorn_bullet() # ✅ Preload unicorn bullet + self.unicorn_bullet = self.load_unicorn_bullet() # Preload unicorn bullet def load_player_frames(self): sprite_path = os.path.join("assets", "sprites", "characters", "Player.png") @@ -31,7 +31,7 @@ def load_unicorn_bullet(self): try: image = pygame.image.load(path).convert_alpha() scaled = pygame.transform.scale(image, (32, 32)) - print("[DEBUG] Unicorn bullet loaded:", scaled.get_size()) + #print("[DEBUG] Unicorn bullet loaded:", scaled.get_size()) return scaled except Exception as e: print(f"[ERROR] Could not load unicorn bullet: {e}") diff --git a/bullet.py b/bullet.py index 03dfe1c..4630858 100644 --- a/bullet.py +++ b/bullet.py @@ -20,19 +20,20 @@ def __init__(self, x, y, target_x, target_y, color=(0, 0, 0), shooter=None, imag self.rect = pygame.Rect(0, 0, BULLET_SIZE, BULLET_SIZE) self.rect.center = (x, y) - # ✅ Apply rotation if image provided + # Apply rotation if image provided if self.original_image: try: rotated = pygame.transform.rotate(self.original_image, -self.angle_deg + 180) self.image = rotated self.image_rect = self.image.get_rect(center=self.rect.center) - print("[Bullet] Rotated image created successfully") + #print("[Bullet] Rotated image created successfully") except Exception as e: print("[Bullet ERROR] Rotation failed:", e) self.image = None self.image_rect = None else: - print("[Bullet] No image provided, using color:", self.color) + pass + #print("[Bullet] No image provided, using color:", self.color) def update(self): self.rect.x += self.dx diff --git a/config.py b/config.py index 3c8a158..c28dece 100644 --- a/config.py +++ b/config.py @@ -7,7 +7,7 @@ NPC_SPEED = 2 SCREEN_WIDTH = 1024 -SCREEN_HEIGHT = 1024 +SCREEN_HEIGHT = 800 GAME_FPS = 50 diff --git a/enemy_unicorns.py b/enemy_unicorns.py index 306bce8..24a3b6e 100644 --- a/enemy_unicorns.py +++ b/enemy_unicorns.py @@ -43,7 +43,7 @@ def __init__(self, x, y): # Load bullet image self.assets = Assets() self.bullet_image = self.assets.unicorn_bullet - print("[DEBUG] Bullet image set:", type(self.bullet_image)) + #print("[DEBUG] Bullet image set:", type(self.bullet_image)) self.animate() diff --git a/ui.py b/ui.py index 3a23771..407c7b2 100644 --- a/ui.py +++ b/ui.py @@ -10,28 +10,28 @@ def show_menu(screen): """Main game menu""" font = pygame.font.Font(None, 36) - menu_options = ["1: Single player", - "2: Cooperative", + menu_options = ["1: Single player game", + "2: Cooperative game", "ESC: Ukončení"] - while True: - screen.fill((43, 28, 88)) - for i, option in enumerate(menu_options): - text = font.render(option, True, (255, 255, 255)) - screen.blit(text, (50, 200 + i * 40)) + screen.fill((43, 28, 88)) + for i, option in enumerate(menu_options): + text = font.render(option, True, (255, 255, 255)) + screen.blit(text, (270, 320 + i * 40)) + + pygame.display.flip() - pygame.display.flip() + while True: for event in pygame.event.get(): if event.type == pygame.QUIT: return "quit" - if event.type == pygame.KEYDOWN: - print("Key pressed:", event.key) + if event.type == pygame.KEYDOWN: - if event.key == 49: #pygame.K_1: + if event.key == 49: return GameType.SINGLE - if event.key == 50: #pygame.K_2: + if event.key == 50: return GameType.COOP if event.key == pygame.K_ESCAPE: