mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Started highlight arrow sound A/B test. Hid more of the HUD when hiding. Support for knowing whether your killer was hurt when firing world:thang-died notes.
This commit is contained in:
parent
a1695993db
commit
01fccf5ab7
5 changed files with 17 additions and 5 deletions
app
models
schemas/subscriptions
styles/play/level
views
|
@ -88,3 +88,13 @@ module.exports = class User extends CocoModel
|
|||
@branchingGroup = 'choice-explicit' if me.isAdmin()
|
||||
application.tracker.identify branchingGroup: @branchingGroup
|
||||
@branchingGroup
|
||||
|
||||
getHighlightArrowSoundGroup: ->
|
||||
return @highlightArrowGroup if @highlightArrowGroup
|
||||
group = me.get('testGroupNumber') % 8
|
||||
@highlightArrowGroup = switch group
|
||||
when 0, 1, 2, 3 then 'sound-off'
|
||||
when 4, 5, 6, 7 then 'sound-on'
|
||||
@highlightArrowGroup = 'sound-off' if me.isAdmin()
|
||||
application.tracker.identify highlightArrowGroup: @highlightArrowGroup
|
||||
@highlightArrowGroup
|
||||
|
|
|
@ -8,6 +8,7 @@ module.exports =
|
|||
replacedNoteChain: {type: 'array'}
|
||||
thang: {type: 'object'}
|
||||
killer: {type: 'object'}
|
||||
killerHealth: {type: ['number', 'undefined']}
|
||||
|
||||
'world:thang-touched-goal': c.object {required: ['actor', 'touched']},
|
||||
replacedNoteChain: {type: 'array'}
|
||||
|
|
|
@ -48,9 +48,10 @@
|
|||
background-image: url(/images/level/hud_right_wing.png)
|
||||
background-position: left
|
||||
|
||||
&.hide-hud-properties .center .thang-props
|
||||
visibility: hidden
|
||||
position: absolute
|
||||
&.hide-hud-properties .center
|
||||
.thang-props, .thang-actions
|
||||
visibility: hidden
|
||||
position: absolute
|
||||
|
||||
.center
|
||||
width: 560px
|
||||
|
|
|
@ -351,7 +351,8 @@ module.exports = class CocoView extends Backbone.View
|
|||
animatePointer: =>
|
||||
$pointer = @getPointer()
|
||||
$pointer.css transition: 'all 0.6s ease-out', transform: "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance-50}px)"
|
||||
#Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'dom_highlight', volume: 0.75 # Never mind, this is currently so annoying
|
||||
if me.getHighlightArrowSoundGroup() is 'sound-on'
|
||||
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'dom_highlight', volume: 0.5
|
||||
setTimeout (=> $pointer.css transition: 'all 0.4s ease-in', transform: "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance}px)"), 800
|
||||
|
||||
endHighlight: ->
|
||||
|
|
|
@ -588,7 +588,6 @@ module.exports = class SpellView extends CocoView
|
|||
io: '//'
|
||||
commentStart = commentStarts[@spell.language] or '//'
|
||||
@_singleLineCommentRegexp ?= new RegExp "[ \t]*#{commentStart}[^\"'\n]*", 'g'
|
||||
console.log 'got', @_singleLineCommentRegexp, 'from', "[ \t]*#{commentStart}[^\"']*", 'comment start is', commentStart, 'acuse lang is', @spell.language
|
||||
@_singleLineCommentRegexp
|
||||
|
||||
preload: ->
|
||||
|
|
Loading…
Add table
Reference in a new issue