feat: add laser shooting effects and ship tracking for words mode

- Add green lasers that hit target on correct typing
- Add red lasers that miss (left/right) on incorrect typing
- Implement laser beam visual with gradient and glow effects
- Add impact burst animation at laser end point
- Ship now tracks each character in words mode
- Creates dynamic targeting system for all game modes
This commit is contained in:
2025-11-04 17:57:24 +00:00
parent 7860c7e729
commit 8d093f2c85
4 changed files with 141 additions and 18 deletions
+11
View File
@@ -24,6 +24,17 @@ export type PlayerPosition = { x: number }; // pixel position 0-800
export type LetterState = 'normal' | 'wrong' | 'exploding';
export type ShipState = 'normal' | 'exploding';
export type Laser = {
id: string;
startX: number; // Ship position
startY: number; // Ship Y
endX: number; // Target position (offset left/right for misses)
endY: number; // Target Y
startTime: number;
duration: number; // How long the laser is visible
hit: boolean; // True for hits (not implemented yet), false for misses
};
export type FallingLetter = {
id: string;
letter: string;