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); }
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; }