public void ResetStory() { lastText = ""; for (int i = 0; i < tagsToSave.Length; i++) { tagsToSave[i] = ""; } if (!Application.isPlaying) { //PlayerPrefs.SetString(inkStoryObject.storyName + "savedInkStory", ""); ES3.DeleteKey(inkStoryObject.storyName + "savedInkStory"); } else { int childCount = textArea.transform.childCount; for (int i = childCount - 1; i >= 0; --i) { GameObject.Destroy(textArea.transform.GetChild(i).gameObject); } //PlayerPrefs.SetString(inkStoryObject.storyName + "savedInkStory", ""); ES3.DeleteKey(inkStoryObject.storyName + "savedInkStory"); DisablePortraits(); DisableBackgrounds(); StartStory(); } }
public void Save() { // If we're using caching and we've not already cached this file, cache it. if (settings.location == ES3.Location.Cache && !ES3.FileExists(settings)) { ES3.CacheFile(settings); } if (autoSaves == null || autoSaves.Count == 0) { ES3.DeleteKey(key, settings); } else { var gameObjects = new List <GameObject>(); foreach (var autoSave in autoSaves) { // If the ES3AutoSave component is disabled, don't save it. if (autoSave.enabled) { gameObjects.Add(autoSave.gameObject); } } ES3.Save <GameObject[]>(key, gameObjects.ToArray(), settings); } if (settings.location == ES3.Location.Cache && ES3.FileExists(settings)) { ES3.StoreCachedFile(settings); } }
public void ResetGame() { //PlayerPrefs.SetInt("ClayDemo_hasSaved", 0); ES3.DeleteKey("ClayDemo_HasSaved"); FindObjectOfType <InkWriter> ().ResetStory(); InkWriter.main.ResetStory(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); }
public void RemoveAllSettings() { string[] keys = ES3.GetKeys(); for (int i = 0; i < keys.Length; i++) { ES3.DeleteKey(keys[i]); } }
public void ClearAllPurchases() { foreach (var car in CarCache) { car.IsOwned.SetValue(false); ES3.DeleteKey(car.ProductId); } }
void ResetAll() { ES3.DeleteKey("LDJam47_HasSaved"); ES3.DeleteKey("LDJam47_CurrentLevel"); ES3.DeleteKey("LDJam47_CurrentXP"); InkWriter.main.ResetStory(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); }
public void StartNewGame() { AudioManager.sharedInstance.UISelect(); ES3.DeleteKey("posicao"); ES3.DeleteKey("rotacao"); ES3.DeleteKey("energia"); SceneManager.LoadScene(2); }
private void DestroyCurrentQuest() { ES3.DeleteKey("HasCleard_" + currentQuest.id); questList.Remove(currentQuest); Destroy(currentQuest.gameObject); notificationManager.RefreshNotifications(questList); }
public void ReturnLobby() { if (ES3.FileExists("WeaponList.es3")) { var keys = ES3.GetKeys("WeaponList.es3"); for (int i = 0; i < keys.Length; i++) { if (ES3.KeyExists(i.ToString(), "WeaponList.es3")) { ES3.DeleteKey(i.ToString(), "WeaponList.es3"); } } } if (this.weaponParent == null) { this.weaponParent = GameObject.Find("GunSlot").transform; } weaponList.Clear(); GameObject weaponObj; CWeapon weapon; if (ES3.KeyExists("BaseGun", "Weapon.es3")) { string weaponName = ES3.Load <string>("BaseGun", "Weapon.es3"); weaponObj = GameObject.Instantiate(CResourceManager.Instance.GetObjectForKey("Prefabs/Gun/" + weaponName), this.weaponParent); weapon = weaponObj.GetComponent <CWeapon>(); weapon.gunName = weaponName; } else { weaponObj = GameObject.Instantiate(CResourceManager.Instance.GetObjectForKey("Prefabs/Gun/DAKGUN"), this.weaponParent); weapon = weaponObj.GetComponent <CWeapon>(); weapon.gunName = "DAKGUN"; } weapon.SetGunImageSetting(); bulletArray[0] = weapon.GetMaxBullet(); for (int i = 1; i < bulletArray.Length; i++) { bulletArray[i] = -1; } if (this.weaponParent == null) { this.weaponParent = GameObject.Find("GunSlot").transform; } this.SetCurrentWeapon(weapon); this.AddWeapon(weapon); ES3.Save <int>("CurrentWeaponIndex", this.currentWeaponIndex, "Weapon.es3"); ES3.Save <string>("BaseGun", weapon.gunName, "Weapon.es3"); }
// Creates a new Story object with the compiled story which we can then play! public void StartStory() { HideCanvas(false); if (clearOnNewStory) { ClearChildren(); } lastText = ""; lastSaveableTags = ""; story = new ClayStory(inkStoryObject.inkJsonAsset.text); inkStoryObject.Init(); //string savedJson = PlayerPrefs.GetString(inkStoryObject.storyName + "savedInkStory"); string savedJson = ""; if (ES3.KeyExists("LDJam47_HasSaved")) { if (ES3.KeyExists(inkStoryObject.storyName + "savedInkStory")) { savedJson = ES3.Load <string> (inkStoryObject.storyName + "savedInkStory"); } ; if (savedJson != "") { InkWriter.main.story.state.LoadJson(savedJson); Debug.Log("Loading story"); lastText = (string)InkWriter.main.story.variablesState["lastSavedString"]; lastSaveableTags = (string)InkWriter.main.story.variablesState["lastSavedTags"]; Debug.Log("Tags at load point: " + lastSaveableTags); loading = true; if (mainWriter && eventToGoToInCaseOfLoad != "") { GoToKnot(eventToGoToInCaseOfLoad); } ; } else // no saved json -> go to "start" knot { if (mainWriter) { GoToKnot("start"); } ; } } else // no saved json -> go to "start" knot { ES3.DeleteKey(inkStoryObject.storyName + "savedInkStory"); if (mainWriter) { GoToKnot("start"); } ; } InkWriter.main.story.variablesState["debug"] = false; RefreshView(); }
/// <summary> /// 全セーブデータ削除 /// </summary> public static void DeleteAllSaveData() { var keys = ES3.GetKeys() .ToList(); keys.ForEach(key => ES3.DeleteKey(key)); MainUIManager.I.ShowAnnounceMessage("全セーブデータを削除\nしました。(再起動後有効)", 2); }
/// <summary> /// ランキングの削除(正確にはキーを削除するだけだが、これでアクセスできなくなるのでOK) /// </summary> /// <param name="key"></param> /// <param name="filePath"></param> public static void deleteData(string key, string filePath) { //キーが無いのに削除しようとするとIOExceptionを吐くので注意 //キーを削除すればその記録にはアクセスできなくなるし、再度セーブされるときには上書きされる if (ES3.KeyExists(key, filePath)) { ES3.DeleteKey(key, filePath); } }
public void GoToDungeonStatus(int foodcount) { ES3.DeleteKey("dungeonObject"); DungeonStatus ds = new DungeonStatus(SceneStatusManager.Ins); this.Dungeon.food = foodcount; ds.Dungeon = this.Dungeon; ds.cc = this.cc; SceneStatusManager.Ins.SetSceneStatus(ds); }
public override void DeleteSavedGameData(int slotNumber) { if (useSeparateFiles) { ES3.DeleteFile(GetFilename(slotNumber)); } else { ES3.DeleteKey(GetKey(slotNumber), GetFilename(slotNumber)); } }
/* * Deletes all prefab instances from the scene and from the save file. */ public void DeletePrefabs() { // Delete the keys relating to this prefab. ES3.DeleteKey(id); ES3.DeleteKey(id + "count"); // Destroy each created prefab, and then clear the List. for (int i = 0; i < prefabInstances.Count; i++) { Destroy(prefabInstances[i].gameObject); } prefabInstances.Clear(); }
public void NewGame() { PlayerPrefs.DeleteAll(); foreach (var key in ES3.GetKeys()) { ES3.DeleteKey(key); } tutorialQuests.SetQuests(defaultTutorialQuests); quests.SetQuests(defaultQuests); NewGameEvent.Invoke(); }
// Use this for initialization void Start() { if (test && deleteSave) { ES3.DeleteKey("PlayerPosition"); } InitializeStaticClassReferences(); StaticUnpauseGame(); // If there is a save for the current chapter if (ES3.KeyExists("PlayerPosition")) { player.transform.position = ES3.Load <Vector3>("PlayerPosition"); } }
public void Save() { if (autoSaves == null || autoSaves.Count == 0) { ES3.DeleteKey(key, settings); return; } var gameObjects = new List <GameObject>(); foreach (var autoSave in autoSaves) { // If the ES3AutoSave component is disabled, don't save it. if (autoSave.enabled) { gameObjects.Add(autoSave.gameObject); } } ES3.Save <GameObject[]>(key, gameObjects.ToArray(), settings); }
// this function works by deleting all settings keys and then re-applying all settings, which loads their default values public void ResetOptionsToDefault() { ES3.DeleteKey("GlobalVolume", "settings.txt"); ES3.DeleteKey("MusicVolume", "settings.txt"); ES3.DeleteKey("SFXVolume", "settings.txt"); ES3.DeleteKey("XSensitivity", "settings.txt"); ES3.DeleteKey("YSensitivity", "settings.txt"); ES3.DeleteKey("InvertMouseX", "settings.txt"); ES3.DeleteKey("InvertMouseY", "settings.txt"); ES3.DeleteKey("MaxFPS", "settings.txt"); ES3.DeleteKey("ShowFPS", "settings.txt"); ES3.DeleteKey("VSyncType", "settings.txt"); ES3.DeleteKey("AntiAliasingLevel", "settings.txt"); ES3.DeleteKey("AnisotropicFiltering", "settings.txt"); ES3.DeleteKey("EnableShadows", "settings.txt"); ES3.DeleteKey("ShadowDistance", "settings.txt"); ES3.DeleteKey("HeadBob", "settings.txt"); ES3.DeleteKey("FOV", "settings.txt"); ES3.DeleteKey("MotionBlur", "settings.txt"); ES3.DeleteKey("Dithering", "settings.txt"); ES3.DeleteKey("Bloom", "settings.txt"); ES3.DeleteKey("BloomIntensity", "settings.txt"); ES3.DeleteKey("AmbientOcclusion", "settings.txt"); ES3.DeleteKey("AOIntensity", "settings.txt"); ES3.DeleteKey("AORadius", "settings.txt"); ES3.DeleteKey("AOSamples", "settings.txt"); ES3.DeleteKey("AODownsampling", "settings.txt"); ES3.DeleteKey("AOHighPrecision", "settings.txt"); ES3.DeleteKey("Fullscreen", "settings.txt"); ES3.DeleteKey("ConnectionMode", "settings.txt"); ES3.DeleteKey("ShowTPSHax", "settings.txt"); ApplyAllSettings(); }
public void RemoveSetting(string settingName) { ES3.DeleteKey(settingName); }
public override void Enter() { ES3.DeleteKey(key.Value, GetSettings()); }
public void DeleteKey(string keyName) { ES3.DeleteKey(keyName, settings); }
/// <summary> /// Delete the save on current chapter and restart from the beginning /// </summary> public void DeletaSaveAndRestart() { ES3.DeleteKey("PlayerPosition"); LoadCheckPointButton(); }
public static void DeleteBlocksText(int level) { ES3.DeleteKey(STORAGE_KEY.BLOCKS_BY_LEVEL_TEXT + level); }
public void DeleteItem() { ES3.DeleteKey("ItemKey"); }
public void ResetAll() { ES3.DeleteKey("LDJam47_HasSaved"); ES3.DeleteKey("LDJam47_CurrentLevel"); ES3.DeleteKey("LDJam47_CurrentXP"); }
public void DeleteProgress() { ES3.DeleteKey("ProgressKey"); }