Ejemplo n.º 1
0
    public override State HandleInput()
    {
        /*if (!IsAnimationPlayingMe())
         *      {
         *  return null;
         * }*/

        if (m_inputManager.IsJump())
        {
            return(new EntityJumpSquatState());
        }

        if (IsStateFinished())
        {
            if (m_initMoveDir != m_inputManager.moveDir)
            {
                return(new EntityTurnAroundState());
            }
            else if (m_inputManager.IsMove())
            {
                return(new EntityRunState());
            }

            return(new EntityIdleState());
        }

        return(null);
    }
Ejemplo n.º 2
0
    public override State HandleInput()
    {
        if (!IsAnimationPlayingMe())
        {
            return(null);
        }

        if (_inputManager.IsJump())
        {
            return(new EntityJumpSquatState());
        }

        return(IsStateFinished() ? new EntityIdleState() : null);
    }
Ejemplo n.º 3
0
    public override State HandleInput()
    {
        /*if (!IsAnimationPlayingMe())
         *      {
         *  return null;
         * }*/

        if (!m_isShortHop && !m_inputManager.IsJump())
        {
            m_isShortHop = true;
        }

        if (IsStateFinished())
        {
            return(new EntityJumpState(m_isShortHop));
        }

        return(null);
    }
Ejemplo n.º 4
0
    public override State HandleInput()
    {
        if (!IsAnimationPlayingMe())
        {
            return(null);
        }

        if (m_inputManager.IsJump())
        {
            return(new EntityJumpSquatState());
        }

        if (m_inputManager.IsDash() && m_initDirection != m_inputManager.moveDir)
        {
            return(new EntityIdleState());
        }

        if (IsStateFinished())
        {
            return(new EntityRunState());
        }

        return(null);
    }
Ejemplo n.º 5
0
    public override State HandleInput()
    {
        if (!IsAnimationPlayingMe())
        {
            return(null);
        }

        if (m_inputManager.IsJump())
        {
            return(new EntityJumpSquatState());
        }

        if (!m_inputManager.IsMove())
        {
            return(new EntityIdleState());
        }

        if (m_inputManager.IsDash())
        {
            return(new EntityDashState());
        }

        return(null);
    }
Ejemplo n.º 6
0
    public override State HandleInput()
    {
        if (!IsAnimationPlayingMe())
        {
            return(null);
        }

        if (m_inputManager.IsJump())
        {
            return(new EntityJumpSquatState());
        }

        if (m_initDirection != m_inputManager.moveDir)
        {
            return(new EntityTurnAroundRunState());
        }

        if (!m_inputManager.IsMove())
        {
            return(new EntityRunBrakeState());
        }

        return(null);
    }