v3.0.0: adjusted new sprite state code. latest add/remove is prioritized
This commit is contained in:
@@ -362,6 +362,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||||||
|
|
||||||
public void add( State state ) {
|
public void add( State state ) {
|
||||||
synchronized (State.class) {
|
synchronized (State.class) {
|
||||||
|
stateRemovals.remove(state);
|
||||||
stateAdditions.add(state);
|
stateAdditions.add(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -460,6 +461,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||||||
|
|
||||||
public void remove( State state ) {
|
public void remove( State state ) {
|
||||||
synchronized (State.class) {
|
synchronized (State.class) {
|
||||||
|
stateAdditions.remove(state);
|
||||||
stateRemovals.add(state);
|
stateRemovals.add(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user