v3.0.0: fixed char particle effects persisting in some cases
This commit is contained in:
@@ -362,6 +362,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
synchronized (State.class) {
|
||||
switch (state) {
|
||||
case BURNING:
|
||||
if (burning != null) burning.on = false;
|
||||
burning = emitter();
|
||||
burning.pour(FlameParticle.FACTORY, 0.06f);
|
||||
if (visible) {
|
||||
@@ -369,13 +370,12 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
}
|
||||
break;
|
||||
case LEVITATING:
|
||||
if (levitation != null) levitation.on = false;
|
||||
levitation = emitter();
|
||||
levitation.pour(Speck.factory(Speck.JET), 0.02f);
|
||||
break;
|
||||
case INVISIBLE:
|
||||
if (invisible != null) {
|
||||
invisible.killAndErase();
|
||||
}
|
||||
if (invisible != null) invisible.killAndErase();
|
||||
invisible = new AlphaTweener(this, 0.4f, 0.4f);
|
||||
if (parent != null) {
|
||||
parent.add(invisible);
|
||||
@@ -390,9 +390,11 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
iceBlock = IceBlock.freeze(this);
|
||||
break;
|
||||
case ILLUMINATED:
|
||||
if (light != null) light.putOut();
|
||||
GameScene.effect(light = new TorchHalo(this));
|
||||
break;
|
||||
case CHILLED:
|
||||
if (chilled != null) chilled.on = false;
|
||||
chilled = emitter();
|
||||
chilled.pour(SnowParticle.FACTORY, 0.1f);
|
||||
break;
|
||||
@@ -401,10 +403,12 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
darkBlock = DarkBlock.darken(this);
|
||||
break;
|
||||
case MARKED:
|
||||
if (marked != null) marked.on = false;
|
||||
marked = emitter();
|
||||
marked.pour(ShadowParticle.UP, 0.1f);
|
||||
break;
|
||||
case HEALING:
|
||||
if (healing != null) healing.on = false;
|
||||
healing = emitter();
|
||||
healing.pour(Speck.factory(Speck.HEALING), 0.5f);
|
||||
break;
|
||||
@@ -413,6 +417,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
GameScene.effect(shield = new ShieldHalo(this));
|
||||
break;
|
||||
case HEARTS:
|
||||
if (hearts != null) hearts.on = false;
|
||||
hearts = emitter();
|
||||
hearts.pour(Speck.factory(Speck.HEART), 0.5f);
|
||||
break;
|
||||
@@ -458,6 +463,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
||||
case ILLUMINATED:
|
||||
if (light != null) {
|
||||
light.putOut();
|
||||
light = null;
|
||||
}
|
||||
break;
|
||||
case CHILLED:
|
||||
|
||||
Reference in New Issue
Block a user