public IInventorySlot_CommandLogic DoCreate_LibraryLogic_Command(EInventorySlot_CommandEvent eEvent, EInventory_CommandLogicName eLogic, EInventorySlot_CommandEvent eEventUndo = EInventorySlot_CommandEvent.None) { IInventorySlot_CommandLogic pLogic = null; switch (eLogic) { case EInventory_CommandLogicName.Instantiate_CloneSlot: pLogic = new Instantiate_CloneSlot(); break; default: Debug.LogError("Error - Not Found Logic"); return(null); } list_CommandLogic.Add(new InventorySlot_CommandLogic(eEvent, eEventUndo, pLogic)); return(pLogic); }
protected void ExecuteLogic_Command(EInventorySlot_CommandEvent eEvent, PointerEventData pPointerEventData) { if (_mapSlotLogic_Command.TryGetValue(eEvent, out var listLogic)) { for (int i = 0; i < listLogic.Count; i++) { listLogic[i].pLogic.IInventorySlot_CommandLogic(this, pPointerEventData); } } if (_mapSlotLogic_Command_Undo.TryGetValue(eEvent, out listLogic)) { for (int i = 0; i < listLogic.Count; i++) { listLogic[i].pLogic.IInventorySlot_CommandLogic_Undo(this, pPointerEventData); } } }
public InventorySlot_CommandLogic(EInventorySlot_CommandEvent eEvent, EInventorySlot_CommandEvent eEvent_Undo, IInventorySlot_CommandLogic pLogic) { this.eEvent = eEvent; this.pLogic = pLogic; this.eEvent_Undo = eEvent_Undo; }