mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Update TileMapScene.java
This commit is contained in:
@@ -8,8 +8,11 @@ import forge.adventure.pointofintrest.PointOfInterest;
|
||||
import forge.adventure.stage.MapStage;
|
||||
import forge.adventure.stage.PointOfInterestMapRenderer;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.util.TemplateTmxMapLoader;
|
||||
import forge.adventure.world.WorldSave;
|
||||
import forge.sound.SoundEffectType;
|
||||
import forge.sound.SoundSystem;
|
||||
|
||||
/**
|
||||
* Scene that will render tiled maps.
|
||||
@@ -19,6 +22,7 @@ public class TileMapScene extends HudScene {
|
||||
TiledMap map;
|
||||
PointOfInterestMapRenderer tiledMapRenderer;
|
||||
private String nextMap;
|
||||
private boolean autoheal = false;
|
||||
private float cameraWidth = 0f, cameraHeight = 0f;
|
||||
|
||||
public TileMapScene() {
|
||||
@@ -46,6 +50,10 @@ public class TileMapScene extends HudScene {
|
||||
}
|
||||
stage.act(Gdx.graphics.getDeltaTime());
|
||||
hud.act(Gdx.graphics.getDeltaTime());
|
||||
if (autoheal) { //todo add simple bg animation or effect also add check if auto heal is needed if player has full life so sound don't keep playing
|
||||
SoundSystem.instance.play(SoundEffectType.Enchantment, false);
|
||||
autoheal = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,6 +88,11 @@ public class TileMapScene extends HudScene {
|
||||
@Override
|
||||
public void enter() {
|
||||
super.enter();
|
||||
if (inTown()) {
|
||||
// auto heal
|
||||
Current.player().fullHeal();
|
||||
autoheal = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void load(PointOfInterest point) {
|
||||
|
||||
Reference in New Issue
Block a user