LuaInterface.LuaDLL.lua_tointeger C# (CSharp) Méthode

lua_tointeger() public static méthode

public static lua_tointeger ( IntPtr luaState, int index ) : int
luaState IntPtr
index int
Résultat int
        public static int lua_tointeger(IntPtr luaState, int index)
        {
            return (int)lua_tointegerx(luaState, index, IntPtr.Zero);
        }

Usage Example

Exemple #1
0
        internal static int Equals(IntPtr L)
        {
            try
            {
                ToLua.CheckArgsCount(L, 2);

                T   arg0    = ToLua.CheckObject <T>(L, 1);
                int result0 = EnumToInt(arg0);
                int result1 = 0;

                if (TypeChecker.CheckTypes <T>(L, 2))
                {
                    T arg1 = ToLua.CheckObject <T>(L, 2);
                    result1 = EnumToInt(arg1);
                }
                else if (TypeChecker.CheckTypes <int>(L, 2))
                {
                    result1 = (int)LuaDLL.lua_tointeger(L, 1);
                }

                LuaDLL.lua_pushboolean(L, result0 == result1);
                return(1);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }
        }
All Usage Examples Of LuaInterface.LuaDLL::lua_tointeger
LuaDLL