public override void Load() { foreach (GameObject rotatableGmObj in listRotatableGmObj) { rotatableGmObj.transform.forward = SaveLoadComponentAndLocalStorage.Get(this, rotatableGmObj + "normal").Vector3ToStorage; } }
public override void Save() { base.Save(); locaStorage.HealthAndDeath.Health = currentHealth; SaveLoadComponentAndLocalStorage.Set(this, "healthAndDeath", locaStorage); }
public override void Save() { foreach (GameObject rotatableGmObj in listRotatableGmObj) { SaveLoadComponentAndLocalStorage.Set(this, rotatableGmObj + "normal", new LocalStorage(rotatableGmObj.transform.forward)); } }
public override void Load() { try { transform.forward = SaveLoadComponentAndLocalStorage.Get(this, transform.root + "normal").Vector3ToStorage; } catch { } }
public override void Save() { try { SaveLoadComponentAndLocalStorage.Set(this, transform.root + "normal", new LocalStorage(transform.forward)); } catch { } }
public override void Save() { try { SaveLoadComponentAndLocalStorage.Set(this, "position", new LocalStorage(transform.position)); SaveLoadComponentAndLocalStorage.Set(this, "normal", new LocalStorage(transform.forward)); } catch { } }
public override void Load() { locaStorage = SaveLoadComponentAndLocalStorage.Get(this, "healthAndDeath"); death = locaStorage.HealthAndDeath.Death; if (death) { DeathRoot(); } }
public override void Save() { SaveLoadComponentAndLocalStorage.Set(this, rotatable + "normal", new LocalStorage(rotatable.transform.eulerAngles)); foreach (GameObject active in noActiveObjects) { SaveLoadComponentAndLocalStorage.Set(this, active + "active", new LocalStorage(active.activeInHierarchy)); } foreach (GameObject active in activeObjects) { SaveLoadComponentAndLocalStorage.Set(this, active + "active", new LocalStorage(active.activeInHierarchy)); } }
public override void Load() { rotatable.transform.eulerAngles = SaveLoadComponentAndLocalStorage.Get(this, rotatable + "normal").Vector3ToStorage; bool hidden; foreach (GameObject active in noActiveObjects) { hidden = SaveLoadComponentAndLocalStorage.Get(this, active + "active").Bool; active.SetActive(hidden); } foreach (GameObject active in activeObjects) { hidden = SaveLoadComponentAndLocalStorage.Get(this, active + "active").Bool; active.SetActive(hidden); } }
public void DeathRoot() { death = true; locaStorage.HealthAndDeath.Death = death; SaveLoadComponentAndLocalStorage.Set(this, "healthAndDeath", locaStorage); //SaveLoadComponentAndLocalStorage.Remove(this); GameObject destroy; if (destroyRoot) { destroy = transform.root.gameObject; } else { destroy = gameObject; } Destroy(destroy); }
public override void Save() { locaStorage.HealthAndDeath.Death = death; SaveLoadComponentAndLocalStorage.Set(this, "healthAndDeath", locaStorage); }
private void OnDestroy() { SaveLoadComponentAndLocalStorage.RemoveDictionary(this, transform.root + "normal"); }