Exemplo n.º 1
0
 public void Load()
 {
     player.GetComponent <SaveFunctions>().Load(player.GetComponent <InventoryInstance>().myInv); //load save file
     GameObject[] lootInstances = GameObject.FindGameObjectsWithTag("Loot");                      //find all loot instances
     foreach (GameObject g in lootInstances)                                                      //remove all loot game objects for no duplication, commentify for testing
     {
         Destroy(g);
     }
     inventory.Show(); //close after saving, instead of updating inventory UI
 }
Exemplo n.º 2
0
 public void Save()
 {
     player.GetComponent <SaveFunctions>().Save(player.GetComponent <InventoryInstance>().myInv);; //save when pressing save button
     inventory.Show();                                                                             //close inventory after saving
 }