예제 #1
0
        public void Init()
        {
            TotalPlayerCount = 0;
            if (ModeId == 0)
            {
                ModeId = _contexts.session.commonSession.RoomInfo.ModeId;
            }
            if (GameRules.IsChicken(ModeId))
            {
                _gameStatisticData = new SurvivalGameStatisticData(_dictTeams, _dictPlayers, _dictLeavedPlayers, _dictGoPlayers, TeamCapacity);
            }
            else
            {
                _gameStatisticData = new GroupGameStatisticData(_dictTeams, _dictPlayers, _dictLeavedPlayers, _dictGoPlayers, TeamCapacity);
            }

            /*var type = SingletonManager.Get<GameModeConfigManager>().GetBagTypeById(ModeId);
             * switch (type)
             * {
             *  case XmlConfig.EBagType.Chicken:
             *      _gameStatisticData = new SurvivalGameStatisticData(_dictTeams, _dictPlayers, _dictLeavedPlayers, _dictGoPlayers, TeamCapacity);
             *      break;
             *  case XmlConfig.EBagType.Group:
             *      _gameStatisticData = new GroupGameStatisticData(_dictTeams, _dictPlayers, _dictLeavedPlayers, _dictGoPlayers, TeamCapacity);
             *      break;
             * }*/
        }
예제 #2
0
        public void Init()
        {
            TotalPlayerCount = 0;
            var type = SingletonManager.Get <GameModeConfigManager>().GetBagTypeById(ModeId);

            switch (type)
            {
            case XmlConfig.EBagType.Chicken:
                _gameStatisticData = new SurvivalGameStatisticData(_dictTeams, _dictPlayers, _dictLeavedPlayers, _dictGoPlayers, TeamCapacity);
                break;

            case XmlConfig.EBagType.Group:
                _gameStatisticData = new GroupGameStatisticData(_dictTeams, _dictPlayers, _dictLeavedPlayers, _dictGoPlayers, TeamCapacity);
                break;
            }
        }