public void DoBoostKick() { //if (_kick <= 0.001) if (_kickTween != null && !_kickTween.IsComplete()) { _kickTween.Complete(); } _kickTween = DOTween.To(() => _kick, x => _kick = x, 1, Boost.Time).OnComplete(() => _kick = 0); }
// Absolutely HORRIBLE hack to handle physics update teleport not syncing with render update // so that screen renders after player passes through portal but before actual teleport private void JustGotTeleportedTo() { if (_teleportThicknessSafety != null && !_teleportThicknessSafety.IsComplete()) { _teleportThicknessSafety.Complete(); } _justGotTeleportedTo = 1; _teleportThicknessSafety = DOTween.To(() => _justGotTeleportedTo, x => _justGotTeleportedTo = x, 0, 0.5f); TravellerEntered.Invoke(); }
private void Update() { if (Input.GetKeyDown(KeyCode.Space) && textTweener != null) { if (isTextCompleted == false) { textTweener?.Complete(true); } else { Singletons.ScenesController.CloseStory(); } } }
public void Continue() { if (_dialogueTween != null && _dialogueTween.IsPlaying()) //The animation is still playing, we finish it. { Debug.Log("IsPLaying"); _dialogueTween.Complete(); return; } if (_wordQueue.Count > 0) //There are words still in the queue, so we show them. { Debug.Log("word Queue"); ShowDialogueTween(CutDialog()); return; } _currentPopup?.Hide(); ShowCompletecallback.Invoke(); }