feat: instantiating dragons to ingame position

This commit is contained in:
Gerard Gascón 2025-04-04 17:32:41 +02:00
parent fc921cc900
commit 610d623653
8 changed files with 64 additions and 19 deletions

View file

@ -0,0 +1,17 @@
extends Area2D
class_name DragonEntity
signal on_pick(position)
func _ready() -> void:
set_process_input(true)
func _input_event(viewport, event, shape_idx) -> void:
if event is InputEventMouseButton \
and event.button_index == MOUSE_BUTTON_LEFT \
and event.is_pressed():
on_pick.emit(position)
queue_free()