mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 15:50:11 -04:00
Fixed a bug where scrubbing playback wouldn't always update sprite existence properly.
This commit is contained in:
parent
12b28397e0
commit
4a4a702f1e
2 changed files with 4 additions and 4 deletions
app/lib/surface
|
@ -209,7 +209,7 @@ module.exports = class SpriteBoss extends CocoClass
|
|||
sprite.imageObject.play() for thangID, sprite of @sprites
|
||||
@selectionMark?.play()
|
||||
@targetMark?.play()
|
||||
|
||||
|
||||
onCastSpells: ->
|
||||
sprite.imageObject.stop() for thangID, sprite of @sprites
|
||||
@selectionMark?.stop()
|
||||
|
|
|
@ -226,7 +226,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
@currentFrame = actualCurrentFrame
|
||||
|
||||
# TODO: are these needed, or perhaps do they duplicate things?
|
||||
@spriteBoss.update()
|
||||
@spriteBoss.update true
|
||||
@onFrameChanged()
|
||||
|
||||
getCurrentFrame: ->
|
||||
|
@ -304,7 +304,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
@casting = true
|
||||
@wasPlayingWhenCastingBegan = @playing
|
||||
Backbone.Mediator.publish 'level-set-playing', { playing: false }
|
||||
|
||||
|
||||
createjs.Tween.removeTweens(@surfaceLayer)
|
||||
createjs.Tween.get(@surfaceLayer).to({alpha:0.9}, 1000, createjs.Ease.getPowOut(4.0))
|
||||
|
||||
|
@ -312,7 +312,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
return unless event.world.name is @world.name
|
||||
@casting = false
|
||||
Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan }
|
||||
|
||||
|
||||
fastForwardTo = null
|
||||
if @playing
|
||||
fastForwardTo = Math.min event.world.firstChangedFrame, @currentFrame
|
||||
|
|
Loading…
Add table
Reference in a new issue