Пример #1
0
        public GitTween StartAnimation(float time, EditorWindow window, GitSettingsJson.AnimationTypeEnum animationType)
        {
            var tween = new GitTween(IsAnimationAllowed(animationType) ? time : 0, time, window, animationType);

            tweens.Add(tween);
            return(tween);
        }
Пример #2
0
        public void Update(GitTween tween, ref double lastTime)
        {
            float deltaTime = (float)(EditorApplication.timeSinceStartup - lastTime);

            tween.Time = Mathf.Max(0, tween.Time - deltaTime);
            if (tween.EditorWindow != null)
            {
                tween.EditorWindow.Repaint();
            }
            lastTime = EditorApplication.timeSinceStartup;
        }