       @background.layout()
 
     _addMate: ->
-      {x, y} = @_createEndingPoint()
-      x -= 20
-      y -= 46
+      {x, y} = @endingPoint
+      x += 20
+      y -= 10
       @mate = @add.sprite x, y, 'mate', 1
-      manager = @mate.animations
-      manager.add 'end', [1..14], 12
-      manager.play 'end' # @test
+      @mate.anchor = new Phaser.Point 0.5, 0.5
+      @mate.animations.add 'end', [1..MateLastFrame], 12
 
     _addMusic: ->
       @music = @add.audio 'bgm', 0, yes

], (dat, Phaser, _, Background, defines, Helpers, Platforms, Player) ->

  'use strict'

  class PlayState extends Phaser.State


        tileImageKey: 'balcony'
      , @game, @gui?.addOpenFolder 'platforms'

      @endingPoint = @platforms.ledges[-1...][0].createMidpoint @platforms
      @startingPoint = new Phaser.Point defines.playerW, @world.height - defines.playerH
      # Use for debugging endpoints.
      @startingPoint = @platforms.ledges[-2...-1][0].createMidpoint @platforms

    _addPlayer: ->
      origin = @startingPoint
      @player = new Player { origin }, @game, @cursors, @gui?.addOpenFolder 'player'


    _renderDebugDisplay: ->
      @resetDebugDisplayLayout()
