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; * }*/ }
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; } }