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() {
|
public void die() {
|
||||||
sleeping = false;
|
sleeping = false;
|
||||||
remove( State.PARALYSED );
|
processStateRemoval( State.PARALYSED );
|
||||||
play( die );
|
play( die );
|
||||||
|
|
||||||
hideEmo();
|
hideEmo();
|
||||||
@@ -373,8 +373,8 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||||||
add(State.AURA);
|
add(State.AURA);
|
||||||
auraColor = color;
|
auraColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void processStateAddition( State state ) {
|
protected synchronized void processStateAddition( State state ) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case BURNING:
|
case BURNING:
|
||||||
if (burning != null) burning.on = false;
|
if (burning != null) burning.on = false;
|
||||||
@@ -468,7 +468,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||||||
remove(State.AURA);
|
remove(State.AURA);
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void processStateRemoval( State state ) {
|
protected synchronized void processStateRemoval( State state ) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case BURNING:
|
case BURNING:
|
||||||
if (burning != null) {
|
if (burning != null) {
|
||||||
@@ -717,7 +717,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||||||
hideEmo();
|
hideEmo();
|
||||||
|
|
||||||
for( State s : State.values()){
|
for( State s : State.values()){
|
||||||
remove(s);
|
processStateRemoval(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (health != null){
|
if (health != null){
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class GhoulSprite extends MobSprite {
|
|||||||
|
|
||||||
public void crumple(){
|
public void crumple(){
|
||||||
hideEmo();
|
hideEmo();
|
||||||
remove(State.PARALYSED);
|
processStateRemoval(State.PARALYSED);
|
||||||
play(crumple);
|
play(crumple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class NewbornElementalSprite extends MobSprite{
|
|||||||
@Override
|
@Override
|
||||||
public void die() {
|
public void die() {
|
||||||
super.die();
|
super.die();
|
||||||
remove( CharSprite.State.BURNING );
|
processStateRemoval( CharSprite.State.BURNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ public class WandmakerSprite extends MobSprite {
|
|||||||
@Override
|
@Override
|
||||||
public void die() {
|
public void die() {
|
||||||
super.die();
|
super.die();
|
||||||
|
|
||||||
remove(State.SHIELDED);
|
processStateRemoval(State.SHIELDED);
|
||||||
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
|
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
|||||||
Reference in New Issue
Block a user