public virtual void PlayBackward() { if (!gameObject.activeSelf) { gameObject.SetActive(true); } pingPongStep = PingPongStep.Forward; direction = Direction.Backward; this.enabled = true; }
protected void CheckEndTween() { if (factor < 0 || factor > 1) { switch (behavior) { case UITweener.Behavior.Once: Stop(); break; case UITweener.Behavior.Loop: factor = (direction == Direction.Forward) ? 0 : 1; break; case UITweener.Behavior.PingPong: factor = (direction == Direction.Forward) ? 1 : 0; direction = (direction == Direction.Forward) ? Direction.Backward : Direction.Forward; break; case UITweener.Behavior.PingPongOnce: if (pingPongStep == PingPongStep.Forward) { pingPongStep = PingPongStep.Backward; factor = (direction == Direction.Forward) ? 1 : 0; direction = (direction == Direction.Forward) ? Direction.Backward : Direction.Forward; } else if (pingPongStep == PingPongStep.Backward) { pingPongStep = PingPongStep.Stop; Stop(); } break; } } }
public void PlayBackward() { if (onPlayBackward != null) { onPlayBackward(); } if (gameObjectDisabling != Disabling.None && !gameObject.activeSelf) { gameObject.SetActive(true); } pingPongStep = PingPongStep.Forward; direction = Direction.Backward; this.enabled = true; if (Button != null) { Button.interactable = true; } }