WIP: Water animation system - added frame initialization and update loop (debugging in progress)
This commit is contained in:
@@ -803,8 +803,10 @@ class GameScene extends Phaser.Scene {
|
||||
}
|
||||
|
||||
// Terrain system update (za water animacijo)
|
||||
if (this.terrainSystem) {
|
||||
if (this.terrainSystem && this.terrainSystem.update) {
|
||||
this.terrainSystem.update(Date.now(), delta);
|
||||
} else {
|
||||
console.warn('⚠️ TerrainSystem.update not available!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ class TerrainSystem {
|
||||
// Create Tile Data
|
||||
this.tiles[y][x] = {
|
||||
type: terrainType.name,
|
||||
texture: terrainType.name,
|
||||
texture: terrainType.name === 'water' ? 'water_frame_0' : terrainType.name, // Water tiles get animated frame!
|
||||
hasDecoration: false,
|
||||
hasCrop: false,
|
||||
solid: terrainType.solid || false
|
||||
|
||||
10
test_water_animation.js
Normal file
10
test_water_animation.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// Test: Check if water frames exist
|
||||
console.log('Testing water animation frames...');
|
||||
|
||||
// Check water_frame_0 through water_frame_3
|
||||
for (let i = 0; i < 4; i++) {
|
||||
const key = `water_frame_${i}`;
|
||||
console.log(`Frame ${i}: ${key}`);
|
||||
}
|
||||
|
||||
console.log('Water animation test complete!');
|
||||
Reference in New Issue
Block a user