extends StaticBody2D signal on_placement(pos: Vector2, tower_placement_id: int) # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): pass func _on_input_event(viewport, event, shape_idx): 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())