public PhaseCountDown(ViewModel_ShootingGame viewModel)
        {
            this._viewModel = viewModel;

            if (readyObj == null)
            {
                readyObj = MonoBehaviour.Instantiate(ResourceStore.Instance.Get <GameObject>("ReadyCanvas"));
                readyObj.SetActive(false);
            }
        }
 public PhaseGame(ViewModel_ShootingGame viewModel)
 {
     this._viewModel = viewModel;
     this._viewModel.EnemyManager.OnNext    += NextEnemy;
     this._viewModel.HitPowerLeft.OnChange  += InputLeft;
     this._viewModel.HitPowerRight.OnChange += InputRight;
     this._viewModel.OnEnemyAppeared        += EnemyAppeared;
     this._viewModel.OnDefeat += EnemyDefeat;
     this._viewModel.OnFinishedEscapeEnemy += EnemyEscaped;
 }
 public PhaseResult(ViewModel_ShootingGame viewModel)
 {
     this._viewModel = viewModel;
 }
 public PhaseFinish(ViewModel_ShootingGame viewModel)
 {
     this._viewModel = viewModel;
 }
 public PhaseLoad(ViewModel_ShootingGame _viewModel)
 {
     this._viewModel = _viewModel;
 }
        protected override void StartMain()
        {
            _viewModel = new ViewModel_ShootingGame(GameDataStore.Instance.PlayerNum, GameDataStore.Instance.GameLevel);
            _viewModel.TimeDisplayState.OnChange      += timeView.gameObject.SetActive;
            _viewModel.TimeValue.OnChange             += timeView.SetTime;
            _viewModel.CountDownDisplayState.OnChange += display => { if (display)
                                                                      {
                                                                          ShowCountDown();
                                                                      }
            };
            _viewModel.Score1ViewDisplayState.OnChange += scoreViewPlayer1.gameObject.SetActive;
            _viewModel.Score1.OnChange += scoreViewPlayer1.SetScore;

            if (GameDataStore.Instance.PlayerNum == 1)
            {
                // CPU
                _viewModel.Score2ViewDisplayState.OnChange += scoreViewCpu.gameObject.SetActive;
                _viewModel.Score2.OnChange += scoreViewCpu.SetScore;
            }
            else
            {
                // 二人対戦やりたいから作ってみる
                _viewModel.Score2ViewDisplayState.OnChange += scoreViewPlayer2.gameObject.SetActive;
                _viewModel.Score2.OnChange += scoreViewPlayer2.SetScore;
            }

            // _viewModel.EnemyOrderListDisplayState.OnChange += enemyOrder.SetActive;
            // _viewModel.EnemyManager.OnAddList += enemyOrderListView.AddList;
            _viewModel.EnemyManager.OnNext += AppearEnemy;
            // _viewModel.EnemyManager.OnNext += enemyOrderListView.Move;
            _viewModel.EnemyManager.Init();

            _viewModel.OnEscapeEnemy += EscapeAllEnemy;
            _viewModel.OnDefeatLeft  += DefeatLeft;
            _viewModel.OnDefeatRight += DefeatRight;
            _viewModel.OnEscapeLeft  += EscapeLeft;
            _viewModel.OnEscapeRight += EscapeRight;

            _viewModel.ResultDisplayState.OnChange += Result;

            _viewModel.OnHitLeft   += ShowHitEffectLeft;
            _viewModel.OnHitRight  += ShowHitEffectRight;
            _viewModel.OnMissLeft  += ShowMissEffectLeft;
            _viewModel.OnMissRight += ShowMissEffectRight;

            _viewModel.OnLoadPrefabs += LoadPrefabs;
            _viewModel.SetPlayerNum(GameDataStore.Instance.PlayerNum);
            _viewModel.FinishDisplayState.OnChange += ShowFinish;

            // try
            // {
            //     // Debug.Log("try:get");
            //     // var obj = ResourceStore.Instance.Get<GameObject>("StartCount");
            //     // StartCountDownPhase();
            // }
            // catch (KeyNotFoundException e)
            // {
            //     Debug.Log(e);
            //     StartLoadPhase();
            // }
            StartLoadPhase();
            // 鳴ってたらこの辺りで音を止めたい
        }