Ejemplo n.º 1
0
        public static bool CheckEnum <T>(IntPtr ptr, int p, out T o) where T : struct
        {
            int i = (int)LuaNativeMethods.luaL_checkinteger(ptr, p);

            o = (T)Enum.ToObject(typeof(T), i);

            return(true);
        }
Ejemplo n.º 2
0
 public static bool CheckType(IntPtr ptr, int p, out byte v)
 {
     v = (byte)LuaNativeMethods.luaL_checkinteger(ptr, p);
     return(true);
 }
Ejemplo n.º 3
0
        // why doesn't have a checkArray<byte[]> function accept lua string?
        // I think you should did a Buffer class to wrap byte[] pass/accept between mono and lua vm

        public static bool CheckType(IntPtr ptr, int p, out char c)
        {
            c = (char)LuaNativeMethods.luaL_checkinteger(ptr, p);
            return(true);
        }