             @xVelocity = @accelerationCap
 
     update: (elapsedTime, inputState) ->
+        timeRatio = elapsedTime / 1000
+
         if inputState.right
-            @accelerateRight()
+            @accelerateRight timeRatio
 
         else if inputState.left
-            @accelerateLeft()
+            @accelerateLeft timeRatio
 
         else
-            @player.slow()
+            @slow timeRatio
 
         @hitBox.position.x += @xVelocity


        stage.addChild @hitBox

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

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

    slow: ->
        if @xVelocity < 0
            @xVelocity += @accelerationStep
            if @xVelocity > 0
                @xVelocity = 0

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


    xVelocity: 0
    yVelocity: 0

    accelerationStep: 30
    accelerationCap: 7

    hitBox: null

