public override void OnShow(bool b) { base.OnShow(b); Vector2 realTweenVec = Vector2.zero; if (RectTrans != null) { if (b) { RectTrans.localScale = From; realTweenVec = To; } else { RectTrans.localScale = To; realTweenVec = From; } if (b || IsEffClose) { tweener = RectTrans.DOScale(realTweenVec, Duration) .SetEase(GetEase(b)) .SetDelay(Delay); } } }
public override void Enter() { SetSourcePosition(); RectTrans.position = sourcePosition; RectTrans.localScale = Vector3.zero; RectTrans.DOLocalMove(Vector3.zero, UIEffectTime.POP_FROM_UI); RectTrans.DOScale(1, UIEffectTime.POP_FROM_UI); }
public override void Exit() { RectTrans.DOMove(sourcePosition, UIEffectTime.POP_FROM_UI); RectTrans.DOScale(0, UIEffectTime.POP_FROM_UI).OnComplete(() => { OnExitComplete(); }); }
public override void OnShow(bool b, bool isActiveByShow) { base.OnShow(b, isActiveByShow); if (RectTrans != null) { if (IsReset) { RectTrans.localScale = b ? FromScale : ToScale; } tweener = RectTrans.DOScale(b?ToScale:FromScale, Duration).SetEase(GetEase(b)).OnComplete(OnTweenComplete).SetDelay(Delay); } }
public override void OnShow(bool b) { base.OnShow(b); if (RectTrans != null) { if (IsReset) { RectTrans.localScale = b ? From : To; } tweener = RectTrans.DOScale(b ? To : From, Duration) .SetEase(GetEase(b)) .OnComplete(OnTweenComplete) .SetDelay(Delay); } }
protected override void OnEnable() { if (_holder == null) { _holder = GetComponentInParent <InteractableUIHolder>(); } RectTrans.localScale = Vector3.one; //OnMyEffectStart(); Tweener tw = RectTrans.DOScale(Vector3.zero, .2f); tw.SetEase(_easeType).From(); //tw.OnComplete(OnMyEffectOver); }