public IInventorySlot_StateLogic DoCreate_LibraryLogic_State(EInventorySlot_StateEvent eEvent, EInventory_StateLogicName eLogic, EInventorySlot_StateEvent eEventUndo = EInventorySlot_StateEvent.None) { IInventorySlot_StateLogic pLogic = null; switch (eLogic) { default: Debug.LogError("Error - Not Found Logic"); return(null); } if (pLogic != null) { list_StateLogic.Add(new InventorySlot_StateLogic(eEvent, eEventUndo, pLogic)); } return(pLogic); }
protected void ExecuteLogic_State(EInventorySlot_StateEvent eEvent) { if (_mapSlotLogic_State.TryGetValue(eEvent, out var listLogic)) { for (int i = 0; i < listLogic.Count; i++) { listLogic[i].pLogic.IInventorySlot_StateLogic(this); } } if (_mapSlotLogic_State_Undo.TryGetValue(eEvent, out listLogic)) { for (int i = 0; i < listLogic.Count; i++) { listLogic[i].pLogic.IInventorySlot_StateLogic_Undo(this); } } }
public InventorySlot_StateLogic(EInventorySlot_StateEvent eStateEvent, EInventorySlot_StateEvent eStateEvent_Undo, IInventorySlot_StateLogic pStateLogic) { this.eEvent = eStateEvent; this.pLogic = pStateLogic; this.eEvent_Undo = eStateEvent_Undo; }