Example #1
0
        private void OnEnable()
        {
            if (_pInventory.bIsExecute_Awake == false)
            {
                _pInventory.EventAwake();
            }

            _pInventory.DoClearData();
            _pInventory.DoAddRangeData(listSomthingData.ToArray());

            _pInventory.OnSwap_Slot += _pInventory_OnSwap_Slot;
            _pInventory.OnSwap_Slot_OtherInventory -= Inventory_OnSwap_OtherInventory;
            _pInventory.OnSwap_Slot_OtherInventory += Inventory_OnSwap_OtherInventory;
        }
        private void OnEnable()
        {
            if (_pInventory.bIsExecute_Awake == false)
            {
                _pInventory.EventAwake();
            }

            _pInventory.DoClearData();
            _pInventory.DoAddRangeData(listSomthingData.ToArray());

            InventoryLogicFactory pLogicFactory = new InventoryLogicFactory();
            var pLogic = pLogicFactory.DoCreate_LibraryLogic_Command(InventorySlot.EInventorySlot_CommandEvent.OnDragBegin, EInventory_CommandLogicName.Instantiate_CloneSlot, InventorySlot.EInventorySlot_CommandEvent.OnDragEnd);
            Instantiate_CloneSlot pInstantiateLogic = pLogic as Instantiate_CloneSlot;

            pInstantiateLogic.DoInit((p => p.GetComponent <Image>().enabled = false), null);

            _pInventory.DoInit_SlotLogic(pLogicFactory);
            _pInventory.OnSwap_Slot += _pInventory_OnSwap_Slot;

            _pInventory.OnSwap_Slot_OtherInventory += Inventory_OnSwap_OtherInventory;
        }