Beispiel #1
0
        protected virtual void Update()
        {
            var deltaTime = Time.deltaTime;

            for (int i = 0; i < mPassiveMotions.Length; i++)
            {
                var p = mPassiveMotions[i];
                if (p.IsActive)
                {
                    p.ActorUpdate(deltaTime);
                    if (p.BlendType == EMotionBlend.override_movement)
                    {
                        //noneexecution = false;
                        if (CurrentAdditiveMotion != null)
                        {
                            CurrentAdditiveMotion.Interrupt();
                            CurrentAdditiveMotion = null;
                        }
                        if (CurrentBaseMotion != null)
                        {
                            CurrentBaseMotion.Interrupt();
                            CurrentBaseMotion = null;
                        }
                    }
                }
            }
            if (CurrentAdditiveMotion != null)
            {
                if (!isAlive)
                {
                    CurrentAdditiveMotion.Interrupt();
                    CurrentAdditiveMotion = null;
                }
                else if (CurrentAdditiveMotion.IsActive)
                {
                    CurrentAdditiveMotion.ActorUpdate(deltaTime);
                    //noneexecution = false;
                }
                else
                {
                    CurrentAdditiveMotion = null;
                }
            }
            if (CurrentBaseMotion != null)
            {
                if (!isAlive)
                {
                    CurrentBaseMotion.Interrupt();
                    CurrentBaseMotion = null;
                }
                else if (CurrentBaseMotion.IsActive)
                {
                    CurrentBaseMotion.ActorUpdate(deltaTime);
                    //noneexecution = false;
                }
                else
                {
                    CurrentBaseMotion = null;
                }
            }
        }