예제 #1
0
        public InventoryItem invItem()
        {
            InventoryItem inv = new InventoryItem();
            inv.setInvItem( item.id, item.quantity);

            return inv;
        }
예제 #2
0
        public void createFromItem(InventoryItem keyItem, ItemLibrary items)
        {
            //this fills the "item" variable in this part
            item = new InventoryItem ();
            item.setInvItem (keyItem.id, keyItem.quantity);

            nodes = items.getItemAttachments (keyItem.id);
            baseStats = items.getItemStats (keyItem.id);

            currentPower = 0.0f;
            currentHealth = baseStats.stability;
            powerIn = 0.0f; //we will take this if needed
            powerOut = 0.0f; //we will put power here if we have extra
            type = items.getItemType (keyItem.id);

            Debug.Log ("LLLAAAMMAAASS");
        }
예제 #3
0
 public void reset(int newID, int newQuant)
 {
     destroyAtThisTime = Time.time + lifeTime;
     item = new InventoryItem();
     item.setInvItem (newID, newQuant);
 }