mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Add static messages to game dev levels for playtesting
This commit is contained in:
parent
c89ee139ed
commit
51b292cc3d
3 changed files with 28 additions and 2 deletions
|
@ -12,6 +12,10 @@ $level-resize-transition-time: 0.5s
|
|||
|
||||
&.real-time
|
||||
// Hmm, somehow the #page-container is cutting us off by ~17px on the right, looks a bit off.
|
||||
|
||||
&.real-time.game-dev
|
||||
#canvas-wrapper
|
||||
width: 80%
|
||||
|
||||
#canvas-wrapper
|
||||
width: 100%
|
||||
|
@ -294,6 +298,13 @@ $level-resize-transition-time: 0.5s
|
|||
right: 0
|
||||
left: 0
|
||||
bottom: 0
|
||||
|
||||
#how-to-play-game-dev-panel
|
||||
position: absolute
|
||||
right: 0
|
||||
top: 52px
|
||||
width: 20%
|
||||
bottom: 38px
|
||||
|
||||
html.fullscreen-editor
|
||||
#level-view
|
||||
|
|
|
@ -56,7 +56,7 @@ if view.showAds()
|
|||
else
|
||||
span(data-i18n="play_level.skip")
|
||||
|
||||
#how-to-play-game-dev-panel.panel.panel-default.hide
|
||||
#how-to-play-game-dev-panel.panel.panel-default.hide.style-flat
|
||||
.panel-heading
|
||||
h3.panel-title How to play:
|
||||
.panel-body
|
||||
|
|
|
@ -635,7 +635,22 @@ module.exports = class PlayLevelView extends RootView
|
|||
# Real-time playback
|
||||
onRealTimePlaybackStarted: (e) ->
|
||||
@$el.addClass('real-time').focus()
|
||||
@$('#how-to-play-game-dev-panel').removeClass('hide') if @level.isType('game-dev')
|
||||
if @level.isType('game-dev')
|
||||
panel = @$('#how-to-play-game-dev-panel')
|
||||
panel.removeClass('hide')
|
||||
lines = switch @level.get('slug')
|
||||
when 'over-the-garden-wall' then ['Watch to see if the peasants are properly protected.']
|
||||
when 'click-gait' then ['Move to each red "X".', 'Click on the screen to move the Knight there.']
|
||||
when 'heros-journey' then ['Move to each red "X".', 'Click on the screen to move the Knight there.']
|
||||
when 'a-maze-ing' then ['Move to the chest of gems.', 'Click on the screen to move the Duelist there.']
|
||||
when 'gemtacular' then ['Move to each of the gems.', 'Click on the screen to move the Captain there.']
|
||||
when 'vorpal-mouse' then ['Slay the ogres.', 'Click on the screen to move the Guardian there.', 'Click on the munchkins to attack them!']
|
||||
when 'crushing-it' then ['Slay the ogres.', 'Click on the screen to move the Goliath there.', 'Click on the munchkins to attack them!']
|
||||
when 'tabula-rasa' then ['Slay any ogres.', 'Collect any coins.', 'Click on the screen to move the Raider there.', 'Click on any munchkins to attack them!']
|
||||
else ['Click to control your hero and win your game!']
|
||||
html = _.map(lines, (line) -> "<p>#{line}</p>").join('')
|
||||
panel.find('.panel-body').html(html)
|
||||
|
||||
@onWindowResize()
|
||||
|
||||
onRealTimePlaybackEnded: (e) ->
|
||||
|
|
Loading…
Reference in a new issue