Exemple #1
0
 static int Send(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Assets.Script.Frame.XEvent obj = (Assets.Script.Frame.XEvent)ToLua.CheckObject(L, 1, typeof(Assets.Script.Frame.XEvent));
         obj.Send();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #2
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));
        }
    }
Exemple #3
0
    static int get_evtId(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Assets.Script.Frame.XEvent obj = (Assets.Script.Frame.XEvent)o;
            int ret = obj.evtId;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index evtId on a nil value" : e.Message));
        }
    }
Exemple #4
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));
        }
    }