static int GetPostionDataById(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         uint arg0 = (uint)LuaDLL.luaL_checknumber(L, 1);
         Logic.Position.Model.PositionData o = Logic.Position.Model.PositionData.GetPostionDataById(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int ToString(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Logic.Position.Model.PositionData obj = (Logic.Position.Model.PositionData)ToLua.CheckObject(L, 1, typeof(Logic.Position.Model.PositionData));
         string o = obj.ToString();
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_pos(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Position.Model.PositionData obj = (Logic.Position.Model.PositionData)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.pos = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index pos on a nil value" : e.Message));
        }
    }
    static int set_columnNum(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Position.Model.PositionData obj = (Logic.Position.Model.PositionData)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.columnNum = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index columnNum on a nil value" : e.Message));
        }
    }
    static int set_position(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Position.Model.PositionData obj = (Logic.Position.Model.PositionData)o;
            UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
            obj.position = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index position on a nil value" : e.Message));
        }
    }
    static int get_columnNum(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Position.Model.PositionData obj = (Logic.Position.Model.PositionData)o;
            float ret = obj.columnNum;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index columnNum on a nil value" : e.Message));
        }
    }
    static int _CreateLogic_Position_Model_PositionData(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                Logic.Position.Model.PositionData obj = new Logic.Position.Model.PositionData();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Logic.Position.Model.PositionData.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #8
0
        public static List <uint> GetRows(int rowNum, bool isPlayer)
        {
            List <uint> result = new List <uint>();

            if (_postionDataDic == null)
            {
                GetPostionsData();
            }
            List <PositionData> list = _postionDataDic.GetValues();

            for (int i = 0, count = list.Count; i < count; i++)
            {
                PositionData pd = list[i];
                if (isPlayer)
                {
                    if (pd.positionId > 100)
                    {
                        continue;
                    }
                    if ((int)pd.rowNum == rowNum)
                    {
                        result.Add(pd.positionId);
                    }
                }
                else
                {
                    if (pd.positionId < 100)
                    {
                        continue;
                    }
                    if ((int)pd.rowNum == rowNum)
                    {
                        result.Add(pd.positionId);
                    }
                }
            }
            return(result);
        }