Ejemplo n.º 1
0
 /// <summary>
 /// Used for loading in the hero's inventory when restoring a saved game 
 /// </summary>
 /// <param name="saveStruct">An int[] representation of inventory to load</param>
 public void loadSaveStructure(InventorySave saveStruct)
 {
     if (saveStruct.items.Length <= this.items.Length)
         saveStruct.items.CopyTo(this.items, 0);
     if (saveStruct.order.Length <= this.order.Length)
         saveStruct.order.CopyTo(this.order, 0);
     this.numTypes = saveStruct.numTypes;
     this.total = saveStruct.total;
 }