public void Save() { if (!isServer) { return; } // Save all tile layers to file. TileMap.SaveAll(); // Save the player inventory: // This will only save the host's inventory. TODO support other clients saving inventory data. InventoryIO.SaveInventory(RealityName); // Save current gear held and worn by local player. TODO see above. InventoryIO.SaveGear(RealityName, Player.Local); // Save currently held item. TODO see above. InventoryIO.SaveHolding(RealityName, Player.Local); // Save player state (position, health, etc.) PlayerIO.SavePlayerState(RealityName, Player.Local); // Save all world items to file. ItemIO.ItemsToFile(RealityName, GameObject.FindObjectsOfType <Item>()); // Save placed furniture... FurnitureIO.SaveFurniture(RealityName, Furniture.GetAllFurniture()); // Save the building inventory... BuildingIO.SaveBuildingInventory(RealityName, Player.Local); // Save the world state to file. WorldIO.SaveWorldState(this); }
public void Load() { if (!isServer) { return; } // Load world state from file. WorldIO.LoadWorldState(this); // Load player state (position, health, etc.) PlayerIO.LoadPlayerState(RealityName, Player.Local); // Load all world items to map. ItemIO.FileToWorldItems(RealityName, true); // Load the player inventory. // This will only load the host's inventory. TODO support other clients loading inventory data. InventoryIO.LoadInventory(RealityName); // Save current gear held and worn by local player. TODO see above. InventoryIO.LoadGear(RealityName, Player.Local); // Load currently held item. TODO see above. InventoryIO.LoadHolding(RealityName, Player.Local); // Load furniture... FurnitureIO.LoadFurniture(this); // Load player building inventory... BuildingIO.LoadBuildingInventory(RealityName, Player.Local); // No need to load tile layers, this is done all the time passively. // Call post-load PostLoad(); }
public static void delete_book(string del) { InventoryIO.deletLine_book(del); }
public static List <Book> Search_book(string name) { return(InventoryIO.SearchRecord_book(name)); }
public static List <Book> ListAll_Books() { return(InventoryIO.ListBooks()); }
public static void deserializationObject_book(List <Book> book) { InventoryIO.deserializationObject(book); }
public static void saveRecord_text(Book book) { InventoryIO.saveRecord(book); }
public static void serializationObject_book() { InventoryIO.serializationObject(); }
public void AddToInventory(string id) { content.Add(id); InventoryIO.Save(content); }
// Use this for initialization void Start() { cache = FindObjectOfType <SoundModelCache>(); content = InventoryIO.Load(); }
public static void Delete_lastLineSoft() { InventoryIO.Delete_lastLine_soft(); }
public static void delet_software(string del) { InventoryIO.deletLine_software(del); }
public static List <Software> Search_soft(string name) { return(InventoryIO.SearchRecord_soft(name)); }
public static List <Software> ListSoftware() { return(InventoryIO.ListSoftware()); }
public static void saveRecord_text(Software soft) { InventoryIO.saveRecord(soft); }
public static void Delete_lastLineBook() { InventoryIO.Delete_lastLine(); }
public static bool ID_Validation_Uniq_ISBN(string id) { return(InventoryIO.ID_Validation_Uniq(id)); }
public static void WriteXML_List_book(Book books) { InventoryIO.WriteXML_List(books); }