GrandLarceny.Player.updateHanging C# (CSharp) Method

updateHanging() private method

private updateHanging ( ) : void
return void
        private void updateHanging()
        {
            m_gravity = 0;
            if (KeyboardHandler.keyClicked(GameState.getJumpKey()))
            {
                if (KeyboardHandler.isKeyPressed(GameState.getDownKey()))
                {
                    m_position.plusYWith(m_collisionShape.getOutBox().Height);
                    Game.getInstance().m_camera.getPosition().plusYWith(-m_collisionShape.getOutBox().Height);
                    m_currentState = State.Jumping;
                    m_speed.Y = 0;
                    if (m_facingRight)
                    {
                        m_position.plusXWith(-1);
                    }
                    else
                    {
                        m_position.plusXWith(1);
                    }
                }
                else
                {
                    m_speed.Y = -(JUMPSTRENGTH - 70);
                    if (!m_facingRight)
                    {
                        m_speed.X += PLAYERSPEEDCHASEMODE * 1.5f;
                    }
                    else
                    {
                        m_speed.X -= PLAYERSPEEDCHASEMODE * 1.5f;
                    }
                    m_currentState = State.Jumping;
                }
            }
            else if (KeyboardHandler.isKeyPressed(GameState.getDownKey()) && m_ladderDirection != Direction.None)
            {
                m_currentState = State.Climbing;
                m_position.plusYWith(m_standHitBox.m_height - m_hangHitBox.m_height);
                Game.getInstance().m_camera.getPosition().plusYWith(-(m_standHitBox.m_height - m_hangHitBox.m_height));
                m_ledgeClimbSound.play();
            }
        }