Beispiel #1
0
        private static void OnEditorUpdate()
        {
            //only work when Application is not playing.
            if (Application.isPlaying)
            {
                return;
            }
            var deltaTime = UnityEditor.EditorApplication.timeSinceStartup - _lastEditorUpdateTime;

            _lastEditorUpdateTime = UnityEditor.EditorApplication.timeSinceStartup;
            var data = new TweenTicker.TickData((float)deltaTime, Time.timeScale);

            TweenTicker.Tick(data);
        }
Beispiel #2
0
 public void Tick(TweenTicker.TickData data)
 {
     AssertPreparedOrRunning();
     if (paused)
     {
         return;
     }
     if (_tweenOptions.ignoreTimeScale)
     {
         this.elapsedTime += data.unscaledDeltaTime;
     }
     else
     {
         this.elapsedTime += data.scaledDeltaTime;
     }
 }
Beispiel #3
0
        private void Update()
        {
            var data = new TweenTicker.TickData(Time.unscaledDeltaTime, Time.timeScale);

            TweenTicker.Tick(data);
        }