public void Load(PosSave save, List <TeleportSave> teleportSaves) { knowMap.BanditMap(); ActiveMap = save.World; if (WorldChildren.Find(m => m.name == save.Map) != null && WorldChildren.Find(m => m.name == save.Map).GetComponent <Map>() is Map saveMap) { WorldChange(save.World, saveMap.GetComponent <Tilemap>()); } else { foreach (Transform isMap in WorldChildren) { if (isMap.GetComponent <Map>() is Map map) { WorldChange(save.World, map.GetComponent <Tilemap>()); break; } } } Player.transform.position = save.Pos; foreach (TeleportSave teleSave in teleportSaves) { foreach (TelePortLocation teleLocation in TelePortLocations) { teleLocation.CanTelePortTo.LoadThis(teleSave); } } }
public FullSave(PlayerSave player, PosSave pos, List <DormSave> dorm, HomeSave parHome, VoreSaves vore, List <TeleportSave> teleportSaves) { this.playerPart = player; this.posPart = pos; this.dormPart = dorm; this.datePart = DateSystem.Save; this.homePart = parHome; this.voreSaves = vore; this.questSave = QuestsSystem.Save; this.playerFlags = PlayerFlags.Save(); this.teleportSaves = teleportSaves; this.gameManager = GameManager.Save(); }
public string SaveData() { PlayerSave playerSave = new PlayerSave(Player); List <DormSave> dormSaves = dorm.Save(); PosSave playerPos = new PosSave(Pos.position, MapEvents.ActiveMap, MapEvents.CurrentMap.transform.name); HomeSave homeSave = StartHomeStats.Save(); VoreSaves voreSaves = voreChar.Save; FullSave fullSave = new FullSave(playerSave, playerPos, dormSaves, homeSave, voreSaves, MapEvents.GetMapEvents.GetTeleportSaves()); Debug.Log(JsonUtility.ToJson(fullSave)); return(JsonUtility.ToJson(fullSave)); }
void Awake() { logger = DialogueManager.FindObjectOfType <DialogueManager>(); iMan = ItemManager.FindObjectOfType <ItemManager>(); positioner = PosSave.FindObjectOfType <PosSave>(); }
void Awake() { myPos = PosSave.FindObjectOfType <PosSave>(); thePlaya = Player.FindObjectOfType <Player>(); }
void Awake() { dialogueMan = DialogueManager.FindObjectOfType <DialogueManager>(); itemMan = ItemManager.FindObjectOfType <ItemManager>(); posser = PosSave.FindObjectOfType <PosSave>(); }