static int GetLuaResource(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 4); ResourceLoadManager obj = (ResourceLoadManager)LuaScriptMgr.GetNetObjectSelf(L, 1, "ResourceLoadManager"); string arg0 = LuaScriptMgr.GetLuaString(L, 2); DelegateLoadComplete arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (DelegateLoadComplete)LuaScriptMgr.GetNetObject(L, 3, typeof(DelegateLoadComplete)); } else { LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 3); arg1 = (param0, param1) => { int top = func.BeginPCall(); LuaScriptMgr.Push(L, param0); LuaScriptMgr.PushVarObject(L, param1); func.PCall(top, 2); func.EndPCall(top); }; } bool arg2 = LuaScriptMgr.GetBoolean(L, 4); Object o = obj.GetLuaResource(arg0, arg1, arg2); LuaScriptMgr.Push(L, o); return(1); }
public Object GetConfigResource(string vPath, DelegateLoadComplete callback = null, bool isCache = true) { Object result = ResourceLoadManagerBase.Instance.BaseGetResources(vPath, typeof(Object)); if (vPath.Contains("Config/")) { TextAsset conf = result as TextAsset; if (vPath.Contains("GoodsAttr")) { _configByteList.Add(vPath, conf.bytes); } else { if (!_configTextList.ContainsKey(vPath)) { _configTextList.Add(vPath, conf.text); } } if (callback != null) { callback(vPath, result); } } else { callback(vPath, result); } return(result); }
public Object GetLuaResource(string vPath, DelegateLoadComplete callback = null, bool isCache = true) { return(ResourceLoadManagerBase.Instance.GetLua(vPath)); }