public bool play(AnimationState m, float targ = 1.0f) { if (!now.isSame(m)) { pre.kill(); now.kill(); now = new MotionUnit2D(m, 0.0f, targ, false); } return(now.motionX.time >= now.motionX.length); }
public bool crossFade(AnimationState m, float time = 0.3f, float targ = 1.0f) { if (!now.isSame(m)) { pre.kill(); pre = now; pre.startFadeOut(time); now = new MotionUnit2D(m, time, targ, false); } return(now.motionX.time >= now.motionX.length); }