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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user