 
     startEnding: (mate) ->
       @control = off
-      @sprite.position.setTo mate.x - 43, mate.y
-      @velocity.setTo 0
-      @acceleration.setTo 0
-      @physics.offset.setTo 0
+      @sprite.position.setTo(mate.x - 43, mate.y)
+      @velocity.setTo(0)
+      @acceleration.setTo(0)
+      @physics.offset.setTo(0)
       @physics.moves = no
       @_visualizeTurn Direction.Right
       animation = @playAnimation 'end'

      {@velocity, @acceleration} = @physics

      @physics.collideWorldBounds = on
      @physics.tilePadding = new Point 0, @sprite.height

      @physics.drag.x = 1500

      {height, width} = @sprite
      @_yOffset = playerYOffset
      @physics.setSize (width / 2), (height / 2), @_xOffset(), @_yOffset

      @jumpAcceleration = -4250 # A burst of energy on launch.
      @jumpMaxDuration = 500


    _changeAnimation: ->
      unless @_isInMidAir() or @nextAction is 'none'
        animation = @playAnimation(@nextAction, @animation?.loop)
        if animation and @_nextActionOnComplete?
          animation.onComplete.addOnce(@_nextActionOnComplete, @)
          @_nextActionOnComplete = null
        return

      switch @nextState
        when 'running' then @playAnimation('run', no)
        when 'still' then @playAnimation(17, @animation?.loop)
        when 'falling' then @playAnimation(31, @animation?.loop)
        when 'landing' then @playAnimation('land')
      return

    _changeState: ->
      return if @nextState is @state

      @debug('jump:peak', @physics.y) if @state is 'rising'

      @debug('state', @nextState)
      @debug('jump:start', @physics.position) if @nextState is 'rising'

      if @nextState is 'falling'
        @_fallingPoint ?= @physics.position?.clone()
