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(); }
static public int pause(IntPtr l) { try { AbstractGoTween self = (AbstractGoTween)checkSelf(l); self.pause(); return(0); } catch (Exception e) { return(error(l, e)); } }