Exemplo n.º 1
0
    static int set_onSteal(IntPtr L)
    {
        object            o   = LuaScriptMgr.GetLuaObject(L, 1);
        PlayerState_Steal obj = (PlayerState_Steal)o;

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

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

        LuaTypes funcType = LuaDLL.lua_type(L, 3);

        if (funcType != LuaTypes.LUA_TFUNCTION)
        {
            obj.onSteal = (Action)LuaScriptMgr.GetNetObject(L, 3, typeof(Action));
        }
        else
        {
            LuaFunction func = LuaScriptMgr.ToLuaFunction(L, 3);
            obj.onSteal = () =>
            {
                func.Call();
            };
        }
        return(0);
    }
Exemplo n.º 2
0
    static int OnExit(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        PlayerState_Steal obj = (PlayerState_Steal)LuaScriptMgr.GetNetObjectSelf(L, 1, "PlayerState_Steal");

        obj.OnExit();
        return(0);
    }
Exemplo n.º 3
0
    static int GetStealPosition(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        Player arg0 = (Player)LuaScriptMgr.GetNetObject(L, 1, typeof(Player));

        IM.Vector3 o = PlayerState_Steal.GetStealPosition(arg0);
        LuaScriptMgr.PushValue(L, o);
        return(1);
    }
Exemplo n.º 4
0
    static int OnEnter(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        PlayerState_Steal obj  = (PlayerState_Steal)LuaScriptMgr.GetNetObjectSelf(L, 1, "PlayerState_Steal");
        PlayerState       arg0 = (PlayerState)LuaScriptMgr.GetNetObject(L, 2, typeof(PlayerState));

        obj.OnEnter(arg0);
        return(0);
    }
Exemplo n.º 5
0
    static int PreEnter(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        PlayerState_Steal obj = (PlayerState_Steal)LuaScriptMgr.GetNetObjectSelf(L, 1, "PlayerState_Steal");
        bool o = obj.PreEnter();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Exemplo n.º 6
0
    /*
     * public void OnGetUp()
     * {
     *      PlayerState_FallGround fallGround = m_Owner.m_StateMachine.m_curState as PlayerState_FallGround;
     *      if( fallGround != null )
     *              fallGround.m_step = PlayerState_FallGround.Step.riseUp;
     * }
     */

    public void OnSteal()
    {
        PlayerState_Steal steal = _owner.m_StateMachine.m_curState as PlayerState_Steal;

        if (steal != null)
        {
            steal.OnSteal();
        }
    }
Exemplo n.º 7
0
    static int InAutoPosition(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Player      arg0 = (Player)LuaScriptMgr.GetNetObject(L, 1, typeof(Player));
        UBasketball arg1 = (UBasketball)LuaScriptMgr.GetUnityObject(L, 2, typeof(UBasketball));
        bool        o    = PlayerState_Steal.InAutoPosition(arg0, arg1);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Exemplo n.º 8
0
    static int _CreatePlayerState_Steal(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            PlayerStateMachine arg0 = (PlayerStateMachine)LuaScriptMgr.GetNetObject(L, 1, typeof(PlayerStateMachine));
            GameMatch          arg1 = (GameMatch)LuaScriptMgr.GetNetObject(L, 2, typeof(GameMatch));
            PlayerState_Steal  obj  = new PlayerState_Steal(arg0, arg1);
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: PlayerState_Steal.New");
        }

        return(0);
    }
Exemplo n.º 9
0
    public override void OnEnter(AIState lastState)
    {
        base.OnEnter(lastState);

        if (m_ball.m_owner == null)
        {
            m_moveTarget = m_player.position;
        }
        else
        {
            m_moveTarget = PlayerState_Steal.GetStealPosition(m_ball.m_owner);
        }

        castSkill = false;
        if (m_player.m_inputDispatcher != null)
        {
            m_player.m_inputDispatcher.m_enable = false;
        }
    }
Exemplo n.º 10
0
    static int get_m_bGetBall(IntPtr L)
    {
        object            o   = LuaScriptMgr.GetLuaObject(L, 1);
        PlayerState_Steal obj = (PlayerState_Steal)o;

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

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

        LuaScriptMgr.Push(L, obj.m_bGetBall);
        return(1);
    }
Exemplo n.º 11
0
    static int set_stealTarget(IntPtr L)
    {
        object            o   = LuaScriptMgr.GetLuaObject(L, 1);
        PlayerState_Steal obj = (PlayerState_Steal)o;

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

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

        obj.stealTarget = (Player)LuaScriptMgr.GetNetObject(L, 3, typeof(Player));
        return(0);
    }
Exemplo n.º 12
0
    static int set_forcedByAI(IntPtr L)
    {
        object            o   = LuaScriptMgr.GetLuaObject(L, 1);
        PlayerState_Steal obj = (PlayerState_Steal)o;

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

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

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