예제 #1
0
        public ItemHeaderData copy()
        {
            //Debug.Log(data.uid +" , "+range.y);
            ItemHeaderData newData = new ItemHeaderData();

            newData.uid = getId();
            newData.qty = getQuantity();
            return(newData);
        }
예제 #2
0
        public ItemHeaderData split(int splitQty)
        {
            if (remove(splitQty))
            {
                ItemHeaderData ii = copy();
                ii.qty = splitQty;
                return(ii);
            }

            return(null);
        }
예제 #3
0
        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);
        }