Visual novel scene progress
This commit is contained in:
16
scripts/battle/grid_overlay.gd
Normal file
16
scripts/battle/grid_overlay.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
class_name GridOverlay extends TileMapLayer
|
||||
|
||||
const SOURCE_ID = 0
|
||||
const HIGHLIGHT_SPRITE_ID = Vector2i(0,0)
|
||||
|
||||
@onready var targeting_selector: Sprite2D = $TargetingIndicator
|
||||
|
||||
func highlight_tile(coords: Vector2i) -> void:
|
||||
set_cell(coords, SOURCE_ID, HIGHLIGHT_SPRITE_ID)
|
||||
|
||||
func clear_tile(coords: Vector2i) -> void:
|
||||
set_cell(coords)
|
||||
|
||||
func target_tile(coords: Vector2i) -> void:
|
||||
targeting_selector.position = coords * tile_set.tile_size
|
||||
targeting_selector.visible = true
|
||||
Reference in New Issue
Block a user