public void Update(float deltaT)
        {
            if (_time <= _transitionTime)
            {
                _transitionStarted  = true;
                _transitionComplete = false;

                float s = _time / _transitionTime;

                CurrentBlend.UpdateBlendings(s);
                _currentPlayback.Update(deltaT, CurrentBlend.Blend, CurrentBlend.Velocity);

                NextBlend.UpdateBlendings(s);
                _nextPlayback.Update(deltaT, NextBlend.Blend, NextBlend.Velocity);

                _time += deltaT;
            }
            else
            {
                _time = 0;
                _transitionStarted  = false;
                _transitionComplete = true;
            }
        }
Exemplo n.º 2
0
        public bool Blend(float deltaT)
        {
            if (_time <= _transitionTime)
            {
                float s = _time / _transitionTime;

                SourceBlend.UpdateBlendings(s);
                _sourceNode.UpdateAnimations(deltaT, SourceBlend.Blend, SourceBlend.Velocity);

                DestBlend.UpdateBlendings(s);
                _destNode.UpdateAnimations(deltaT, DestBlend.Blend, DestBlend.Velocity);

                _time += deltaT;

                OnBlended(deltaT);

                return(true);
            }
            else
            {
                _time = 0;
                return(false);
            }
        }