示例#1
0
 public void clearInventory()
 {
     inventory = new Dictionary <string, int>();
     for (int i = 0; i < WeaponItem.numWeaponTypes; i++)
     {
         ItemAbstract item = ItemDefinitions.intToItem(i);
         inventory[ItemDefinitions.itemToString(item)] = 0;
     }
     for (int i = 0; i < EngineItem.numEngineTypes; i++)
     {
         ItemAbstract item = ItemDefinitions.intToItem(i + WeaponItem.numWeaponTypes);
         inventory[ItemDefinitions.itemToString(item)] = 0;
     }
     inventoryDisplay.GetComponent <ItemListHandler>().removeAllItems();
 }