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"
|
restart: "Restart"
|
||||||
goals: "Goals"
|
goals: "Goals"
|
||||||
goal: "Goal"
|
goal: "Goal"
|
||||||
|
running: "Running..."
|
||||||
success: "Success!"
|
success: "Success!"
|
||||||
incomplete: "Incomplete"
|
incomplete: "Incomplete"
|
||||||
timed_out: "Ran out of time"
|
timed_out: "Ran out of time"
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
text-shadow: 1px 1px 0px black
|
text-shadow: 1px 1px 0px black
|
||||||
.incomplete
|
.incomplete
|
||||||
color: rgb(245, 170, 49)
|
color: rgb(245, 170, 49)
|
||||||
|
.running
|
||||||
|
color: rgb(200, 200, 200)
|
||||||
|
|
||||||
ul
|
ul
|
||||||
padding-left: 0
|
padding-left: 0
|
||||||
|
|
|
@ -2,6 +2,7 @@ ul#primary-goals-list
|
||||||
div.goals-status
|
div.goals-status
|
||||||
span(data-i18n="play_level.goals") Goals
|
span(data-i18n="play_level.goals") Goals
|
||||||
span.spr :
|
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.success").secret.goal-status.success Success!
|
||||||
span(data-i18n="play_level.incomplete").secret.goal-status.incomplete Incomplete
|
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
|
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:
|
subscriptions:
|
||||||
'goal-manager:new-goal-states': 'onNewGoalStates'
|
'goal-manager:new-goal-states': 'onNewGoalStates'
|
||||||
|
'tome:cast-spells': 'onTomeCast'
|
||||||
'level:set-letterbox': 'onSetLetterbox'
|
'level:set-letterbox': 'onSetLetterbox'
|
||||||
'surface:playback-restarted': 'onSurfacePlaybackRestarted'
|
'surface:playback-restarted': 'onSurfacePlaybackRestarted'
|
||||||
'surface:playback-ended': 'onSurfacePlaybackEnded'
|
'surface:playback-ended': 'onSurfacePlaybackEnded'
|
||||||
|
@ -76,6 +77,11 @@ module.exports = class LevelGoalsView extends CocoView
|
||||||
@lastSizeTweenTime = new Date()
|
@lastSizeTweenTime = new Date()
|
||||||
@updatePlacement()
|
@updatePlacement()
|
||||||
|
|
||||||
|
onTomeCast: (e) ->
|
||||||
|
return if e.preload
|
||||||
|
@$el.find('.goal-status').addClass('secret')
|
||||||
|
@$el.find('.goal-status.running').removeClass('secret')
|
||||||
|
|
||||||
onSurfacePlaybackRestarted: ->
|
onSurfacePlaybackRestarted: ->
|
||||||
@playbackEnded = false
|
@playbackEnded = false
|
||||||
@$el.removeClass 'brighter'
|
@$el.removeClass 'brighter'
|
||||||
|
|
Reference in a new issue