v0.9.2b: fixed summoning bones vfx persisting in various cases

This commit is contained in:
Evan Debenham 2021-03-21 23:30:52 -04:00
parent 96e9d2fe0b
commit e3e3757dbc
2 changed files with 7 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class Necromancer extends Mob {
protected boolean act() {
if (summoning && state != HUNTING){
summoning = false;
updateSpriteState();
if (sprite instanceof NecromancerSprite) ((NecromancerSprite) sprite).cancelSummoning();
}
return super.act();
}

View File

@ -94,6 +94,12 @@ public class NecromancerSprite extends MobSprite {
}
}
public void cancelSummoning(){
if (summoningBones != null){
summoningBones.on = false;
}
}
public void finishSummoning(){
if (summoningBones.visible) {
Sample.INSTANCE.play(Assets.Sounds.BONES);