Added respawn animation on game start

This commit is contained in:
Anuken
2018-05-31 11:48:07 -04:00
parent e534a6b7fc
commit 24e7d755eb
8 changed files with 11 additions and 25 deletions

View File

@@ -133,16 +133,10 @@ public class Player extends Unit implements BlockBuilder {
@Override
public void onRemoteDeath(){
dead = true;
respawning = true;
respawning = false;
Effects.effect(ExplosionFx.explosion, this);
Effects.shake(4f, 5f, this);
Effects.sound("die", this);
Timers.run(respawnduration + 5f, () -> {
heal();
set(world.getSpawnX(), world.getSpawnY());
interpolator.target.set(x, y);
});
}
@Override