Hid level done button better. Avoiding building wizard sprite when not needed.

This commit is contained in:
Nick Winter 2014-05-01 14:36:26 -07:00
parent 5376a42f94
commit 0f33bae1f1
3 changed files with 5 additions and 5 deletions
app
lib/surface
styles/play/level
templates/play/level

View file

@ -96,11 +96,8 @@ module.exports = class SpriteBoss extends CocoClass
unless @indieSprites
@indieSprites = []
@indieSprites = (@createIndieSprite indieSprite for indieSprite in indieSprites) if indieSprites
unless @selfWizardSprite
if withWizards and not @selfWizardSprite
@selfWizardSprite = @createWizardSprite thangID: "My Wizard", isSelf: true, sprites: @sprites
unless withWizards
@selfWizardSprite.displayObject.visible = false
@selfWizardSprite.labels.name.setText null
createIndieSprite: (indieSprite) ->
unless thangType = @thangTypeFor indieSprite.thangType

View file

@ -40,3 +40,6 @@
font-size: 13px
height: 24px
#level-done-button
display: none

View file

@ -17,4 +17,4 @@ if spectateGame
button.btn.btn-xs.btn-inverse.banner#restart-button(title="Reload all custom code to reset level", data-i18n="play_level.restart") Restart
button.btn.btn-xs.btn-primary.banner.secret#level-done-button(data-i18n="play_level.done") Done
button.btn.btn-xs.btn-primary.banner#level-done-button(data-i18n="play_level.done") Done