void Save() { if (!string.IsNullOrEmpty(saveKey)) { SaveLoadXML.SetValue <int>(saveKey, counter); } }
public void TutorialTap() { currentTutorialStep++; if (currentTutorialStep < tutorialStepList.Count) { AudioManager.Instance.Play(1); TutorialCharacter.gameObject.SetActive(false); TutorialTextPanel.SetActive(false); TutorialPointerImage.gameObject.SetActive(false); SendMessage("OnTutorialTap"); ShowTutorialMessage(tutorialStepList[currentTutorialStep]); } else { if (finishTutorial) { SaveLoadXML.SetValue("TUTORIAL_SHOWED", "true"); PlayerInfo.Instance.SaveGame(); } else { GameData.current.isTutorialCompleted = true; SaveLoadXML.SaveGameDataXML(); } PlayerInfo.Instance.isTutorial = false; Destroy(gameObject); } }
void Start() { StartCoroutine(BlockCoroutine(2f)); if (!SaveLoadXML.HasKey(first_open_mg_lock)) { SaveLoadXML.SetValue(first_open_mg_lock, "true"); StartCoroutine(StartHelpShow(2f)); } helpText.text = Localization.Instance.GetLocale(2524); }
public void ShowMerchantPanel() { if (ItemOfferList.Count == 0) { for (int i = 0; i < MerchantItem.Length; i++) { ItemOfferList.Add(GetRandomItemIndex()); } SaveLoadXML.SetValue(item_key, ItemOfferList.ToArray()); } DrawItemOffers(); }
public void SaveGame() { //print("--SaveGame()"); SaveLoadXML.SetValue("PLAYER_INFO", GetStringValues()); List <string> traitNames = new List <string>(); foreach (Trait trait in traitList.FindAll(trait => trait.status)) { traitNames.Add(trait.name); } if (traitNames.Count > 0) { SaveLoadXML.SetValue("TRAITS", traitNames.ToArray()); } List <string> triggerNames = new List <string>(); foreach (EventTriggers trigger in triggerList.FindAll(trigger => trigger.event_status)) { triggerNames.Add(trigger.event_name); } if (triggerNames.Count > 0) { SaveLoadXML.SetValue("TRIGGER", triggerNames.ToArray()); } if (QuestManager.Instance != null) { QuestManager.Instance.Save(); } if (WorldTime.Instance != null) { WorldTime.Instance.Save(); } if (EventManager.Instance != null) { EventManager.Instance.Save(); } if (StoryManager.Instance != null) { StoryManager.Instance.SaveCompleteStory(); } SaveLoadXML.SaveXML(); }
public void OnClickBuyItem(MerchantItemController obj) { AudioManager.Instance.Play(0); if (obj.ItemName != "no_cash") { //print("--obj.ItemName " + obj.ItemName); CreateFindToolAnim(obj); PlayerInfo.Instance.EquipItem(obj.ItemName, true, true); ItemPurchased.Add(obj.ID); SaveLoadXML.SetValue(item_purchased, ItemPurchased.ToArray()); DrawItemOffers(); AudioManager.Instance.Play(3); } else { ScreenManager.Instance.CreateScreen("HintPanel"); ScreenManager.Instance.current.GetComponent <Hint>().ShowHint(Localization.Instance.GetLocale(894)); } }
public void SaveToolList() { SaveLoadXML.SetValue(saveToolsKey, GetToolAllNames().ToArray()); }
public void SaveCompleteStory() { SaveLoadXML.SetValue(saveCompleteStoryKey, GetCompleteStoryNames().ToArray()); //LastChangeTime = Time.time; }
public void Save() { SaveLoadXML.SetValue <float>("CURRENT_TIME", current_time); SaveLoadXML.SaveList(triggerCooldownList, "TRIGGERCD"); }
public void Save() { SaveLoadXML.SetValue <int>("CURRENT_EVENT_ID", current_event_id); }