Feature/advanced game mechanics #5

Merged
ilia merged 30 commits from feature/advanced-game-mechanics into main 2026-07-19 15:09:22 +00:00
3 changed files with 6 additions and 1 deletions
Showing only changes of commit 8d15f3996f - Show all commits
+1 -1
View File
@@ -25,4 +25,4 @@ export const PERK_HEIGHT = 16;
export const PERK_FALL_SPEED = 3; export const PERK_FALL_SPEED = 3;
export const PERK_DROP_CHANCE = 0.3; export const PERK_DROP_CHANCE = 0.3;
export const PERK_BALL_SPEED_DECREASE = 2; export const PERK_BALL_SPEED_DECREASE = 2;
export const PERK_TYPES = ['slow', 'wide']; export const PERK_TYPES = ['slow', 'wide', 'life'];
+3
View File
@@ -53,6 +53,9 @@ export function updatePerks(game, containerHeight, deltaTime) {
paddle.width = PADDLE_WIDE_WIDTH; paddle.width = PADDLE_WIDE_WIDTH;
paddle.moveTo(paddle.x, 0, CONTAINER_WIDTH); paddle.moveTo(paddle.x, 0, CONTAINER_WIDTH);
break; break;
case 'life':
game.livesAmount += 1;
break;
default: default:
break; break;
} }
+2
View File
@@ -53,6 +53,8 @@ function createPerkView(perk) {
return perkView.fill('#00ffff'); return perkView.fill('#00ffff');
case 'wide': case 'wide':
return perkView.fill('#0f0f0f'); return perkView.fill('#0f0f0f');
case 'life':
return perkView.fill('#f0f0f0');
default: default:
return perkView.fill('#ffffff'); return perkView.fill('#ffffff');
} }