Feature/Implement invincibility and combo systems (#16)
All checks were successful
Build and Publish Docker Image / Publish to Registry (push) Successful in 8s
Build and Publish Docker Image / Deploy to Portainer (push) Successful in 2s

- Added Invincibility component to manage invincibility state and duration.
- Introduced InvincibilitySystem to handle visual effects during invincibility.
- Updated Game class to integrate combo multiplier mechanics and high score tracking.
- Enhanced UI to display current combo status and high score.
- Configured GameConfig for centralized game settings, including obstacle damage and invincibility duration.
- Updated game logic to reset combo on damage and manage health regeneration.

This update enhances gameplay dynamics by introducing invincibility frames and a scoring combo system.

Reviewed-on: #16
Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com>
Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
This commit is contained in:
Juan Sebastián Montoya 2025-11-26 16:49:25 -05:00 committed by Juan Sebastián Montoya
parent e33f5a97a7
commit 112aa68a83
6 changed files with 313 additions and 7 deletions

View file

@ -24,6 +24,23 @@
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
z-index: 100;
}
#combo {
position: absolute;
top: 100px;
left: 50%;
transform: translateX(-50%);
color: #FFD700;
font-size: 32px;
font-weight: bold;
text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
z-index: 100;
display: none;
animation: comboPulse 0.5s ease-in-out;
}
@keyframes comboPulse {
0%, 100% { transform: translateX(-50%) scale(1); }
50% { transform: translateX(-50%) scale(1.2); }
}
#gameOver {
position: absolute;
top: 50%;
@ -119,9 +136,12 @@
<body>
<div id="ui">
<div>Score: <span id="score">0</span></div>
<div>High Score: <span id="highScore">0</span></div>
<div>Health: <span id="health">100</span></div>
</div>
<div id="combo">1x COMBO!</div>
<div id="version">v<span id="versionNumber">-</span></div>
<div id="perfMonitor">
@ -132,6 +152,7 @@
<div id="gameOver">
<h1>Game Over!</h1>
<p id="newHighScore" style="display: none; color: #FFD700; font-size: 28px; margin-bottom: 10px;">🏆 New High Score! 🏆</p>
<p>Final Score: <span id="finalScore">0</span></p>
<button id="restartBtn">Play Again</button>
</div>