Fixed setting registration points for thangs that match world dimensions.

This commit is contained in:
Scott Erickson 2014-05-19 21:33:44 -07:00
parent ae8d28182c
commit 6c3ff16bed

View file

@ -317,10 +317,8 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
return unless bounds
@imageObject.scaleX = @thang.width * Camera.PPM / bounds.width
@imageObject.scaleY = @thang.height * Camera.PPM * @options.camera.y2x / bounds.height
@imageObject.regX ?= 0
@imageObject.regX += bounds.width / 2
@imageObject.regY ?= 0
@imageObject.regY += bounds.height / 2
@imageObject.regX = bounds.width / 2
@imageObject.regY = bounds.height / 2
unless @thang.spriteName is 'Beam'
@imageObject.scaleX *= @thangType.get('scale') ? 1