static public void UnregediStateCallBack(string stateMachineName, string stateName, StateCallBackType type, StateHandle handle) { if (!states.ContainsKey(stateMachineName + stateName)) { return; } if (type == StateCallBackType.TypeOnEnter) { states[stateMachineName + stateName].onEnter += handle; } else if (type == StateCallBackType.TypeOnExcute) { states[stateMachineName + stateName].onExcute += handle; } else if (type == StateCallBackType.TypeOnExit) { states[stateMachineName + stateName].onExit += handle; } }
public static void UnregediStateCallBack(string stateMachineName, string stateName, StateCallBackType type, StateHandle handle) { if (!states.ContainsKey(stateMachineName + stateName)) { return; } if (type == StateCallBackType.TypeOnEnter) { states[stateMachineName + stateName].onEnter += handle; } else if (type == StateCallBackType.TypeOnExcute) { states[stateMachineName + stateName].onExcute += handle; } else if (type == StateCallBackType.TypeOnExit) { states[stateMachineName + stateName].onExit += handle; } }
static public void RegediStateCallBack(string stateMachineName, string stateName, StateCallBackType type, StateHandle handle) { Init(); if (!states.ContainsKey(stateMachineName + stateName)) { states.Add(stateMachineName + stateName, new State(stateName)); } if (type == StateCallBackType.TypeOnEnter) { states[stateMachineName + stateName].onEnter += handle; } else if (type == StateCallBackType.TypeOnExcute) { states[stateMachineName + stateName].onExcute += handle; } else if (type == StateCallBackType.TypeOnExit) { states[stateMachineName + stateName].onExit += handle; } }
public static void RegediStateCallBack(string stateMachineName, string stateName, StateCallBackType type, StateHandle handle) { Init(); if (!states.ContainsKey(stateMachineName + stateName)) { states.Add(stateMachineName + stateName, new State(stateName)); } if(type == StateCallBackType.TypeOnEnter) { states[stateMachineName + stateName].onEnter += handle; } else if (type == StateCallBackType.TypeOnExcute) { states[stateMachineName + stateName].onExcute += handle; } else if (type == StateCallBackType.TypeOnExit) { states[stateMachineName + stateName].onExit += handle; } }