Exemple #1
0
 public object Get(GLua GLua, int stackPos = -1)
 {
     if (GLua.IsType(stackPos, LuaType.Function))
     {
         return(GLua.LuaBase.GetCFunction(stackPos));
     }
     return(null);
 }
 public object Get(GLua GLua, int stackPos = -1)
 {
     if (GLua.IsType(stackPos, LuaType.Bool))
     {
         return(GLua.LuaBase.GetBool(stackPos));
     }
     return(null);
 }
Exemple #3
0
 public object Get(GLua GLua, int stackPos = -1)
 {
     if (GLua.IsType(stackPos, LuaType.Number))
     {
         return(GLua.LuaBase.GetNumber(stackPos));
     }
     return(null);
 }
 public object Get(GLua GLua, int stackPos = -1)
 {
     if (GLua.IsType(stackPos, LuaType.String))
     {
         return(GLua.LuaBase.GetString(stackPos, IntPtr.Zero));
     }
     return(null);
 }
Exemple #5
0
        public object Get(GLua GLua, int stackPos = -1)
        {
            if (stackPos != -1)
            {
                throw new Exception("stackpos not implemented on array marshal");
            }

            if (GLua.IsType(stackPos, LuaType.Table))
            {
                return(GLua.GetArray <T>());
            }
            return(null);
        }
Exemple #6
0
 public Object Get(GLua GLua, Int32 stackPos = -1) => GLua.IsType(stackPos, LuaType.String) ? GLua.LuaBase.GetString(stackPos, IntPtr.Zero) : null;
Exemple #7
0
 public Object Get(GLua GLua, Int32 stackPos = -1) => GLua.IsType(stackPos, LuaType.Boolean) ? GLua.LuaBase.GetBool(stackPos) : (Object)null;
Exemple #8
0
 public Object Get(GLua GLua, Int32 stackPos = -1) => GLua.IsType(stackPos, LuaType.Function) ? Marshal.GetDelegateForFunctionPointer <CFunc>(GLua.LuaBase.GetCFunction(stackPos)) : null;
Exemple #9
0
 public Object Get(GLua GLua, Int32 stackPos = -1) => GLua.IsType(stackPos, LuaType.Number) ? GLua.LuaBase.GetNumber(stackPos) : (Object)null;