             if not testRect(pos.x+(rX-x), pos.y+(rY-y), 32, 32, me.collision.types.ALL_OBJECT, @) # Can be?
                 @pos.x = rX; @pos.y = rY
                 @updateBounds()
-    takeDamage: (amount, frames) ->
-        if @invincibleFrames <= 0
-            @health = Math.max(0, @health - amount)
-            if @health <= 0
-                shouldReset = true
-            me.audio.play('stomp')
-            @renderable.flicker(200)
-            @invincibleFrames = frames
-
     draw: (renderer) ->
         [x, y] = [@getRx(), @getRy()]
         renderer.translate(x, y)

        @renderable.setCurrentAnimation('stand')
        @firstUpdate = true
        @jumpTimer = 0
        @invincibleFrames = 10
        @baseInit()
    giveInvincibileFrames: (n) ->
        @invincibleFrames = Math.max(@invincibleFrames, n)

    hasFloorBelow: () -> 
        if wouldCollide(@,0,0, me.collision.types.WORLD_SHAPE)

        renderer.translate(-x, -y)
    draw: (renderer)->
        @baseDraw(renderer)
    takeDamage: (amount, frames, playSound = false) ->
        if @invincibleFrames <= 0
            @health = Math.max(0, @health - amount)
            if @health <= 0
                @die()
            if playSound
                me.audio.play('stomp')
            @renderable.flicker(200)
            @invincibleFrames = frames
    giveInvincibileFrames: (n) ->
        @invincibleFrames = Math.max(@invincibleFrames, n)
    baseInit: () ->
        @alwaysUpdate = true
        @body.setMaxVelocity(MAX_SPEED, 30)
        @onPlatform = null
        @health = 100
        @invincibleFrames = 10
    getRx: () ->
        {pos, width} = @getBounds()
        return Math.round(0.5 + pos.x + @anchorPoint.x * (width - @renderable.width))
