コード例 #1
0
 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);
 }
コード例 #2
0
 public static bool LoadPNJs(string planetName)
 {
     PNJs = (List <PositionKey>)StreamingAssetAccessor.Deserialize("Save/" + planetName + "PNJs.gd");
     return(PNJs != null);
 }
コード例 #3
0
 public static bool LoadCitizens(string planetName)
 {
     CitizensID = (List <PositionID>)StreamingAssetAccessor.Deserialize("Save/" + planetName + "CitizensSave.gd");
     return(CitizensID != null);
 }
コード例 #4
0
 public static bool LoadCells(string planetName)
 {
     BaseCells = (List <SaveCell>)StreamingAssetAccessor.Deserialize("Save/" + planetName + "Save.gd");
     return(BaseCells != null);
 }