Card cast
This commit is contained in:
parent
7df936cd01
commit
52572f8c37
17 changed files with 124 additions and 30 deletions
12
systems/grid_reciever.gd
Normal file
12
systems/grid_reciever.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends Node
|
||||
|
||||
@onready var grid: Grid = get_parent()
|
||||
|
||||
func _ready() -> void:
|
||||
GameplaySignalBus.spawn_unit.connect(on_unit_spawned)
|
||||
|
||||
func on_unit_spawned(unit: Unit):
|
||||
if grid.try_set_unit(unit.global_position,unit):
|
||||
GameplaySignalBus.unit_spawn_confirmed.emit()
|
||||
else:
|
||||
GameplaySignalBus.unit_spawn_cancelled.emit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue