mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
Don't try to draw a grid if it's not going to work (no lands).
This commit is contained in:
parent
76ec738213
commit
eec46dcb48
1 changed files with 2 additions and 0 deletions
|
@ -418,6 +418,8 @@ module.exports = Surface = class Surface extends CocoClass
|
|||
@gridShape.alpha = 0.125
|
||||
@gridShape.graphics.beginStroke "blue"
|
||||
gridSize = Math.round(@world.size()[0] / 20)
|
||||
unless gridSize > 0.1
|
||||
return console.error "Grid size is", gridSize, "so we can't draw a grid."
|
||||
wopStart = x: 0, y: 0
|
||||
wopEnd = x: @world.size()[0], y: @world.size()[1]
|
||||
supStart = @camera.worldToSurface wopStart
|
||||
|
|
Loading…
Reference in a new issue