mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-20 18:10:44 -04:00
Fixed setting registration points for thangs that match world dimensions.
This commit is contained in:
parent
ae8d28182c
commit
6c3ff16bed
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue