     xVelocity: 0
     yVelocity: 0
 
-    accelerationStep: 1000
-    accelerationCap: 400
+    yAccelerationStep: 1000
+    xAccelerationStep: 1000
+    xAccelerationCap: 400
 
     hitBox: null
 

        stage.addChild @hitBox

    accelerateRight: (timeRatio) ->
        @xVelocity += @accelerationStep * timeRatio
        @capVelocity()

    accelerateLeft: (timeRatio) ->
        @xVelocity -= @accelerationStep * timeRatio
        @capVelocity()

    slow: (timeRatio) ->
        if @xVelocity < 0
            @xVelocity += @accelerationStep * timeRatio
            if @xVelocity > 0
                @xVelocity = 0

        else if @xVelocity > 0
            @xVelocity -= @accelerationStep * timeRatio
            if @xVelocity < 0
                @xVelocity = 0

    capVelocity: ->
        if @xVelocity < -@accelerationCap
            @xVelocity = -@accelerationCap

        if @xVelocity > @accelerationCap
            @xVelocity = @accelerationCap

    update: (elapsedTime, inputState) ->
        timeRatio = elapsedTime / 1000

        else
            @slow timeRatio

        if inputState.jump and not @jumping
            console.log 'jumping'
            @jumping = true
            @yVelocity += 500

        if @jumping
            @accelerateDown timeRatio

        @updatePosition timeRatio

    updatePosition: (timeRatio) ->
        @hitBox.position.x += @xVelocity * timeRatio
        @hitBox.position.y -= @yVelocity * timeRatio

