/// <summary>Progresses the AnimationState according to the given deltaTime, and applies it to the Skeleton. Use Time.deltaTime to update manually. Use deltaTime 0 to update without progressing the time.</summary>
        public void Update(float deltaTime)
        {
            if (!valid || state == null)
            {
                return;
            }

            deltaTime *= timeScale;
            skeleton.Update(deltaTime);
            state.Update(deltaTime);
            state.Apply(skeleton);

            if (_UpdateLocal != null)
            {
                _UpdateLocal(this);
            }

            skeleton.UpdateWorldTransform();

            if (_UpdateWorld != null)
            {
                _UpdateWorld(this);
                skeleton.UpdateWorldTransform();
            }

            if (_UpdateComplete != null)
            {
                _UpdateComplete(this);
            }
            wasUpdatedAfterInit = true;
        }
Exemple #2
0
        public virtual void Update(float deltaTime)
        {
            if (!valid)
            {
                return;
            }

            deltaTime *= timeScale;
            skeleton.Update(deltaTime);
            state.Update(deltaTime);
            state.Apply(skeleton);

            if (_UpdateLocal != null)
            {
                _UpdateLocal(this);
            }

            skeleton.UpdateWorldTransform();

            if (_UpdateWorld != null)
            {
                _UpdateWorld(this);
                skeleton.UpdateWorldTransform();
            }

            if (_UpdateComplete != null)
            {
                _UpdateComplete(this);
            }
        }
Exemple #3
0
        public void Update(float deltaTime)
        {
            if (!valid)
            {
                return;
            }

            deltaTime *= timeScale;
            skeleton.Update(deltaTime);
            state.Update(deltaTime);
            state.Apply(skeleton);

            if (_UpdateLocal != null)
            {
                _UpdateLocal(this);
            }

            skeleton.UpdateWorldTransform();

            if (_UpdateWorld != null)
            {
                _UpdateWorld(this);
                skeleton.UpdateWorldTransform();
            }

            if (_UpdateComplete != null)
            {
                _UpdateComplete(this);
            }

            isPlayingAnimation = state.GetCurrent(0) != null;
        }
Exemple #4
0
 protected void UpdateAnimationStatus(float deltaTime)
 {
     deltaTime *= timeScale;
     skeleton.Update(deltaTime);
     state.Update(deltaTime);
 }