v3.0.0: fixed char sprite states not being removed in some cases

This commit is contained in:
Evan Debenham
2025-01-09 11:51:49 -05:00
parent fdb77ca910
commit db70d8fa98
4 changed files with 9 additions and 9 deletions

View File

@@ -307,7 +307,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
public void die() {
sleeping = false;
remove( State.PARALYSED );
processStateRemoval( State.PARALYSED );
play( die );
hideEmo();
@@ -373,8 +373,8 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
add(State.AURA);
auraColor = color;
}
private synchronized void processStateAddition( State state ) {
protected synchronized void processStateAddition( State state ) {
switch (state) {
case BURNING:
if (burning != null) burning.on = false;
@@ -468,7 +468,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
remove(State.AURA);
}
private synchronized void processStateRemoval( State state ) {
protected synchronized void processStateRemoval( State state ) {
switch (state) {
case BURNING:
if (burning != null) {
@@ -717,7 +717,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
hideEmo();
for( State s : State.values()){
remove(s);
processStateRemoval(s);
}
if (health != null){

View File

@@ -55,7 +55,7 @@ public class GhoulSprite extends MobSprite {
public void crumple(){
hideEmo();
remove(State.PARALYSED);
processStateRemoval(State.PARALYSED);
play(crumple);
}

View File

@@ -62,7 +62,7 @@ public class NewbornElementalSprite extends MobSprite{
@Override
public void die() {
super.die();
remove( CharSprite.State.BURNING );
processStateRemoval( CharSprite.State.BURNING );
}
@Override

View File

@@ -60,8 +60,8 @@ public class WandmakerSprite extends MobSprite {
@Override
public void die() {
super.die();
remove(State.SHIELDED);
processStateRemoval(State.SHIELDED);
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
if (visible) {