diff --git a/nova farma TRAE/.DS_Store b/nova farma TRAE/.DS_Store index e066118eb..641711cd0 100644 Binary files a/nova farma TRAE/.DS_Store and b/nova farma TRAE/.DS_Store differ diff --git a/nova farma TRAE/assets/.DS_Store b/nova farma TRAE/assets/.DS_Store index 1c75e8647..cf46afc6a 100644 Binary files a/nova farma TRAE/assets/.DS_Store and b/nova farma TRAE/assets/.DS_Store differ diff --git a/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store b/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store index 72d8172dd..46497b20e 100644 Binary files a/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store and b/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store differ diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Characters/gronk_walk_sheet.png b/nova farma TRAE/assets/DEMO_FAZA1/Characters/gronk_walk_sheet.png new file mode 100644 index 000000000..b49929b49 Binary files /dev/null and b/nova farma TRAE/assets/DEMO_FAZA1/Characters/gronk_walk_sheet.png differ diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Structures/rain_catcher.png b/nova farma TRAE/assets/DEMO_FAZA1/Structures/rain_catcher.png new file mode 100644 index 000000000..6d092840b Binary files /dev/null and b/nova farma TRAE/assets/DEMO_FAZA1/Structures/rain_catcher.png differ diff --git a/nova farma TRAE/src/scenes/GrassScene_Clean.js b/nova farma TRAE/src/scenes/GrassScene_Clean.js index 5f7b66cf4..8f2119b7b 100644 --- a/nova farma TRAE/src/scenes/GrassScene_Clean.js +++ b/nova farma TRAE/src/scenes/GrassScene_Clean.js @@ -60,6 +60,13 @@ export default class GrassSceneClean extends Phaser.Scene { this.load.image('campfire', 'DEMO_FAZA1/Environment/taborni_ogenj.png'); this.load.image('tent', 'DEMO_FAZA1/Environment/sotor.png'); this.load.image('sleeping_bag', 'DEMO_FAZA1/Items/spalna_vreca.png'); + + // 7. NEW: Gronk & Structures + this.load.spritesheet('gronk', 'DEMO_FAZA1/Characters/gronk_walk_sheet.png', { + frameWidth: 256, + frameHeight: 256 + }); + this.load.image('rain_catcher', 'DEMO_FAZA1/Structures/rain_catcher.png'); } create() { @@ -132,6 +139,14 @@ export default class GrassSceneClean extends Phaser.Scene { this.clearAmnesia(); }); + // --- NEW: RAIN CATCHER --- + this.rainCatcher = this.physics.add.image(startX + 150, startY + 50, 'rain_catcher'); + this.rainCatcher.setScale(0.8); + this.rainCatcher.setInteractive({ draggable: true }); + this.rainCatcher.setDepth(startY + 50); // Y-sort + this.rainCatcher.body.setImmovable(true); + // Collider added later with Kai + // General Drag Event this.input.on('drag', function (pointer, gameObject, dragX, dragY) { gameObject.x = dragX; @@ -407,6 +422,34 @@ export default class GrassSceneClean extends Phaser.Scene { // Collider Stream <-> Kai // this.physics.add.collider(this.kai, this.stream); + // --- NEW: GRONK (NPC) --- + this.gronk = this.physics.add.sprite(startX - 150, startY - 100, 'gronk'); + this.gronk.setScale(0.8); // Gronk is big! + this.gronk.setDepth(startY - 100); + this.gronk.setImmovable(true); + this.gronk.body.setSize(80, 60); + this.gronk.body.setOffset(88, 190); // Adjusted for 256x256 frame + + // Gronk Animations + this.anims.create({ + key: 'gronk-idle', + frames: this.anims.generateFrameNumbers('gronk', { start: 0, end: 3 }), // Using Down walk as idle for now + frameRate: 4, + repeat: -1 + }); + this.gronk.play('gronk-idle'); + + // Interaction (Say Hello) + this.gronk.setInteractive(); + this.gronk.on('pointerdown', () => { + console.log("Gronk: 'Ej stari, kje si hodil? Si pozabil, da imava vajo s bendom?'"); + // Future: Show Dialog Box + }); + + // Colliders + this.physics.add.collider(this.kai, this.rainCatcher); + this.physics.add.collider(this.kai, this.gronk); + // --- ANIMATIONS --- // 0-3: Down, 4-7: Left, 8-11: Right, 12-15: Up this.anims.create({