complete() public method

completes the tween. sets the playhead to it's final position as if the tween completed normally. takes into account if the tween was playing forward or reversed.
public complete ( ) : void
return void
コード例 #1
0
    protected virtual void OnGUI()
    {
        if (_tween == null)
        {
            return;
        }

        GUILayout.Label("elapsed: " + string.Format("{0:0.##}", _tween.totalElapsedTime));


        if (GUILayout.Button("play"))
        {
            _tween.play();
        }

        if (GUILayout.Button("pause"))
        {
            _tween.pause();
        }

        if (GUILayout.Button("reverse"))
        {
            _tween.reverse();
        }

        if (GUILayout.Button("restart"))
        {
            _tween.restart();
        }

        if (GUILayout.Button("play backwards"))
        {
            _tween.playBackwards();
        }

        if (GUILayout.Button("play forward"))
        {
            _tween.playForward();
        }

        if (GUILayout.Button("complete"))
        {
            _tween.complete();
        }

        GUILayout.Label("Time Scale: " + string.Format("{0:0.##}", _tween.timeScale));
        var newTweenTimeScale = GUILayout.HorizontalSlider(_tweenTimeScale, 0, 3);

        if (newTweenTimeScale != _tweenTimeScale)
        {
            _tweenTimeScale  = newTweenTimeScale;
            _tween.timeScale = _tweenTimeScale;
        }

        easeTypesGUI();
    }
コード例 #2
0
 static public int complete(IntPtr l)
 {
     try {
         AbstractGoTween self = (AbstractGoTween)checkSelf(l);
         self.complete();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }