void Awake() { myData = new AchievementsData(); if (GameStateXML.IfFileExist("Achievements.xml")) { LoadData(); } else { CreateFile(); } int ndatos = myData.MessageStorage.Count; if (ndatos < 8) { scrollHeight = Screen.height; } if (ndatos >= 8 && ndatos < 15) { scrollHeight = Screen.height * 2; } if (ndatos >= 15) { scrollHeight = Screen.height * 3; } }
public void LoadAchievements() { _data = GameStateXML.LoadXML("Achievements.xml"); if (_data.ToString() != "") { myAchievements = (AchievementsData)GameStateXML.DeserializeObject(_data, "AchievementsData"); } }
/* * Achievementes Handle * */ public void CreateAchievements() { myAchievements.MessageStorage.Add("Haz obtenido una semilla nueva!"); // Time to creat our XML! _data = GameStateXML.SerializeObject(myAchievements, "AchievementsData"); // This is the final resulting XML from the serialization process GameStateXML.CreateXML("Achievements.xml", _data); }
public void LoadData() { _data = GameStateXML.LoadXML("Configuration.xml"); if (_data.ToString() != "") { myData = (PlantARData)GameStateXML.DeserializeObject(_data, "PlantARData"); } }
public void LoadData() { _data = GameStateXML.LoadXML("Test.xml"); if (_data.ToString() != "") { myData = (ManagerData)GameStateXML.DeserializeObject(_data, "ManagerData"); } }
/// <summary> /// XML 불러오는 함수 /// </summary> public void LoadData() { LoadDBData(); _data = GameStateXML.LoadXML(m_sXMLDataName); if (_data.ToString() != "") { myData = (ManagerData)GameStateXML.DeserializeObject(_data, "ManagerData"); } }
public void CreateFile() { myData.currentLevel = 1; myData.compostLevelHealth = 0; myData.sunLevelHealth = 0; myData.waterLevelHealth = 0; myData.plantName = "Default"; myData.playerName = "Default"; myData.plantarTime = 0; myData.modelAuxChangeTime = 0; myData.waterAuxTime = 0; myData.modelType = 1; myData.notificationOn = false; // Time to creat our XML! _data = GameStateXML.SerializeObject(myData, "PlantARData"); // This is the final resulting XML from the serialization process GameStateXML.CreateXML("Configuration.xml", _data); Debug.Log(_data); }
/// <summary> /// XML 저장 함수 /// </summary> public void SaveData() { _data = GameStateXML.SerializeObject(myData, "ManagerData"); GameStateXML.CreateXML(m_sXMLDataName, _data); }
public void SaveAchievements() { _data = GameStateXML.SerializeObject(myAchievements, "AchievementsData"); GameStateXML.CreateXML("Achievements.xml", _data); }
public void SaveData() { _data = GameStateXML.SerializeObject(myData, "PlantARData"); GameStateXML.CreateXML("Configuration.xml", _data); }
//Once Run void Awake() { myData = new PlantARData(); if (GameStateXML.IfFileExist("Configuration.xml")) { LoadData(); } //CreateFile(); else { CreateFile(); } compostCount = myData.compostLevelHealth; waterCount = myData.waterLevelHealth; compostHealth = compostCount * 2f / 10f; sunHealth = (float)(myData.sunLevelHealth * 2 / 10); waterHealth = waterCount * 2f / 10f; if (ApplicationModel.firstTime) { initialTime = myData.plantarTime; ApplicationModel.initialTime = initialTime; ApplicationModel.firstTime = false; } else { initialTime = ApplicationModel.initialTime; } nMessage = 0; informationText.text = ""; dialogText.text = ""; timerText.text = ""; timeReset = false; animationHealth = false; dialogPanel = false; modelChange = false; switch (myData.currentLevel) { case 0: dialogPanel = true; break; case 1: dialogPanel = true; dialogButton = true; nMessage = 1; break; case 2: dialogPanel = true; dialogButton = true; nMessage = 9; break; case 3: nMessage = 17; break; case 4: nMessage = 18; break; case 5: nMessage = 19; break; case 6: nMessage = 20; break; case 7: nMessage = 21; break; case 8: nMessage = 22; break; } /*ManageData(); * SaveData();*/ myAchievements = new AchievementsData(); if (GameStateXML.IfFileExist("Achievements.xml")) { LoadAchievements(); } else { CreateAchievements(); } }
public void SaveData() { ManageData(); _data = GameStateXML.SerializeObject(myData, "ManagerData"); GameStateXML.CreateXML("Test.xml", _data); }