public static T GetManager <T>() where T : class { if (typeof(T) == typeof(ConfigManager)) { return(BaseBehaviour.configMgr as T); } else if (typeof(T) == typeof(TableManager)) { return(BaseBehaviour.tableMgr as T); } return(BaseBehaviour.GetManager <T>()); }
static int GetManager(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); FirClient.Manager.BaseManager o = BaseBehaviour.GetManager(arg0); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static BaseManager GetManager(string managerName) { return(BaseBehaviour.GetManager(managerName)); }
// 获取manager public static T GetManager <T>() where T : class { return(BaseBehaviour.GetManager <T>()); }