popraven novi npc
This commit is contained in:
@@ -164,18 +164,17 @@ class OceanSystem {
|
||||
this.oxygen += (this.oxygenRegenRate * delta) / 1000;
|
||||
if (this.oxygen > this.maxOxygen) this.oxygen = this.maxOxygen;
|
||||
}
|
||||
updateBoatVisuals() {
|
||||
if (this.isBoating && this.currentBoat && this.scene.player) {
|
||||
this.currentBoat.x = this.scene.player.sprite.x;
|
||||
this.currentBoat.y = this.scene.player.sprite.y + 10; // Slightly below
|
||||
this.currentBoat.setDepth(this.scene.player.sprite.depth - 1);
|
||||
}
|
||||
|
||||
// Flip based on movement?
|
||||
// Access input vector or previous pos?
|
||||
// Simplified:
|
||||
if (this.scene.input.keyboard.checkDown(this.scene.input.keyboard.addKey('A'), 100)) this.currentBoat.setFlipX(false);
|
||||
if (this.scene.input.keyboard.checkDown(this.scene.input.keyboard.addKey('D'), 100)) this.currentBoat.setFlipX(true);
|
||||
}
|
||||
updateBoatVisuals() {
|
||||
if (this.isBoating && this.currentBoat && this.scene.player) {
|
||||
this.currentBoat.x = this.scene.player.sprite.x;
|
||||
this.currentBoat.y = this.scene.player.sprite.y + 10; // Slightly below
|
||||
this.currentBoat.setDepth(this.scene.player.sprite.depth - 1);
|
||||
|
||||
// Flip based on movement
|
||||
if (this.scene.input.keyboard.checkDown(this.scene.input.keyboard.addKey('A'), 100)) this.currentBoat.setFlipX(false);
|
||||
if (this.scene.input.keyboard.checkDown(this.scene.input.keyboard.addKey('D'), 100)) this.currentBoat.setFlipX(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user