mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Properly skip tweens for shadows we removed during sprite parsing
This commit is contained in:
parent
956f9dc43d
commit
99acf2d40e
2 changed files with 7 additions and 1 deletions
|
@ -31,6 +31,7 @@ module.exports = class SpriteBuilder
|
|||
for func in tweenData
|
||||
args = _.cloneDeep(func.a)
|
||||
@dereferenceArgs(args, locals)
|
||||
console.log 'found', args, 'for', func.n
|
||||
tween = tween[func.n](args...)
|
||||
anim.timeline.addTween(tween)
|
||||
|
||||
|
|
|
@ -153,7 +153,12 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer
|
|||
# console.debug 'Did not dereference args:', args
|
||||
stopped = true
|
||||
break
|
||||
tween = tween[func.n](args...)
|
||||
if tween[func.n]
|
||||
tween = tween[func.n](args...)
|
||||
else
|
||||
# If we, say, skipped a shadow get(), then the wait() may not be present
|
||||
stopped = true
|
||||
break
|
||||
continue if stopped
|
||||
anim.timeline.addTween(tween)
|
||||
|
||||
|
|
Loading…
Reference in a new issue