Commit Graph

3 Commits

Author SHA1 Message Date
Brian Fertig 7da6459abe refactor(enemies): replace geometric bodies with sprite-based rendering
Replace simple circle graphics with sprite-based enemies using a shared spritesheet. This change introduces:
- A `frameOffset` config to select specific enemy types from the spritesheet.
- An animation system for walking cycles (2-frame loop) and a static death frame.
- A refined hitbox setup using `setCircle` centered within 48x48 frames.
- A visual death sequence: stop movement, show death frame, wait 2s, then fade out.
- HP bar positioning adjusted to account for the new sprite height.

Additionally:
- Added a new `Reticle` UI component that tracks the mouse cursor with rotating rings and hides the OS cursor.
- Updated `GameScene` to load the enemy spritesheet and manage the reticle lifecycle.
2026-03-07 15:55:49 -07:00
Brian Fertig ea0a95c4e5 Refactor Player entity to use sprite-based rendering with animations
- Replaced simple circle/rectangle graphics with a spritesheet-based player sprite.
- Added animation definitions for idle, walk, idle-gun, and walk-gun states.
- Implemented state tracking (`_isMoving`, `_isShooting`) to drive animation switching.
- Adjusted barrel position calculation to use `GUN_TIP_DIST` for bullet spawning.
- Updated invincibility tween and cleanup logic to target the new sprite object.
- Added sprite loading in GameScene preload phase.
2026-03-07 12:54:37 -07:00
Brian Fertig 8dc7762aba intial commit 2026-03-07 11:40:57 -07:00