IEnumerator StartServiceCounterCoroutine() { yield return(delayServiceWaitForSeconds); currentBall = Instantiate(ballPrefab); ballIsServed = true; GameStatusStatesFactory.GetGameStateMachine().ChangeGameStatus(GameStatusEnum.GameRunning); }
void PauseUnpause() { isGamePaused = !isGamePaused; if (isGamePaused == true) { GameStatusStatesFactory.GetGameStateMachine().ChangeGameStatus(GameStatusEnum.GamePaused); } else { GameStatusStatesFactory.GetGameStateMachine().BackToPreviousState(); } }
private void GoHome() { Debug.Log("Back to Home"); GameStatusStatesFactory.GetGameStateMachine().ChangeGameStatus(GameStatusEnum.ReadyToStart); }