mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Analytics tracking individual note group starts/ends. Showing next level arrow faster. Added a couple munchkin names from one of yesterday's playtesters.
This commit is contained in:
parent
af686f562d
commit
9ebd09ec40
4 changed files with 9 additions and 2 deletions
|
@ -43,6 +43,7 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
|
|||
super(options)
|
||||
@originalScripts = options.scripts
|
||||
@session = options.session
|
||||
@levelID = options.levelID
|
||||
@debugScripts = application.isIPadApp or CocoView.getQueryVariable 'dev'
|
||||
@initProperties()
|
||||
@addScriptSubscriptions()
|
||||
|
@ -219,6 +220,8 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
|
|||
@notifyScriptStateChanged()
|
||||
@scriptInProgress = true
|
||||
@currentTimeouts = []
|
||||
scriptLabel = "#{@levelID}: #{nextNoteGroup.scriptID} - #{nextNoteGroup.name}"
|
||||
application.tracker?.trackEvent 'Script Started', {label: scriptLabel}, ['Google Analytics']
|
||||
console.debug "SCRIPT: Starting note group '#{nextNoteGroup.name}'" if @debugScripts
|
||||
for module in nextNoteGroup.modules
|
||||
@processNote(note, nextNoteGroup) for note in module.startNotes()
|
||||
|
@ -280,6 +283,8 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
|
|||
return if @ending # kill infinite loops right here
|
||||
@ending = true
|
||||
return unless @currentNoteGroup?
|
||||
scriptLabel = "#{@levelID}: #{@currentNoteGroup.scriptID} - #{@currentNoteGroup.name}"
|
||||
application.tracker?.trackEvent 'Script Ended', {label: scriptLabel}, ['Google Analytics']
|
||||
console.debug "SCRIPT: Ending note group '#{@currentNoteGroup.name}'" if @debugScripts
|
||||
clearTimeout(timeout) for timeout in @currentTimeouts
|
||||
for module in @currentNoteGroup.modules
|
||||
|
|
|
@ -177,6 +177,7 @@ module.exports.thangNames = thangNames =
|
|||
'Kog'
|
||||
'Ursa'
|
||||
'Ragtime'
|
||||
'Blob'
|
||||
]
|
||||
'Ogre Munchkin F': [
|
||||
'Iyert'
|
||||
|
@ -188,6 +189,7 @@ module.exports.thangNames = thangNames =
|
|||
'Inski'
|
||||
'Lacos'
|
||||
'Upfish'
|
||||
'Hoot'
|
||||
]
|
||||
'Ogre Peon M': [
|
||||
'Durbo'
|
||||
|
|
|
@ -104,7 +104,7 @@ module.exports = class WorldMapView extends RootView
|
|||
@$el.find('.level').tooltip()
|
||||
@$el.addClass _.string.slugify @terrain
|
||||
@updateVolume()
|
||||
@highlightElement '.level.next', delay: 2000, duration: 60000, rotation: 0, sides: ['top'] unless window.currentModal
|
||||
@highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top'] unless window.currentModal
|
||||
|
||||
onSessionsLoaded: (e) ->
|
||||
for session in @sessions.models
|
||||
|
|
|
@ -258,7 +258,7 @@ module.exports = class PlayLevelView extends RootView
|
|||
Backbone.Mediator.publish 'level:set-volume', volume: volume
|
||||
|
||||
initScriptManager: ->
|
||||
@scriptManager = new ScriptManager({scripts: @world.scripts or [], view: @, session: @session})
|
||||
@scriptManager = new ScriptManager({scripts: @world.scripts or [], view: @, session: @session, levelID: @level.get('slug')})
|
||||
@scriptManager.loadFromSession()
|
||||
|
||||
register: ->
|
||||
|
|
Loading…
Reference in a new issue