Пример #1
0
 public virtual void Init(long _id)
 {
     id        = _id;
     isRunning = true;
     name      = GetType().ToString();
     alr       = new AssetLoadRecord(name);
     logInfo   = Utility.MergeString(name, "'s LogMsg = ");
     Log("模块启动!");
 }
Пример #2
0
 static int Destroy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         GameFramework.AssetLoadRecord obj = (GameFramework.AssetLoadRecord)ToLua.CheckObject <GameFramework.AssetLoadRecord>(L, 1);
         obj.Destroy();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
 static int LoadInstantiateGameObject(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         GameFramework.AssetLoadRecord obj = (GameFramework.AssetLoadRecord)ToLua.CheckObject <GameFramework.AssetLoadRecord>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         UnityEngine.GameObject o = obj.LoadInstantiateGameObject(arg0);
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #4
0
 static int LoadLuaFileBytes(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         GameFramework.AssetLoadRecord obj = (GameFramework.AssetLoadRecord)ToLua.CheckObject <GameFramework.AssetLoadRecord>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         LuaInterface.LuaByteBuffer o = obj.LoadLuaFileBytes(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #5
0
 static int LoadText(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         GameFramework.AssetLoadRecord obj = (GameFramework.AssetLoadRecord)ToLua.CheckObject <GameFramework.AssetLoadRecord>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         string o    = obj.LoadText(arg0);
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #6
0
    static int get_name(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GameFramework.AssetLoadRecord obj = (GameFramework.AssetLoadRecord)o;
            string ret = obj.name;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index name on a nil value"));
        }
    }
Пример #7
0
    static int _CreateGameFramework_AssetLoadRecord(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                string arg0 = ToLua.CheckString(L, 1);
                GameFramework.AssetLoadRecord obj = new GameFramework.AssetLoadRecord(arg0);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GameFramework.AssetLoadRecord.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }