2023-10-06 11:40:11 +02:00
|
|
|
extends StaticBody2D
|
|
|
|
|
|
|
|
|
2023-10-06 19:36:59 +02:00
|
|
|
signal on_placement(pos: Vector2, tower_placement_id: int)
|
2023-10-06 11:40:11 +02:00
|
|
|
|
2023-10-06 19:36:59 +02:00
|
|
|
func _on_input_event(_viewport, event, _shape_idx):
|
2023-10-06 11:40:11 +02:00
|
|
|
var mouse_click = event as InputEventMouseButton
|
|
|
|
if mouse_click and mouse_click.button_index == 1 and mouse_click.pressed:
|
|
|
|
on_placement.emit(global_position, get_instance_id())
|