public void PauseGame() { isPaused = true; previousGameState = GameState.gameState; GameState.ChangeState(GameState.States.Paused); Time.timeScale = 0; }
public void TakeObject() { currentCount += 1; if (currentCount >= objectCount) { confettiFx.SetActive(true); UIManager.Instance.Invoke("NextLevel", 1.25f); currentState = GameState.States.gameOver; } UIManager.Instance.progressBar.DOFillAmount((currentCount / objectCount), .4f); }
public void stopAnimations(GameState.States state) { switch (state) { case GameState.States.MAINSCENE: print("parar coroutine"); StopCoroutine(this._titleScreenAnimationCoroutine); // this._titleScreenAnimationCoroutine = StartCoroutine(titleScreenAnimation()); break; } }
public void playAnimations(GameState.States state) { switch (state) { case GameState.States.MAINSCENE: this._kaiTextAnimation_2.SetActive(false); this._reimiTextAnimation_3.SetActive(false); this.titleGameImage.SetActive(false); this._titleScreenAnimationCoroutine = StartCoroutine(titleScreenAnimation()); break; } }
public void StartGame() { UIManager.Instance.StartGame(); currentState = GameState.States.gameStarted; }
protected override void OnGameStateChange(GameState.States currentState) { GetComponent <TextMesh>().text = currentState.ToString(); //Debug.Log(" State changed!! "); }
public void CmdChangeGameState(GameState.States state) { this.gameState.state = state; }
public void setGameState(GameState.States state) { gameState.setGameState(state); if (state == GameState.States.None) { OnNoneState(); } else if (state == GameState.States.GameOver) { OnGameOverState(); } else if (state == GameState.States.GamePlay) { OnGamePlayState(); } else if (state == GameState.States.SwtichScene) { OnSwtchSceneState(); } else if (state == GameState.States.PurchaseConfirmation) { onPurchaseConfirmationState(); } else if (state == GameState.States.BirdSelection) { OnBirdSelectionState(); } else if (state == GameState.States.OutOfCoins) { OnOutOfCoinsState(); } else if (state == GameState.States.MainMenu) { OnMainMenuState(); } else if (state == GameState.States.Settings) { OnSettingState(); } else if (state == GameState.States.Pause) { OnPauseState(); } else if (state == GameState.States.Share) { OnShareState(); } else if (state == GameState.States.PlayerSelection) { OnPlayerSelectionState(); } else if (state == GameState.States.RateUs) { OnRateUsState(); } else if (state == GameState.States.AdNotAvaiableState) { OnAdNotAvaiableState(); } else if (state == GameState.States.InternetNotConnected) { OnInternetNotConnectedState(); } else if (state == GameState.States.VideoAdConfirmation) { OnVideoAdConfirmationState(); } else if (state == GameState.States.LockedPlayer) { OnLockedPlayerState(); } }