mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed two bugs with destroying sprites.
This commit is contained in:
parent
357b73be93
commit
fc7d403785
2 changed files with 3 additions and 2 deletions
|
@ -205,6 +205,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
.to({alpha: 0.6, scaleY: @options.camera.y2x, scaleX: 1}, 100, createjs.Ease.circOut)
|
||||
.to({alpha: 0, scaleY: 0, scaleX: 0}, 700, createjs.Ease.circIn)
|
||||
.call =>
|
||||
return if @destroyed
|
||||
@options.groundLayer.removeChild circle
|
||||
delete @handledAoEs[event]
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ module.exports = class SpriteBoss extends CocoClass
|
|||
@willSelectThang = [thangID, null]
|
||||
@updateTarget()
|
||||
return unless @selectionMark
|
||||
@selectedSprite = null unless @selectedSprite?.thang
|
||||
@selectedSprite = null if @selectedSprite and (@selectedSprite.destroyed or not @selectedSprite.thang)
|
||||
@selectionMark.toggle @selectedSprite?
|
||||
@selectionMark.setSprite @selectedSprite
|
||||
@selectionMark.update()
|
||||
|
|
Loading…
Reference in a new issue