public void CreateFunc(FuncType type) { if (curFuncType != type) { if (m_CurFunc != null) { m_CurFunc.RemoveFunc(); } m_CurFunc = funcTypes[type].CreateFunc(); m_CurFuncType = type; } }