public void UpdateProgressValue(int noQs, string topicName) // ID = 3 { noQs += loadManager.LoadQCountForTopics(topicName); saveManager.SaveQCountForTopics(noQs, topicName); string[] tagsInFile = ES2.GetTags("svt.txt"); List <string> topics = new List <string>(); int topics100Ans = 0; // Load all the topic names associated with Progress achievement foreach (string item in tagsInFile) { if (item.Contains("eachQAnswerCount")) { topics.Add(item.Substring("eachQAnswerCount".Length)); } } // Check the number of topics having 100+ questions answered for (int i = 0; i < topics.Count; i++) { int qCount = loadManager.LoadQCountForTopics(topics[i]); if (qCount >= 100) { topics100Ans++; } } achProgressValue = topics100Ans; saveManager.SaveAchievementValues(achProgressValue, 3); }
void LoadSavedGameInfo() { if (ES2.Exists(SavedGameFilename)) { string[] tags = ES2.GetTags(SavedGameFilename); foreach (string tag in tags) { string gameLocation = SavedGameFilename + "?tag=" + tag; SavedGame game = new SavedGame(); game = ES2.Load <SavedGame>(gameLocation); games.Add(game); } } }
public void Load(string gameID) { DestroyCurrentGameObjects(); string filename = VenueManager.GetFilename(gameID); if (ES2.Exists(filename)) { string[] tags = ES2.GetTags(filename); foreach (string tag in tags) { Venue venue = CreateEmptyVenue(); Venue.Load(venue, tag, gameID); venues.Add(venue); } } }
public void Load(string gameID) { DestroyCurrentGameObjects(); string filename = WrestlerManager.GetFilename(gameID); if (ES2.Exists(filename)) { string[] tags = ES2.GetTags(filename); foreach (string tag in tags) { Wrestler wrestler = CreateEmptyWrestler(); Wrestler.Load(wrestler, tag, gameID); wrestlers.Add(wrestler); } } }
public void Load(string gameID) { DestroyCurrentGameObjects(); string companyFilename = CompanyManager.GetFilename(gameID); if (ES2.Exists(companyFilename)) { string[] tags = ES2.GetTags(companyFilename); foreach (string tag in tags) { Company company = CreateEmptyCompany(); Company.Load(company, tag, gameID); companies.Add(company); } } }
public void GetTags() { if (!isProxyValid()) { return; } ES2Settings _setting = new ES2Settings(); _setting.encrypt = encrypt.Value; _setting.encryptionPassword = encryptionPassword.Value; proxy.arrayList.Clear(); string[] tagsInFile = new string[0]; try{ tagsInFile = ES2.GetTags(filename.Value, _setting); }catch (Exception e) { errorMessage.Value = e.Message; Fsm.Event(isErrorEvent); } foreach (string element in tagsInFile) { proxy.arrayList.Add(element); } tagCount.Value = tagsInFile.Length; if (tagsInFile.Length == 0) { Fsm.Event(noTagsEvent); } Fsm.Event(isDoneEvent); }