public void Load() { CurrentState = GameState.Loading; // Download zone _zones = ZoneSynchronizer.DownloadZoneFromHashId(Model.ZonesHashId); CurrentState = GameState.ReadyToStart; //Todo: Send Player ready event EventManager.Instance.Notice(new PlayerReadyEvent() { PlayerId = Profile.Instance.CurrentProfile.UserHashId }); }
public void PreSetup() { ZoneViewModel zone = SingleMapConfig.SelectedZone; if (!File.Exists(zone.Path)) { var result = ZoneSynchronizer.DownloadZoneFromHashId(new List <string> { zone.HashId }); SingleMapConfig.SelectedZone = ZoneModelConverter.ConvertZone(result[0]); // Hack for achievement GameAchievementHelper.CheckForAchievementTask(result); } }
// Delete Maps private void UIElement_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var selectedItem = ListUserMap.SelectedItems; if (selectedItem != null && selectedItem.Count > 0) { var hash = ((ZoneModelListItem)selectedItem[0]).HashId; ZoneAccess.Instance.DeleteMap(hash); // Synchronize the zones ZoneSynchronizer.SynchronizeZone(); // Refresh visual RefreshButton_Click(null, null); } }
public void PreSetup() { //On envoie la liste de xml a c++ for (int index = 0; index < MapConfig.SelectedZones.Count; index++) { var zone = MapConfig.SelectedZones[index]; if (!File.Exists(zone.Path)) { // The file is not downloaded var result = ZoneSynchronizer.DownloadZoneFromHashId(new List <string> { zone.HashId }); MapConfig.SelectedZones[index] = ZoneModelConverter.ConvertZone(result[0]); // Hack for achievement GameAchievementHelper.CheckForAchievementTask(result); } } }