Esempio n. 1
0
 private void OnUpdate()
 {
     if (SelectedSpriteAnimation.Frames.Count > 0)
     {
         float deltaTime = (float)EditorApplication.timeSinceStartup - timeTracker;
         timeTracker += deltaTime;
         currentFrame = spriteAnimationHelper.UpdateAnimation(deltaTime);
     }
 }
        private void LateUpdate()
        {
            if (Playing)
            {
                SpriteAnimationFrame currentFrame = spriteAnimationHelper.UpdateAnimation(Time.deltaTime);

                if (currentFrame != null)
                {
                    spriteRenderer.sprite = currentFrame.Sprite;
                }
            }
        }