mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-24 03:40:00 -04:00
Added a property to prevent scripts from running after certain other scripts have run.
This commit is contained in:
parent
f4084ba5cc
commit
356d1b55ed
1 changed files with 6 additions and 0 deletions
|
@ -184,6 +184,11 @@ module.exports = class SpriteBoss extends CocoClass
|
||||||
sprite.hasMoved = false
|
sprite.hasMoved = false
|
||||||
@removeSprite sprite if missing
|
@removeSprite sprite if missing
|
||||||
@cache true if updateCache and @cached
|
@cache true if updateCache and @cached
|
||||||
|
|
||||||
|
# mainly for handling selecting thangs from session when the thang is not always in existence
|
||||||
|
if @willSelectThang and @sprites[@willSelectThang[0]]
|
||||||
|
@selectThang @willSelectThang...
|
||||||
|
@willSelectThang = null
|
||||||
|
|
||||||
cache: (update=false) ->
|
cache: (update=false) ->
|
||||||
return if @cached and not update
|
return if @cached and not update
|
||||||
|
@ -241,6 +246,7 @@ module.exports = class SpriteBoss extends CocoClass
|
||||||
@selectSprite e if e.onBackground
|
@selectSprite e if e.onBackground
|
||||||
|
|
||||||
selectThang: (thangID, spellName=null) ->
|
selectThang: (thangID, spellName=null) ->
|
||||||
|
return @willSelectThang = [thangID, spellName] unless @sprites[thangID]
|
||||||
@selectSprite null, @sprites[thangID], spellName
|
@selectSprite null, @sprites[thangID], spellName
|
||||||
|
|
||||||
selectSprite: (e, sprite=null, spellName=null) ->
|
selectSprite: (e, sprite=null, spellName=null) ->
|
||||||
|
|
Loading…
Add table
Reference in a new issue