This commit is contained in:
Scott Erickson 2014-04-16 08:40:11 -07:00
commit d5b0a83186

View file

@ -93,6 +93,7 @@ module.exports = class Mark extends CocoClass
@lastHeight = @sprite.thang.height @lastHeight = @sprite.thang.height
buildShadow: -> buildShadow: ->
alpha = @sprite.thang?.alpha ? 1
width = (@sprite.thang?.width ? 0) + 0.5 width = (@sprite.thang?.width ? 0) + 0.5
height = (@sprite.thang?.height ? 0) + 0.5 height = (@sprite.thang?.height ? 0) + 0.5
longest = Math.max width, height longest = Math.max width, height
@ -103,7 +104,7 @@ module.exports = class Mark extends CocoClass
height *= Camera.PPM * @camera.y2x # TODO: doesn't work with rotation height *= Camera.PPM * @camera.y2x # TODO: doesn't work with rotation
@mark = new createjs.Shape() @mark = new createjs.Shape()
@mark.mouseEnabled = false @mark.mouseEnabled = false
@mark.graphics.beginFill "black" @mark.graphics.beginFill "rgba(0, 0, 0, #{alpha})"
if @sprite.thang.shape in ['ellipsoid', 'disc'] if @sprite.thang.shape in ['ellipsoid', 'disc']
@mark.graphics.drawEllipse 0, 0, width, height @mark.graphics.drawEllipse 0, 0, width, height
else else