public void DoInit_SlotLogic(InventoryLogicFactory pLogicFactory) { _arrSlotLogic_State = pLogicFactory.list_StateLogic.ToArray(); _listSlotInstance.ForEach(p => p.DoInit_SlotStateLogic(_arrSlotLogic_State)); _arrSlotLogic_Command = pLogicFactory.list_CommandLogic.ToArray(); _listSlotInstance.ForEach(p => p.DoInit_SlotCommandLogic(_arrSlotLogic_Command)); }
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; }