void Update() { if (IsActive) { if (DataMaster.gameState <= GAME_STATE.Tutorial) { if (MoveInputed()) { manager.ForceTextUpdate(); } if (transform.position.x < -0.2f) { DataMaster.GameStart(); } } var moveflag = false; if (MoveCheck()) { if (CheckGameOver()) { return; } moveflag = true; } else { moveflag = false; } anim.SetBool("Moving", moveflag); } }
public void GameClear() { DataMaster.GameClear(); textController.GameClear(); StartCoroutine(FeverCoroutine()); gameStatus.endingTheme.Play(); }
public void GameOver(bool isRemain) { if (DataMaster.isGameOver || DataMaster.isGameClear) { return; } DataMaster.GameOver(); StartCoroutine(FeverCoroutine()); textController.GameOver(isRemain); target.GameOverAnim(isRemain); }
void CheckRetry() { if (Input.GetKeyDown("r")) { DataMaster.RefreshFlag(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); } #if UNITY_EDITOR if (Input.GetKeyDown("enter")) { fireNum.Value = 0; } #endif }
void Init() { DataMaster.TutorialStart(); fireNum .Subscribe(n => { if (n < 0 || DataMaster.gameState == GAME_STATE.Ending) { return; } FetchGameState(); #if UNITY_EDITOR fireRemainText.text = "終了まで\n" + fireNum.ToString() + " 発"; #endif }); fieldStatus.nowFeverRate = gameStatus.InitFeverRate; fieldStatus.nowDifficultyRate = gameStatus.difficultyRateEasy; if (FireWorks.Length > 0) { if (gameStatus.isDebugMode) { // デバッグモードの時はスペースキーを押したときに花火を発射する this.UpdateAsObservable() .Select(inputed => Input.GetKeyDown("space") || Input.GetKeyDown("a")) .Where(inputed => inputed) .Subscribe(_ => { FireAfterSetPosition(); }).AddTo(gameObject); } else { StartCoroutine(FireTimeLine()); } } }