コード例 #1
0
ファイル: World.cs プロジェクト: Epicguru/NotQuiteDead
    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);
    }
コード例 #2
0
ファイル: World.cs プロジェクト: Epicguru/NotQuiteDead
    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();
    }
コード例 #3
0
 public static void delete_book(string del)
 {
     InventoryIO.deletLine_book(del);
 }
コード例 #4
0
 public static List <Book> Search_book(string name)
 {
     return(InventoryIO.SearchRecord_book(name));
 }
コード例 #5
0
 public static List <Book> ListAll_Books()
 {
     return(InventoryIO.ListBooks());
 }
コード例 #6
0
 public static void deserializationObject_book(List <Book> book)
 {
     InventoryIO.deserializationObject(book);
 }
コード例 #7
0
 public static void saveRecord_text(Book book)
 {
     InventoryIO.saveRecord(book);
 }
コード例 #8
0
 public static void serializationObject_book()
 {
     InventoryIO.serializationObject();
 }
コード例 #9
0
 public void AddToInventory(string id)
 {
     content.Add(id);
     InventoryIO.Save(content);
 }
コード例 #10
0
 // Use this for initialization
 void Start()
 {
     cache   = FindObjectOfType <SoundModelCache>();
     content = InventoryIO.Load();
 }
コード例 #11
0
 public static void Delete_lastLineSoft()
 {
     InventoryIO.Delete_lastLine_soft();
 }
コード例 #12
0
 public static void delet_software(string del)
 {
     InventoryIO.deletLine_software(del);
 }
コード例 #13
0
 public static List <Software> Search_soft(string name)
 {
     return(InventoryIO.SearchRecord_soft(name));
 }
コード例 #14
0
 public static List <Software> ListSoftware()
 {
     return(InventoryIO.ListSoftware());
 }
コード例 #15
0
 public static void saveRecord_text(Software soft)
 {
     InventoryIO.saveRecord(soft);
 }
コード例 #16
0
 public static void Delete_lastLineBook()
 {
     InventoryIO.Delete_lastLine();
 }
コード例 #17
0
 public static bool ID_Validation_Uniq_ISBN(string id)
 {
     return(InventoryIO.ID_Validation_Uniq(id));
 }
コード例 #18
0
 public static void WriteXML_List_book(Book books)
 {
     InventoryIO.WriteXML_List(books);
 }