예제 #1
0
        public override void OnRegister()
        {
            gameStart.AddListener(OnGameStart);
            gameLost.AddListener(OnGameLost);
            gameContinue.AddListener(OnGameContinue);
            gameRestart.AddListener(OnGameRestart);
            continueStartSignal.AddListener(OnContinueStart);
            gamePause.AddListener(OnGamePause);
            gameResume.AddListener(OnGameResume);
            gameEnd.AddListener(OnGameEnd);

            uiVisibilityConfig_cat   = configService.GetConfig <Config.Cat.GameplayUIVisibilityConfig>();
            uiVisibilityConfig_gun   = configService.GetConfig <Config.Gun.GameplayUIVisibilityConfig>();
            uiVisibilityConfig_orbit = configService.GetConfig <Config.Orbit.GameplayUIVisibilityConfig>();
            uiVisibilityConfig_slame = configService.GetConfig <Config.Slame.GameplayUIVisibilityConfig>();

            switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
            {
            case GameGroups.GameGroupGameType.Cat:
                handler = config => OnConfigChanged_cat((Config.Cat.GameplayUIVisibilityConfig)config);
                uiVisibilityConfig_cat.OnChanged += handler;
                OnConfigChanged_cat(uiVisibilityConfig_cat);
                break;

            case GameGroups.GameGroupGameType.Gun:
                handler = config => OnConfigChanged_gun((Config.Gun.GameplayUIVisibilityConfig)config);
                uiVisibilityConfig_gun.OnChanged += handler;
                OnConfigChanged_gun(uiVisibilityConfig_gun);
                break;

            case GameGroups.GameGroupGameType.Orbit:
                handler = config => OnConfigChanged_orbit((Config.Orbit.GameplayUIVisibilityConfig)config);
                uiVisibilityConfig_orbit.OnChanged += handler;
                OnConfigChanged_orbit(uiVisibilityConfig_orbit);
                break;

            case GameGroups.GameGroupGameType.Slame:
                handler = config => OnConfigChanged_slame((Config.Slame.GameplayUIVisibilityConfig)config);
                uiVisibilityConfig_slame.OnChanged += handler;
                OnConfigChanged_slame(uiVisibilityConfig_slame);
                break;
            }

            SetVisibilityForCondition(visibilityData.IsVisibleStart);
        }
예제 #2
0
 protected abstract void OnConfigChanged_slame(Config.Slame.GameplayUIVisibilityConfig config);
예제 #3
0
 protected override void OnConfigChanged_slame(Config.Slame.GameplayUIVisibilityConfig config)
 {
     visibilityData = config.BestScoreVisibilityData;
 }