public static bool LoadPlayer(string saveName) { BasePlayerPos.Clear(); BasePlayerPos = (List <SavePlayerPosition>)StreamingAssetAccessor.Deserialize("Save/" + saveName + "PlayerSave.gd"); foreach (SavePlayerPosition ps in BasePlayerPos) { if (!EarthManager.Instance.playerPositions.ContainsKey(ps.player)) { EarthManager.Instance.playerPositions.Add(ps.player, new KeyValuePair <int, Vector3>(ps.cellID, new Vector3(ps.X, ps.Y, ps.Z))); } else { EarthManager.Instance.playerPositions[ps.player] = new KeyValuePair <int, Vector3>(ps.cellID, new Vector3(ps.X, ps.Y, ps.Z)); } } return(BasePlayerPos != null); }
public static bool LoadPNJs(string planetName) { PNJs = (List <PositionKey>)StreamingAssetAccessor.Deserialize("Save/" + planetName + "PNJs.gd"); return(PNJs != null); }
public static bool LoadCitizens(string planetName) { CitizensID = (List <PositionID>)StreamingAssetAccessor.Deserialize("Save/" + planetName + "CitizensSave.gd"); return(CitizensID != null); }
public static bool LoadCells(string planetName) { BaseCells = (List <SaveCell>)StreamingAssetAccessor.Deserialize("Save/" + planetName + "Save.gd"); return(BaseCells != null); }