mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-25 21:43:47 -04:00
Goals now show status: 'Running...' while the world is simulating.
This commit is contained in:
parent
fd36dc9d79
commit
189c3d202c
4 changed files with 10 additions and 0 deletions
app
locale
styles/play/level
templates/play/level
views/play/level
|
@ -190,6 +190,7 @@
|
|||
restart: "Restart"
|
||||
goals: "Goals"
|
||||
goal: "Goal"
|
||||
running: "Running..."
|
||||
success: "Success!"
|
||||
incomplete: "Incomplete"
|
||||
timed_out: "Ran out of time"
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
text-shadow: 1px 1px 0px black
|
||||
.incomplete
|
||||
color: rgb(245, 170, 49)
|
||||
.running
|
||||
color: rgb(200, 200, 200)
|
||||
|
||||
ul
|
||||
padding-left: 0
|
||||
|
|
|
@ -2,6 +2,7 @@ ul#primary-goals-list
|
|||
div.goals-status
|
||||
span(data-i18n="play_level.goals") Goals
|
||||
span.spr :
|
||||
span(data-i18n="play_level.running").secret.goal-status.running Running...
|
||||
span(data-i18n="play_level.success").secret.goal-status.success Success!
|
||||
span(data-i18n="play_level.incomplete").secret.goal-status.incomplete Incomplete
|
||||
span(data-i18n="play_level.timed_out").secret.goal-status.timed-out Ran out of time
|
||||
|
|
|
@ -16,6 +16,7 @@ module.exports = class LevelGoalsView extends CocoView
|
|||
|
||||
subscriptions:
|
||||
'goal-manager:new-goal-states': 'onNewGoalStates'
|
||||
'tome:cast-spells': 'onTomeCast'
|
||||
'level:set-letterbox': 'onSetLetterbox'
|
||||
'surface:playback-restarted': 'onSurfacePlaybackRestarted'
|
||||
'surface:playback-ended': 'onSurfacePlaybackEnded'
|
||||
|
@ -76,6 +77,11 @@ module.exports = class LevelGoalsView extends CocoView
|
|||
@lastSizeTweenTime = new Date()
|
||||
@updatePlacement()
|
||||
|
||||
onTomeCast: (e) ->
|
||||
return if e.preload
|
||||
@$el.find('.goal-status').addClass('secret')
|
||||
@$el.find('.goal-status.running').removeClass('secret')
|
||||
|
||||
onSurfacePlaybackRestarted: ->
|
||||
@playbackEnded = false
|
||||
@$el.removeClass 'brighter'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue