Fix for point/region choosers destroying AudioPlayer's camera. Fix for DOM highlight arrow covering up level info on iPad.

This commit is contained in:
Nick Winter 2014-10-24 13:03:10 -07:00
parent 8cc5c4d873
commit 42b81fd55e
3 changed files with 3 additions and 2 deletions

View file

@ -93,7 +93,7 @@ class AudioPlayer extends CocoClass
filename = if _.string.startsWith(name, '/file/') then name else '/file/' + name
unless @hasLoadedSound filename
@soundsToPlayWhenLoaded[name] = audioOptions.volume
audioOptions = @applyPanning audioOptions, pos if @camera and pos
audioOptions = @applyPanning audioOptions, pos if @camera and not @camera.destroyed and pos
instance = createjs.Sound.play name, audioOptions
# For some reason, individual sound volume control doesn't work any more.
# I tried updating to SoundJS NEXT on 2014-09-10, but couldn't get any sounds to play with that one.

View file

@ -99,7 +99,7 @@ module.exports = Surface = class Surface extends CocoClass
@normalStage = new createjs.Stage(@normalCanvas[0])
@webGLStage = new createjs.SpriteStage(@webGLCanvas[0])
@normalStage.nextStage = @webGLStage
@camera = AudioPlayer.camera = new Camera @webGLCanvas
@camera = AudioPlayer.camera = new Camera @webGLCanvas unless @options.choosing
@normalLayers.push @surfaceTextLayer = new Layer name: 'Surface Text', layerPriority: 1, transform: Layer.TRANSFORM_SURFACE_TEXT, camera: @camera
@normalLayers.push @gridLayer = new Layer name: 'Grid', layerPriority: 2, transform: Layer.TRANSFORM_SURFACE, camera: @camera

View file

@ -128,6 +128,7 @@ module.exports = class WorldMapView extends RootView
levelID = $(e.target).parents('.level').data('level-id')
@$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show()
@adjustLevelInfoPosition e
@endHighlight()
else
levelElement = $(e.target).parents('.level')
levelID = levelElement.data('level-id')