1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
extends Node2D
func _draw():
var area = Client.stage.map.get_used_rect()
var cell_size = Client.stage.map.tile_set.tile_size
var offset = Client.stage.map.position
for row in range(0, area.size.y + 1):
draw_line(
Vector2(offset.x, offset.y + row * cell_size.y),
Vector2(offset.x + area.size.x * cell_size.x, offset.y + row * cell_size.y),
Color(1, 1, 1, 0.25),
1.0
)
for column in range(0, area.size.x + 1):
draw_line(
Vector2(offset.x + column * cell_size.x, offset.y),
Vector2(offset.x + column * cell_size.x, offset.y + area.size.y * cell_size.y),
Color(1, 1, 1, 0.25),
1.0
)
|