Double the size of the whale

- Body ellipse: 80x40 → 160x80
- Tail size and position doubled
- Fin size and position doubled
- Health bar: 60x6 → 120x12 (offset -70)
- Collision radius: 40 → 80
- Updated bodyWidth/bodyHeight data
- Whales now much more visible and easier to target

🤖 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 12:23:00 +01:00
parent 5946172728
commit 604c26fcc1

View File

@@ -252,34 +252,34 @@ export default class HuntingScene extends Phaser.Scene {
// Create whale body
const whale = this.add.container(x, y);
// Whale shape
const body = this.add.ellipse(0, 0, 80, 40, 0x2a2a2a);
// Whale shape (doubled size)
const body = this.add.ellipse(0, 0, 160, 80, 0x2a2a2a);
const tail = this.add.triangle(
direction > 0 ? -45 : 45, 0,
0, -15,
0, 15,
direction > 0 ? -20 : 20, 0,
direction > 0 ? -90 : 90, 0,
0, -30,
0, 30,
direction > 0 ? -40 : 40, 0,
0x1a1a1a
);
const fin = this.add.triangle(
direction > 0 ? 20 : -20, -5,
direction > 0 ? 10 : -10, -25,
direction > 0 ? 30 : -30, -5,
direction > 0 ? 40 : -40, -10,
direction > 0 ? 20 : -20, -50,
direction > 0 ? 60 : -60, -10,
0x1a1a1a
);
// Health bar background
const healthBg = this.add.rectangle(0, -35, 60, 6, 0x000000);
// Health bar background (doubled size and offset)
const healthBg = this.add.rectangle(0, -70, 120, 12, 0x000000);
// Health bar (will be updated as whale takes damage)
const healthBar = this.add.rectangle(0, -35, 60, 6, 0x00ff00);
const healthBar = this.add.rectangle(0, -70, 120, 12, 0x00ff00);
whale.add([body, tail, fin, healthBg, healthBar]);
whale.setData('direction', direction);
whale.setData('alive', true);
whale.setData('health', 3); // Requires 3 hits
whale.setData('maxHealth', 3);
whale.setData('bodyWidth', 80);
whale.setData('bodyHeight', 40);
whale.setData('bodyWidth', 160);
whale.setData('bodyHeight', 80);
whale.setData('healthBar', healthBar);
whale.setData('bobTime', 0); // Timer for bobbing animation
@@ -462,8 +462,8 @@ export default class HuntingScene extends Phaser.Scene {
whaleScreenX, whaleScreenY
);
if (distance < 40) {
// Hit!
if (distance < 80) {
// Hit! (doubled radius for doubled whale size)
this.hitWhale(whale, harpoon);
break;
}
@@ -483,7 +483,7 @@ export default class HuntingScene extends Phaser.Scene {
const healthBar = whale.getData('healthBar');
const maxHealth = whale.getData('maxHealth');
const healthPercent = health / maxHealth;
healthBar.setDisplaySize(60 * healthPercent, 6);
healthBar.setDisplaySize(120 * healthPercent, 12); // Doubled size
// Change health bar color based on health
if (healthPercent > 0.6) {