Exemple #1
0
 public void SetItem(ItemData I, int Q)
 {
     Name = I.Name;
     IconPath = I.IconPath;
     Quantity = Q;
     Lootable = I.Lootable;
     Stackable = I.Stackable;
 }
Exemple #2
0
 public void AddItem(ItemData I)
 {
     //Find first empty slot
     int n = 0;
     while(Inventory[n] != null)
     {
         if (Inventory[n].Name == I.Name && I.Stackable == true) //Item already exists
         {
             Inventory[n].Quantity = Inventory[n].Quantity + I.Quantity;
             break;
         }
         n++;
     }
     if (Inventory[n] == null) //This means it is a new item
     {
         Inventory[n] = new ItemData();
         Inventory[n].SetItem(I, I.Quantity);
     }
 }
Exemple #3
0
 public void ItemList()
 {
     Items[0] = new ItemData();
     Items[0].InitializeItem("Crab Meat", 0, "GFX/Items/meat1.bmp", true, true);
 }