Example #1
0
        public void UnRegisterChangeLayerState(FSM_LAYER_ID eLayer, deleStateTransEvent _deleFunc)
        {
            if (!dicLayerChangeState.ContainsKey(eLayer))
            {
                return;
            }

            dicLayerChangeState[eLayer].Remove(_deleFunc);


            foreach (Dictionary <FSM_ID, FSM> dic in dicFSM_EachLayer)
            {
                foreach (FSM fsm in dic.Values)
                {
                    fsm.EventStateChange -= _deleFunc;
                }
            }
        }
Example #2
0
        public void RegisterEventChangeLayerState(FSM_LAYER_ID eLayer, deleStateTransEvent _deleFunc)
        {
            layerNum = (int)eLayer;
            if (layerNum >= iMaxLayer)
            {
                UDL.LogError("할당 되지 않은 레이어를 호출했습니다", nLogOption, errorLoglv);
                return;
            }

            if (!dicLayerChangeState.ContainsKey(eLayer))
            {
                dicLayerChangeState.Add(eLayer, new List <deleStateTransEvent>());
            }

            dicLayerChangeState[eLayer].Add(_deleFunc);

            int result = RegisterToFSM_ChangeLayerState(eLayer);

            if (result == 1)
            {
                UDL.LogWarning(eLayer + " " + errMsgAbout_Register_ChangeLayerState[result] + " // 이 후 해당 레이어에 ChangeFSM이 호출 될 때 반영될 수 있습니다. ", nLogOption, warningLoglv);
            }
        }