public void OnSkip(InputAction.CallbackContext context) { if (context.phase == InputActionPhase.Performed) { SkipEvent.Invoke(); } }
// Start is called before the first frame update void Start() { NextButton.onClick.AddListener(() => { SkipEvent?.Invoke(); }); }
public void SkipTransition() { if (afterAnimationCoroutineIsRunning) { StopCoroutine(afterAnimationCoroutine); /// you need this because you don't want this effect to take place unintentionally afterAnimationCoroutineIsRunning = false; } animator.Play(currentAnimationClipName, -1, 1); isDuringTransition = false; currentTransitionType = TransitionType.None; currentAnimationClipName = ""; currentAnimationClipLength = 0; DefaultState?.Invoke(); SkipEvent?.Invoke(sceneDataArray[currentSceneNumber - 1]); if (ar != null) { ar.QueueMessage("SkipTransition"); } }