Example #1
0
    static int IntToEnum(IntPtr L)
    {
        int arg0 = (int)LuaDLL.lua_tonumber(L, 1);

        Mugen.AI_Type o = (Mugen.AI_Type)arg0;
        ToLua.Push(L, o);
        return(1);
    }
Example #2
0
    static int get_type(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Mugen.AI_Command obj = (Mugen.AI_Command)o;
            Mugen.AI_Type    ret = obj.type;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index type on a nil value"));
        }
    }
Example #3
0
    static int set_type(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Mugen.AI_Command obj  = (Mugen.AI_Command)o;
            Mugen.AI_Type    arg0 = (Mugen.AI_Type)ToLua.CheckObject(L, 2, typeof(Mugen.AI_Type));
            obj.type = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index type on a nil value"));
        }
    }
Example #4
0
 static void Push(IntPtr L, Mugen.AI_Type arg)
 {
     ToLua.Push(L, arg);
 }