コード例 #1
0
 public override void Play()
 {
     startingScale = target.localScale;
     StopAllCoroutines();
     StartCoroutine(Tween());
     OnTweenStart.Invoke();
 }
コード例 #2
0
 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
ファイル: Tween.cs プロジェクト: EmileDavidson/Mythe
    //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();
    }