private void Loadme(SaveGameData savegame) { if (savegame != null && gameObject.scene.buildIndex == savegame.currentLevel) { isActive = savegame.FindObjectById(gameObject.name) == null; } }
private void Saveme(SaveGameData savegame) { if (savegame.FindObjectById(gameObject.name) == null && !isActive) { SaveObject saveObject = new SaveObject(); saveObject.Id = gameObject.name; saveObject.Tag = gameObject.tag; savegame.saveObject.Add(saveObject); } }
private void Saveme(SaveGameData savegame) { if (savegame.FindObjectById(gameObject.name) == null && doorAnimator.GetBool("isOpenTriggered")) { SaveObject saveObject = new SaveObject(); saveObject.Id = gameObject.name; saveObject.Tag = gameObject.tag; savegame.saveObject.Add(saveObject); } }
private void Loadme(SaveGameData savegame) { if (savegame != null && gameObject.scene.buildIndex == savegame.currentLevel) { SaveObject saveObject = savegame.FindObjectById(gameObject.name); if (saveObject != null) { HandleDoorSwitch(true); } } }
private void Loadme(SaveGameData savegame) { if (savegame != null && gameObject.scene.buildIndex == savegame.currentLevel) { SaveObject saveObject = savegame.FindObjectById(gameObject.name); switch ((saveObject != null) ? saveObject.Tag : "") { case "barrel": transform.position = saveObject.Position; break; } } }
private void Saveme(SaveGameData savegame) { SaveObject saveObject = savegame.FindObjectById(gameObject.name); if (saveObject == null) { saveObject = new SaveObject(); UpdateSaveObject(saveObject); savegame.saveObject.Add(saveObject); } else { UpdateSaveObject(saveObject); } }