mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed bug with scale not updating properly when paused.
This commit is contained in:
parent
4ad7ebc95d
commit
04d74fb76f
1 changed files with 3 additions and 2 deletions
|
@ -177,8 +177,9 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
# Gets the sprite to reflect what the current state of the thangs and surface are
|
||||
return if @stillLoading
|
||||
@updatePosition()
|
||||
frameChanged = frameChanged or @targetScaleFactor isnt @scaleFactor
|
||||
if frameChanged
|
||||
@updateScale() # must happen before rotation
|
||||
@updateScale() # must happen before rotation
|
||||
@updateAlpha()
|
||||
@updateRotation()
|
||||
@updateAction()
|
||||
|
@ -274,7 +275,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
if (@thang.scaleFactor or 1) isnt @targetScaleFactor
|
||||
createjs.Tween.removeTweens(@)
|
||||
createjs.Tween.get(@).to({scaleFactor:@thang.scaleFactor or 1}, 2000, createjs.Ease.elasticOut)
|
||||
@targetScaleFactor = @thang.scaleFactor
|
||||
@targetScaleFactor = @thang.scaleFactor or 1
|
||||
|
||||
updateAlpha: ->
|
||||
@imageObject.alpha = if @hiding then 0 else 1
|
||||
|
|
Loading…
Reference in a new issue