Exemple #1
0
        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);
        }
Exemple #2
0
        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);
                }
            }
        }
Exemple #3
0
 public InventorySlot_StateLogic(EInventorySlot_StateEvent eStateEvent, EInventorySlot_StateEvent eStateEvent_Undo, IInventorySlot_StateLogic pStateLogic)
 {
     this.eEvent = eStateEvent; this.pLogic = pStateLogic; this.eEvent_Undo = eStateEvent_Undo;
 }