Moved createMarks() to setupSprite() to optimize loading

This commit is contained in:
Shrihari 2014-03-16 02:48:19 +05:30
parent d186ae0a15
commit 005a91cec2

View file

@ -71,12 +71,12 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
@stillLoading = true
@thangType.fetch()
@thangType.once 'sync', @setupSprite, @
@createMarks()
setupSprite: ->
@stillLoading = false
@actions = @thangType.getActions()
@buildFromSpriteSheet @buildSpriteSheet()
@createMarks()
destroy: ->
mark.destroy() for name, mark of @marks