mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-24 21:13:35 -04:00
Fixed updating the sprite sheets in the thang type editor.
This commit is contained in:
parent
cf0e1d305b
commit
956243818a
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,7 @@ module.exports = class ThangType extends CocoModel
|
|||
resetSpriteSheetCache: ->
|
||||
@buildActions()
|
||||
@spriteSheets = {}
|
||||
@building = {}
|
||||
|
||||
getActions: ->
|
||||
return @actions or @buildActions()
|
||||
|
@ -138,10 +139,12 @@ module.exports = class ThangType extends CocoModel
|
|||
console.warn 'Building', @get('name'), 'and blocking the main thread.'
|
||||
spriteSheet = @builder.build()
|
||||
@spriteSheets[key] = spriteSheet
|
||||
delete @building[key]
|
||||
spriteSheet
|
||||
|
||||
onBuildSpriteSheetComplete: (e, key) ->
|
||||
@spriteSheets[key] = e.target.spriteSheet
|
||||
delete @building[key]
|
||||
@trigger 'build-complete'
|
||||
@builder = null
|
||||
@vectorParser = null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue