public StatBlock getCopy() { StatBlock statCopy = new StatBlock (); statCopy.stability = stability; statCopy.energy = energy; statCopy.fluid = fluid; statCopy.durability = durability; statCopy.capacitance = capacitance; statCopy.volume = volume; statCopy.aptitude = aptitude; statCopy.precision = precision; return statCopy; }
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"); }