public void ClosedTweenScale() { TweenCallback = null; uTweenScale tween = uTweenScale.Begin(tweenTrans.gameObject, tweenTrans.localScale, Vector3.zero, _tweenSpeed); UnityEvent callback = new UnityEvent(); callback.AddListener(ClosedFinishedTweenDoCallMethod); tween.SetOnFinished(callback); tween.method = EaseType.easeInExpo; }
void Awake() { _icon = GetComponentInChildren <Image>(); _tween = GetComponentInChildren <uTweenScale>(true); _event = new UnityEvent(); _tween.SetOnFinished(_event); _emoticonTextureNames = new string[(int)Emotion.End]; for (int i = 0; i < _emoticonTextureNames.Length; i++) { _emoticonTextureNames[i] = ((Emotion)i).ToString(); } }
void Awake() { _announce = GetComponentInChildren <Text>(); _colorTween = GetComponentInChildren <uTweenColor>(true); _positionTween = GetComponentInChildren <uTweenPosition>(true); _scaleTween = GetComponentInChildren <uTweenScale>(true); UnityEvent tweenEndEvent = new UnityEvent(); tweenEndEvent.AddListener(() => UIManager.i.RemovePopup <AnounceTextPop>()); _colorTween.SetOnFinished(tweenEndEvent); _positionTween.SetOnFinished(tweenEndEvent); _scaleTween.SetOnFinished(tweenEndEvent); }
public void ClosedTweenScale(UnityAction callback) { TweenCallback = callback; if (tweenTrans) { uTweenScale tween = uTweenScale.Begin(tweenTrans.gameObject, tweenTrans.localScale, Vector3.zero, _tweenSpeed); UnityEvent callmethod = new UnityEvent(); callmethod.AddListener(ClosedFinishedTweenDoCallMethod); tween.SetOnFinished(callmethod); } else { Debug.Log("not found child name tween transform "); } }
public uTweenScale ShowTweenScale(Vector3 from, Vector3 to, float time, EaseType method, UnityAction callback) { TweenCallback = callback; if (tweenTrans) { tweenTrans.localScale = from; uTweenScale tween = uTweenScale.Begin(tweenTrans.gameObject, from, to, time); tween.method = method; UnityEvent callmethod = new UnityEvent(); callmethod.AddListener(OpenFinishedTweenDoCallMethod); tween.SetOnFinished(callmethod); return(tween); } else { Debug.Log("not found child name tween transform "); } return(null); }
public void ShowTweenScale(UnityAction callback, float delay = 0) { TweenCallback = callback; if (tweenTrans) { tweenTrans.localScale = Vector3.zero; uTweenScale tween = uTweenScale.Begin(tweenTrans.gameObject, Vector3.zero, Vector3.one, _tweenSpeed); tween.delay = delay; tween.method = EaseType.easeOutExpo; tween.RemoveAllFinished(); UnityEvent callmethod = new UnityEvent(); callmethod.AddListener(OpenFinishedTweenDoCallMethod); tween.SetOnFinished(callmethod); } else { Debug.Log("not found child name tween transform "); } }