mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-02 11:58:10 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
161c81772c
3 changed files with 11 additions and 2 deletions
|
@ -758,7 +758,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
|
||||
endFunc = =>
|
||||
@lastTween = null
|
||||
@imageObject.gotoAndPlay(endAnimation)
|
||||
@imageObject.gotoAndPlay(endAnimation) unless @stillLoading
|
||||
@shadow.action = 'idle'
|
||||
@update true
|
||||
@possessed = false
|
||||
|
|
|
@ -281,6 +281,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
|
||||
onSetPlaying: (e) ->
|
||||
@playing = (e ? {}).playing ? true
|
||||
@setPlayingCalled = true
|
||||
if @playing and @currentFrame >= (@world.totalFrames - 5)
|
||||
@currentFrame = 0
|
||||
if @fastForwarding and not @playing
|
||||
|
@ -352,6 +353,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
@casting = true
|
||||
@wasPlayingWhenCastingBegan = @playing
|
||||
Backbone.Mediator.publish 'level-set-playing', { playing: false }
|
||||
@setPlayingCalled = false # don't overwrite playing settings if they changed by, say, scripts
|
||||
|
||||
if @coordinateDisplay?
|
||||
@surfaceTextLayer.removeChild @coordinateDisplay
|
||||
|
@ -370,7 +372,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
|
||||
# This has a tendency to break scripts that are waiting for playback to change when the level is loaded
|
||||
# so only run it after the first world is created.
|
||||
Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan } unless event.firstWorld
|
||||
Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan } unless event.firstWorld or @setPlayingCalled
|
||||
|
||||
fastForwardTo = null
|
||||
if @playing
|
||||
|
|
|
@ -47,6 +47,13 @@ module.exports = class WizardSprite extends IndieSprite
|
|||
thang.pos.z += thang.bobHeight
|
||||
thang
|
||||
|
||||
finishSetup: ->
|
||||
@updateBaseScale()
|
||||
@scaleFactor = @thang.scaleFactor if @thang?.scaleFactor
|
||||
@updateScale()
|
||||
@updateRotation()
|
||||
# Don't call general update() because Thang isn't built yet
|
||||
|
||||
onPlayerStatesChanged: (e) ->
|
||||
for playerID, state of e.states
|
||||
continue unless playerID is @thang.id
|
||||
|
|
Loading…
Reference in a new issue