static int skillLevel(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        OneByOne.FightPlayerModel obj = (OneByOne.FightPlayerModel)LuaScriptMgr.GetNetObjectSelf(L, 1, "OneByOne.FightPlayerModel");
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
        int o    = obj.skillLevel(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
示例#2
0
    public void setData(OneByOne.FightPlayerModel model)
    {
        base.Data = model;
        #if !USING_RPG
        base.stateController.NetSpawn(model);
#endif
        myState = PlayerState.INIT;
        //在玩家点击开始前   隐藏不显示
        transform.position = Vector3.left * 999;
        IsSelf             = model.id == GameData.user.id;
        SetSelfMark();
        if (IsSelf)
        {
            PlayerCon.SelfPlayer = this;
        }
    }
    static int _CreateOneByOne_FightPlayerModel(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            OneByOne.FightPlayerModel obj = new OneByOne.FightPlayerModel();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: OneByOne.FightPlayerModel.New");
        }

        return(0);
    }
    static int get_heroId(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.FightPlayerModel obj = (OneByOne.FightPlayerModel)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name heroId");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index heroId on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.heroId);
        return(1);
    }
    static int set_skills(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.FightPlayerModel obj = (OneByOne.FightPlayerModel)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name skills");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index skills on a nil value");
            }
        }

        obj.skills = LuaScriptMgr.GetArrayObject <OneByOne.FightSkill>(L, 3);
        return(0);
    }
    static int set_money(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.FightPlayerModel obj = (OneByOne.FightPlayerModel)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name money");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index money on a nil value");
            }
        }

        obj.money = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
    static int set_isLongRange(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.FightPlayerModel obj = (OneByOne.FightPlayerModel)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name isLongRange");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index isLongRange on a nil value");
            }
        }

        obj.isLongRange = LuaScriptMgr.GetBoolean(L, 3);
        return(0);
    }