예제 #1
0
    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);
            }
        }
    }
예제 #2
0
 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();
 }
예제 #3
0
    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));
    }
예제 #4
0
 void Awake()
 {
     logger     = DialogueManager.FindObjectOfType <DialogueManager>();
     iMan       = ItemManager.FindObjectOfType <ItemManager>();
     positioner = PosSave.FindObjectOfType <PosSave>();
 }
예제 #5
0
 void Awake()
 {
     myPos    = PosSave.FindObjectOfType <PosSave>();
     thePlaya = Player.FindObjectOfType <Player>();
 }
예제 #6
0
 void Awake()
 {
     dialogueMan = DialogueManager.FindObjectOfType <DialogueManager>();
     itemMan     = ItemManager.FindObjectOfType <ItemManager>();
     posser      = PosSave.FindObjectOfType <PosSave>();
 }