public override void Play()
 {
     startingScale = target.localScale;
     StopAllCoroutines();
     StartCoroutine(Tween());
     OnTweenStart.Invoke();
 }
 public override void Play()
 {
     startingPosition = target.localPosition;
     StopAllCoroutines();
     StartCoroutine(Tween());
     OnTweenStart.Invoke();
 }
Пример #3
0
 public override void Play()
 {
     startingColor = target.color;
     StopAllCoroutines();
     StartCoroutine(Tween());
     OnTweenStart.Invoke();
 }
Пример #4
0
    //functions
    public void Update(float dt)
    {
        //invoke tweenstart action if not started yet
        if (!HasStarted)
        {
            OnTweenStart?.Invoke();
        }

        //invoke update action
        OnTweenUpdate?.Invoke();

        percent += dt / speed;
        if (!IsFinished)
        {
            UpdateTween();
            return;
        }
        //invoke finshed action
        OnTweenFinish?.Invoke();

        Debug.unityLogger.Log("finished");
        TweenEnd();
    }