/// <summary> /// Очистить ресурсы /// </summary> private static void Dispose() { _members.Clear(); _redTeam.Clear(); _blueTeam.Clear(); ClientEventHandler.Remove(ClientEvent.EVENT_PARTICIPATION); ClientEventHandler.Remove(ClientEvent.START_EVENT); Winners = EventTeam.None; API.shared.deleteColShape(_eventZone); }
/// <summary> /// Очистить ресурсы гонки /// </summary> private void Dispose() { ClientEventHandler.Remove(ServerEvent.START_MOUNTAIN_RACE); InProgress = false; foreach (var car in _memberVehicles) { API.deleteEntity(car); } _memberVehicles.Clear(); Members.Clear(); _winners.Clear(); }
/// <summary> /// Завершает войну /// </summary> public void FinishWar() { ClientEventHandler.Remove(ClientEvent.CAPTURE_DISTRICT); _blip.delete(); _capturePoint.Marker.delete(); _capturePoint.Label.delete(); API.deleteColShape(_capturePoint.ColShape); if (_ownerId == Validator.INVALID_ID) { API.sendChatMessageToAll($"~b~[Банды] Район \"{_district.Name}\" остался не захвачен!"); } else { _clanManager.AddDistrict(_ownerId, _district.Id); API.sendChatMessageToAll($"~b~[Банды] Банда \"{ClanManager.GetClanName(_ownerId)}\" становятся владельцами района \"{_district.Name}\"!"); } _ownerId = Validator.INVALID_ID; }