// Start is called before the first frame update void Start() { // スコアマネージャ―取得 scoreManager_ = ScoreManager.Instance; // コンボマネージャー取得 comboManager_ = ComboManager.Instance; // バウンティマネージャー取得 bountyManager_ = BountyManager._instance; // アプリケーションマネージャーに現在の状態を保存 applicationManager_ = FindObjectOfType <ApplicationManager>(); applicationManager_.SetIsInput(true); applicationManager_.SetIsGamePlay(false); // 最初は操作説明のみ出す tutorial_.gameObject.SetActive(true); // 他はいったん非表示 timer_.gameObject.SetActive(false); timeUp_.gameObject.SetActive(false); countdown_.gameObject.SetActive(false); scoreManager_.gameObject.SetActive(false); missionDrawUI_.gameObject.SetActive(false); bountyManager_.gameObject.SetActive(false); remainingBulletGauge_.gameObject.SetActive(false); optionMenu_.gameObject.SetActive(false); skillUI_.gameObject.SetActive(false); spWeaponUI_.gameObject.SetActive(false); // タイマーを止めておく timer_.TimerStop(); // マウスカーソルをだす CursorManager.CursorUnlock(); // BGM再生 AudioManager.Instance.PlayBGM(gameObject, BGMPath.GAME_BGM_MAIN, 3.0f); // ステートを操作説明にする state_ = GAME_SCENE_STATE.TUTORIAL; }
void TutorialUpdate() { if (tutorial_.IsFinish) { // 無効にするObject tutorial_.gameObject.SetActive(false); // カウントダウン中は入力フラグを無効にする applicationManager_.SetIsInput(false); // 有効にするObject countdown_.gameObject.SetActive(true); timer_.gameObject.SetActive(true); scoreManager_.gameObject.SetActive(true); missionDrawUI_.gameObject.SetActive(true); remainingBulletGauge_.gameObject.SetActive(true); skillUI_.gameObject.SetActive(true); spWeaponUI_.gameObject.SetActive(true); // UI登場アニメーション再生 timer_.gameObject.GetComponent <Animator>().Play("TimerUI_IN"); scoreManager_.gameObject.GetComponent <Animator>().Play("ScoreUI_IN"); missionDrawUI_.gameObject.GetComponent <Animator>().Play("BountyManagerUI_IN"); skillUI_.gameObject.GetComponent <Animator>().Play("SkillUI_IN"); spWeaponUI_.gameObject.GetComponent <Animator>().Play("In"); remainingBulletGauge_.transform.GetChild(0).gameObject.GetComponent <Animator>().Play("HandGunGageStart"); // カーソルを消して画面中央にロック CursorManager.CursorLock(); // カウントダウンSE再生 countdown_.PlaySe(); // ステート切り替え state_ = GAME_SCENE_STATE.START_COUNT_DOWN; } }
void OpenMenuUpdate() { if (optionMenu_.IsGoToTitle) { // ゲーム中をトゥルー applicationManager_.SetIsGamePlay(false); applicationManager_.SetIsInput(false); // カーソルをロック CursorManager.CursorUnlock(); // ステートをプレイにする state_ = GAME_SCENE_STATE.TRANSITION; } // メニューが閉じたら else if (!optionMenu_.IsOpen) { // ゲーム中をトゥルー applicationManager_.SetIsGamePlay(true); // カーソルをロック CursorManager.CursorLock(); // ステートをプレイにする state_ = GAME_SCENE_STATE.PLAY; } }