Пример #1
0
        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);
        }
Пример #2
0
        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);
        }