Add whale hunting mini-game with crosshair mechanics

- Created HuntingScene with mouse and keyboard controls
- Crosshair can be controlled by mouse or WASD/Arrow keys
- TAB key toggles between control modes
- Whales spawn and swim across screen from both directions
- Harpoon shooting mechanic (click or SPACE)
- Collision detection and whale hit animations
- Whale oil rewards (+1 per successful hunt)
- HUD displays fuel, oil, and whales hunted
- Return to map button
- Updated MapScene to transition to HuntingScene

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2025-12-15 03:29:26 +01:00
parent 4190170f1f
commit ee45c9015c
3 changed files with 409 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ import Phaser from 'phaser';
import ShipDeckScene from './scenes/ShipDeckScene.js';
import MapScene from './scenes/MapScene.js';
import TransitionScene from './scenes/TransitionScene.js';
import HuntingScene from './scenes/HuntingScene.js';
const config = {
type: Phaser.AUTO,
@@ -9,7 +10,7 @@ const config = {
height: 600,
parent: 'game-container',
backgroundColor: '#2d5f8e',
scene: [ShipDeckScene, MapScene, TransitionScene],
scene: [ShipDeckScene, MapScene, TransitionScene, HuntingScene],
physics: {
default: 'arcade',
arcade: {