🐕💙 Animal System & Emotional Memory Implementation
FEATURES: - Created animals/ folder structure (wild, domestic, infected) - Implemented proximity-based memory trigger system - Pulsating heart UI when Kai remembers family dog - Emotional storytelling without dialogue NEW FILES: - src/entities/Animal.js - Animal class with proximity detection - src/ui/MemoryHeartUI.js - Pulsating heart with Slovenian text - docs/systems/ANIMAL_MEMORY_SYSTEM.md - Full documentation - scripts/organize_all_tools.py - Tool organization script TOOLS ORGANIZATION: - Moved 84 additional tools to items/tools/ - Final count: 427 tools organized by material tier • wood: 36 tools • stone: 60 tools • iron: 36 tools • gold: 36 tools • special: 259 tools GAMESCENE INTEGRATION: - Added Animal and MemoryHeartUI imports - Preload heart icon and heartbeat audio - Update animals each frame for proximity detection - Example domestic dog spawns at (600, 600) EMOTIONAL IMPACT: When Kai approaches a domestic dog, a pulsating heart appears with text 'Spominjaš se...' (You remember...) - creating a powerful moment of nostalgia for his lost family pet.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
// 🎮 GAME SCENE - MEADOW AWAKENING VERSION (Hytale Style)
|
||||
// "3x Blink to Wake Up + Virus Fog + Hytale UI"
|
||||
// Updated: January 19, 2026
|
||||
// "3x Blink to Wake Up + Virus Fog + Hytale UI + Emotional Memories"
|
||||
// Updated: January 20, 2026
|
||||
|
||||
import Animal from '../entities/Animal.js';
|
||||
import MemoryHeartUI from '../ui/MemoryHeartUI.js';
|
||||
|
||||
class GameScene extends Phaser.Scene {
|
||||
constructor() {
|
||||
@@ -16,6 +19,18 @@ class GameScene extends Phaser.Scene {
|
||||
this.blinkCount = 0;
|
||||
this.isFullyAwake = false;
|
||||
this.virusFog = null;
|
||||
|
||||
// Animal System
|
||||
this.animals = [];
|
||||
this.memoryHeartUI = null;
|
||||
}
|
||||
|
||||
preload() {
|
||||
// Load heart icon for memory UI
|
||||
this.load.image('heart_icon', 'assets/slike/items/ui/MOJE_SLIKE_KONCNA_ostalo_vmesnik_ikone_heart_icon_style32.png');
|
||||
|
||||
// Optional: Load heartbeat sound
|
||||
this.load.audio('heartbeat', 'assets/audio/_NEW/369017__patobottos__heartbeats-61.wav');
|
||||
}
|
||||
|
||||
create(data) {
|
||||
@@ -63,6 +78,24 @@ class GameScene extends Phaser.Scene {
|
||||
|
||||
// 7. DECORATIONS (Trees, Grass)
|
||||
this.addStarterCampDecoration(centerX, centerY);
|
||||
|
||||
// 8. ANIMAL SYSTEM & MEMORY UI
|
||||
this.initializeAnimalSystem();
|
||||
}
|
||||
|
||||
initializeAnimalSystem() {
|
||||
console.log('🐕 Initializing animal system...');
|
||||
|
||||
// Create memory heart UI
|
||||
this.memoryHeartUI = new MemoryHeartUI(this);
|
||||
|
||||
// Example: Add a domestic dog near player
|
||||
// (Replace with actual dog sprite when available)
|
||||
const dog = new Animal(this, 600, 600, 'kai_idle', 'domestic');
|
||||
dog.animalName = 'Rex (family dog)';
|
||||
this.animals.push(dog);
|
||||
|
||||
console.log(`✅ Added ${this.animals.length} animals to scene`);
|
||||
}
|
||||
|
||||
update(time, delta) {
|
||||
@@ -77,6 +110,11 @@ class GameScene extends Phaser.Scene {
|
||||
|
||||
// NORMAL MOVEMENT LOGIC
|
||||
this.handlePlayerMovement();
|
||||
|
||||
// UPDATE ANIMALS (proximity detection)
|
||||
if (this.player && this.animals) {
|
||||
this.animals.forEach(animal => animal.update(this.player));
|
||||
}
|
||||
}
|
||||
|
||||
startAmnesiaMode(music) {
|
||||
|
||||
Reference in New Issue
Block a user