mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fixed raster thang types, and level destruction.
This commit is contained in:
parent
10314b8bfa
commit
d77b87ed22
2 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,9 @@ module.exports = class Label extends CocoClass
|
|||
true
|
||||
|
||||
build: ->
|
||||
@layer.removeChild @background if @background
|
||||
@layer.removeChild @label if @label
|
||||
if @layer and not @layer.destroyed
|
||||
@layer.removeChild @background if @background
|
||||
@layer.removeChild @label if @label
|
||||
@label = null
|
||||
@background = null
|
||||
return unless @text # null or '' should both be skipped
|
||||
|
|
|
@ -439,6 +439,7 @@ module.exports = LayerAdapter = class LayerAdapter extends CocoClass
|
|||
# just give a placeholder
|
||||
sprite = new createjs.Sprite(@spriteSheet)
|
||||
sprite.placeholder = true
|
||||
sprite.baseScaleX = sprite.baseScaleY = 1
|
||||
|
||||
else if cocoSprite.thangType.get('raster')
|
||||
sprite = new createjs.Sprite(@spriteSheet)
|
||||
|
@ -446,6 +447,7 @@ module.exports = LayerAdapter = class LayerAdapter extends CocoClass
|
|||
sprite.regX = -reg.x
|
||||
sprite.regY = -reg.y
|
||||
sprite.gotoAndStop(@renderGroupingKey(cocoSprite.thangType))
|
||||
sprite.baseScaleX = sprite.baseScaleY = 1
|
||||
|
||||
else
|
||||
SpriteClass = if (cocoSprite.thangType.get('spriteType') or @defaultSpriteType) is 'segmented' then SegmentedSprite else SingularSprite
|
||||
|
|
Loading…
Reference in a new issue