/// <summary> /// 分为1:先功团,2:护卫队两个阵营 /// </summary> /// <returns></returns> public static bool TryGroup(CountryType groupType, out CountryGroup group) { group = null; if (_countryGroupDict != null && _countryGroupDict.ContainsKey(groupType)) { group = _countryGroupDict[groupType]; return(true); } return(false); }
/// <summary> /// 初始化 /// </summary> internal static void Init(GameActive gameActive) { //Trace.WriteLine("领土战初化"); _gameActive = gameActive; isOver = false; FistCountryUser = new CountryUser(); _countryGroupDict = new Dictionary <CountryType, CountryGroup>(2); var mogemaGroup = new CountryGroup(CountryType.M); var hashideGroup = new CountryGroup(CountryType.H); _countryGroupDict.Add(mogemaGroup.CountryType, mogemaGroup); _countryGroupDict.Add(hashideGroup.CountryType, hashideGroup); CountryCombatProcess.RestVersion(); _combatProcessList = new List <CountryCombatProcess>(); _combatTimer = new Timer(DoCombat, gameActive, 60000, 17 * 1000); //_waitCombatTimer = new Timer(DoWaitCombat, gameActive, 60000, 1 * 1000); }
/// <summary> /// 分为1:先功团,2:护卫队两个阵营 /// </summary> /// <returns></returns> public static bool TryGroup(CountryType groupType, out CountryGroup group) { group = null; if (_countryGroupDict != null && _countryGroupDict.ContainsKey(groupType)) { group = _countryGroupDict[groupType]; return true; } return false; }
/// <summary> /// 初始化 /// </summary> internal static void Init(GameActive gameActive) { //Trace.WriteLine("领土战初化"); _gameActive = gameActive; isOver = false; FistCountryUser = new CountryUser(); _countryGroupDict = new Dictionary<CountryType, CountryGroup>(2); var mogemaGroup = new CountryGroup(CountryType.M); var hashideGroup = new CountryGroup(CountryType.H); _countryGroupDict.Add(mogemaGroup.CountryType, mogemaGroup); _countryGroupDict.Add(hashideGroup.CountryType, hashideGroup); CountryCombatProcess.RestVersion(); _combatProcessList = new List<CountryCombatProcess>(); _combatTimer = new Timer(DoCombat, gameActive, 60000, 17 * 1000); //_waitCombatTimer = new Timer(DoWaitCombat, gameActive, 60000, 1 * 1000); }