Пример #1
0
 static int ClearClick(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
     obj.ClearClick();
     return(0);
 }
Пример #2
0
    static int AddToggle(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 3)
        {
            SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
            UIToggle    arg0 = (UIToggle)LuaScriptMgr.GetUnityObject(L, 2, typeof(UIToggle));
            LuaFunction arg1 = LuaScriptMgr.GetLuaFunction(L, 3);
            obj.AddToggle(arg0, arg1);
            return(0);
        }
        else if (count == 4)
        {
            SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
            UIToggle    arg0 = (UIToggle)LuaScriptMgr.GetUnityObject(L, 2, typeof(UIToggle));
            LuaFunction arg1 = LuaScriptMgr.GetLuaFunction(L, 3);
            LuaTable    arg2 = LuaScriptMgr.GetLuaTable(L, 4);
            obj.AddToggle(arg0, arg1, arg2);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: SimpleFramework.LuaBehaviour.AddToggle");
        }

        return(0);
    }
Пример #3
0
    static int LoadAsset(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
            string arg0 = LuaScriptMgr.GetLuaString(L, 2);
            Object o    = obj.LoadAsset(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 3)
        {
            SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
            string arg0 = LuaScriptMgr.GetLuaString(L, 2);
            string arg1 = LuaScriptMgr.GetLuaString(L, 3);
            Object o    = obj.LoadAsset(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: SimpleFramework.LuaBehaviour.LoadAsset");
        }

        return(0);
    }
Пример #4
0
    static int AddClick(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 3 && LuaScriptMgr.CheckTypes(L, 1, typeof(SimpleFramework.LuaBehaviour), typeof(string), typeof(LuaInterface.LuaFunction)))
        {
            SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
            string      arg0 = LuaScriptMgr.GetString(L, 2);
            LuaFunction arg1 = LuaScriptMgr.ToLuaFunction(L, 3);
            obj.AddClick(arg0, arg1);
            return(0);
        }
        else if (count == 3 && LuaScriptMgr.CheckTypes(L, 1, typeof(SimpleFramework.LuaBehaviour), typeof(GameObject), typeof(LuaInterface.LuaFunction)))
        {
            SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
            GameObject  arg0 = (GameObject)LuaScriptMgr.GetLuaObject(L, 2);
            LuaFunction arg1 = LuaScriptMgr.ToLuaFunction(L, 3);
            obj.AddClick(arg0, arg1);
            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: SimpleFramework.LuaBehaviour.AddClick");
        }

        return(0);
    }
Пример #5
0
    static int AddFrameEndCall(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
        LuaFunction arg0 = LuaScriptMgr.GetLuaFunction(L, 2);

        obj.AddFrameEndCall(arg0);
        return(0);
    }
Пример #6
0
    static int RemoveClick(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
        GameObject arg0 = (GameObject)LuaScriptMgr.GetUnityObject(L, 2, typeof(GameObject));

        obj.RemoveClick(arg0);
        return(0);
    }
Пример #7
0
    static int AddClick(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
        GameObject  arg0 = (GameObject)LuaScriptMgr.GetUnityObject(L, 2, typeof(GameObject));
        LuaFunction arg1 = LuaScriptMgr.GetLuaFunction(L, 3);

        obj.AddClick(arg0, arg1);
        return(0);
    }
Пример #8
0
    static int GetGameObject(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
        string     arg0 = LuaScriptMgr.GetLuaString(L, 2);
        GameObject o    = obj.GetGameObject(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Пример #9
0
    static int OnInit(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.LuaBehaviour");
        AssetBundle arg0 = (AssetBundle)LuaScriptMgr.GetUnityObject(L, 2, typeof(AssetBundle));
        string      arg1 = LuaScriptMgr.GetLuaString(L, 3);

        obj.OnInit(arg0, arg1);
        return(0);
    }
Пример #10
0
    static int set_refObjList(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        SimpleFramework.LuaBehaviour obj = (SimpleFramework.LuaBehaviour)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name refObjList");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index refObjList on a nil value");
            }
        }

        obj.refObjList = (List <SimpleFramework.RefObj>)LuaScriptMgr.GetNetObject(L, 3, typeof(List <SimpleFramework.RefObj>));
        return(0);
    }