public ItemHeaderData copy() { //Debug.Log(data.uid +" , "+range.y); ItemHeaderData newData = new ItemHeaderData(); newData.uid = getId(); newData.qty = getQuantity(); return(newData); }
public ItemHeaderData split(int splitQty) { if (remove(splitQty)) { ItemHeaderData ii = copy(); ii.qty = splitQty; return(ii); } return(null); }
public Vector2 range = new Vector2(0f, -1f); // store capacity //this won't init as 0,-1 but always 0,0 by default ... //Vector2 range; public InventoryItem(string uid) { if (data == null) { data = new ItemHeaderData(); } data.uid = uid; setQuantity(0); }