Exemplo n.º 1
0
    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;
    }
Exemplo n.º 2
0
    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();
        }
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
    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 ");
        }
    }
Exemplo n.º 5
0
    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);
    }
Exemplo n.º 6
0
    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 ");
        }
    }