コード例 #1
0
        private void DropItem()
        {
            Image.gameObject.SetActive(false);
            var trans = new ItemTransaction();

            trans.SetData(itemData, false);
            transactionController.StartTransaction(trans);
        }
コード例 #2
0
        public void PickElement(ItemComponent item)
        {
            if (item.ItemData.Id > ItemSlots.Length - 1)
            {
                Debug.Log("No slot for item");
                return;
            }

            item.gameObject.transform.parent = ItemSlots[item.ItemData.Id].transform;
            item.Pick();

            items[item.ItemData.ItemType] = item;

            var action = new ItemTransaction();

            action.SetData(item.ItemData, true);

            transactionController.StartTransaction(action);
        }