public void TogglePlay(bool isOn) { if (tween == null) { targetBool = isOn; playEvent = TogglePlay; return; } if (isOn) { panel.gameObject.SetActive(true); tween.PlayForward(); } else { if (quickClose) { panel.gameObject.SetActive(false); } else { tween.PlayReverse(); } } }
public virtual void PlayAnim(bool isEnter, UnityAction onComplete) { tween = CreateTweener(isEnter); if (onComplete != null) { tween.AddOnFinished(onComplete); } tween.ResetToBeginning(); tween.PlayForward(); }
public void EnterAnim(UIAnimType animType, UnityAction onComplete) { ResetAnim(animType); if (onComplete != null) { tween.AddOnFinished(onComplete); } tween.ResetToBeginning(); tween.PlayForward(); }
void Start() { _tweenEvent.AddListener(() => { StartCoroutine(TextAnimation()); }); _text.enabled = true; _tween.SetOnFinished(_tweenEvent); _tween.PlayForward(); }
public void TogglePlay(bool isOn) { if (tween == null) { targetBool = isOn; playEvent = TogglePlay; return; } if (isOn) { tween.PlayForward(); } else { tween.PlayReverse(); } }