Beispiel #1
0
    static int get_sender(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Assets.Script.Frame.XEvent       obj = (Assets.Script.Frame.XEvent)o;
            Assets.Script.Frame.IEventSender ret = obj.sender;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index sender on a nil value" : e.Message));
        }
    }
Beispiel #2
0
    static int _CreateAssets_Script_Frame_XEvent(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
                Assets.Script.Frame.IEventSender arg1 = (Assets.Script.Frame.IEventSender)ToLua.CheckObject(L, 2, typeof(Assets.Script.Frame.IEventSender));
                Assets.Script.Frame.XEvent       obj  = new Assets.Script.Frame.XEvent(arg0, arg1);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Assets.Script.Frame.XEvent.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }