示例#1
0
        public string[] ToStringArray(int index)
        {
            int length = LuaAPI.lua_objlen(this.m_lua, index);

            string[] array = new string[length];

            for (int i = 0; i < length; i++)
            {
                RawGetI(index, i + 1);
                array[i] = (string)ToString(-1);
                Pop(1);
            }

            return(array);
        }
示例#2
0
        public bool[] ToBoolArray(int index)
        {
            int length = LuaAPI.lua_objlen(this.m_lua, index);

            bool[] array = new bool[length];

            for (int i = 0; i < length; i++)
            {
                RawGetI(index, i + 1);
                array[i] = (bool)ToBoolean(-1);
                Pop(1);
            }

            return(array);
        }
示例#3
0
        public int[] ToIntArray(int index)
        {
            int length = LuaAPI.lua_objlen(this.m_lua, index);

            int[] array = new int[length];

            for (int i = 0; i < length; i++)
            {
                RawGetI(index, i + 1);
                array[i] = (int)ToInteger(-1);
                Pop(1);
            }

            return(array);
        }
示例#4
0
        public float[] ToFloatArray(int index)
        {
            int length = LuaAPI.lua_objlen(this.m_lua, index);

            float[] array = new float[length];

            for (int i = 0; i < length; i++)
            {
                RawGetI(index, i + 1);
                array[i] = (float)ToNumber(-1);
                Pop(1);
            }

            return(array);
        }
示例#5
0
 public int RawLen(int index)
 {
     return(LuaAPI.lua_objlen(this.m_lua, index));
 }