mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-28 13:50:07 -04:00
New graph structure for viewing path finding data.
This commit is contained in:
parent
c780863545
commit
5a78d92173
1 changed files with 5 additions and 2 deletions
|
@ -114,6 +114,7 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
|
||||
showPathFinding: ->
|
||||
@hidePathFinding()
|
||||
|
||||
mesh = _.values(@world.navMeshes or {})[0]
|
||||
return unless mesh
|
||||
@navRectangles = new createjs.Container()
|
||||
|
@ -121,10 +122,12 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
@addMeshRectanglesToContainer mesh, @navRectangles
|
||||
@surfaceLayer.addChild @navRectangles
|
||||
@surfaceLayer.updateLayerOrder()
|
||||
return @surfaceLayer.updateLayerOrder() unless @world.graph
|
||||
|
||||
graph = _.values(@world.graphs or {})[0]
|
||||
return @surfaceLayer.updateLayerOrder() unless graph
|
||||
@navPaths = new createjs.Container()
|
||||
@navPaths.layerPriority = -1
|
||||
@addNavPathsToContainer @world.graph, @navPaths
|
||||
@addNavPathsToContainer graph, @navPaths
|
||||
@surfaceLayer.addChild @navPaths
|
||||
@surfaceLayer.updateLayerOrder()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue