/*public void Play(WindowAnimationBase transitionBase, WindowBase window, bool forward, System.Action callback) { * * var tag = new ME.Tweener.MultiTag() { tag1 = window };//((window != null) ? window.GetInstanceID() : 0).ToString(); * if (TweenerGlobal.instance != null) TweenerGlobal.instance.removeTweens(tag); * * this.Play(tag, transitionBase, window, null, null, forward, callback); * * }*/ public void Play(WindowAnimationBase transitionBase, WindowBase window, TransitionInputParameters parameters, bool forward, System.Action callback) { var tag = this.GetTag(window, parameters); if (TweenerGlobal.instance != null) { TweenerGlobal.instance.removeTweens(tag); } this.Play(tag, transitionBase, window, parameters, null, forward, callback); }
public void Play(ME.Tweener.MultiTag tag, WindowAnimationBase transitionBase, WindowBase window, TransitionInputParameters parameters, WindowComponentBase root, bool forward, System.Action callback) { var delay = this.GetDelay(parameters, forward); if (delay > 0f && TweenerGlobal.instance != null) { TweenerGlobal.instance.addTween(this, delay, 0f, 0f).tag(tag).onComplete(() => { this.OnPlay(window, tag, parameters, root, forward, callback); }).onCancel((obj) => { if (callback != null) { callback.Invoke(); } }); } else { this.OnPlay(window, tag, parameters, root, forward, callback); } }
public virtual void Update_EDITOR() { this.animationInputParams = this.animationInputParams.Where((i) => i != null).ToList(); this.canvas = this.GetComponent<CanvasGroup>(); if (ME.EditorUtilities.IsPrefab(this.gameObject) == true) return; this.componentsToDestroy.Clear(); if (this.animation == null || this.lastAnimation != this.animation || this.animationRefresh == false) { var ps = this.GetComponents<TransitionInputParameters>(); foreach (var p in ps) { this.componentsToDestroy.Add(p); } this.animationRefresh = false; } if (this.animationRefresh == false && this.animation != null) { this.animation.ApplyInputParameters(this); this.animationRefresh = true; } this.lastAnimation = this.animation; UnityEditor.EditorApplication.delayCall = () => { foreach (var c in this.componentsToDestroy) { Component.DestroyImmediate(c); this.animationInputParams = this.animationInputParams.Where((i) => i != null).ToList(); } }; }
public void Play(ME.Tweener.MultiTag tag, WindowAnimationBase transitionBase, WindowBase window, TransitionInputParameters parameters, WindowComponentBase root, bool forward, System.Action callback) { this.transition.Play(tag, transitionBase, window, parameters, root, forward, callback); }