blob: f06c7bf46aa84494c3f511b8cf27cddf2229a79d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#warning-ignore-all:unused_argument
extends Tile
class_name Hex, "res://godot/Tile.png"
func inspect() -> String:
return "[%d;%d] %s" % [coords.x,coords.y,not blocked]
func block(b : bool) -> void:
enable_overlay(0, b)
func is_blocked() -> bool:
return is_overlay_on(0)
func block_los(from : Tile, to : Tile, d : float, dt : float) -> bool:
return is_blocked()
func show_los(b) -> void:
if not b:
enable_overlay(1, false)
enable_overlay(2, false)
else:
if blocked: enable_overlay(2, true)
else: enable_overlay(1, true)
|