v3.0.0: fixed char sprite states not being removed in some cases
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -55,7 +55,7 @@ public class GhoulSprite extends MobSprite {
|
||||
|
||||
public void crumple(){
|
||||
hideEmo();
|
||||
remove(State.PARALYSED);
|
||||
processStateRemoval(State.PARALYSED);
|
||||
play(crumple);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class NewbornElementalSprite extends MobSprite{
|
||||
@Override
|
||||
public void die() {
|
||||
super.die();
|
||||
remove( CharSprite.State.BURNING );
|
||||
processStateRemoval( CharSprite.State.BURNING );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user