IEnumerator AutoSave() { yield return(new WaitForSeconds(30)); SaveLoadJson.SaveData(); StartCoroutine(AutoSave()); }
void Start() { jsonSavePath = Application.persistentDataPath + "/cuberunner.json"; Debug.Log(jsonSavePath); if (File.Exists(jsonSavePath)) { SaveLoadJson.LoadData(); } }
void Start() { jsonSavePath = Application.persistentDataPath + "/lemonadestand.json"; Debug.Log(jsonSavePath); if (File.Exists(jsonSavePath)) { SaveLoadJson.LoadData(); } StartCoroutine(AutoSave()); }
public List <Actor> GetClasses() { var result = new List <Actor>(); var classes = SaveLoadJson.GetAllClasses(); foreach (var item in classes) { result.Add(item); } return(result); }
private void CreateNewHero_Click(object sender, RoutedEventArgs e) { player.Name = NewHeroNameTB.Text; player.CharacterClass = CharacterClassesCB.SelectedValue.ToString(); player.Strength = StringFunctions.StringToInteger(ClassStrengthTB.Text); player.Intelligence = StringFunctions.StringToInteger(ClassIntelligenceTB.Text); player.Dexterity = StringFunctions.StringToInteger(ClassDexterityTB.Text); player.Vitality = StringFunctions.StringToInteger(ClassVitalityTB.Text); player.Speed = StringFunctions.StringToInteger(ClassSpeedTB.Text); SaveLoadJson.SaveNewHero(player); Application.Current.Properties["PageData"] = player.Name; var nav = GetNavService(); nav.Navigate(new Uri("Travel.xaml", UriKind.RelativeOrAbsolute)); }
void Start() { item = this; SaveLoadJson.Load(); for (int i = 0; i < BauEspacos.Length; i++) { if (colecao == 0) { transform.localPosition = InvEspacos[espacoAtual]; Controlador.invEspacosContem[espacoAtual] = true; } else { transform.localPosition = BauEspacos[espacoAtual]; Controlador.bauEspacosContem[espacoAtual] = true; } } }
void GameOver() { SceneManager.LoadScene(0); SaveLoadJson.SaveData(); }
public void ClickTheButton() { SaveLoadJson.SaveData(); }
private void InitPlayer() { player = SaveLoadJson.LoadHero(Application.Current.Properties["PageData"].ToString()); }