feat: instantiate dragons with initial animation

This commit is contained in:
Gerard Gascón 2025-04-09 18:13:50 +02:00
parent 48b6cd42cf
commit c422a83f59
6 changed files with 62 additions and 9 deletions

View file

@ -7,9 +7,13 @@ var dragging_start_position: Vector2i = Vector2i()
@onready var dragon: Dragon = $".."
var _initial_drag_requested: bool = false
func _ready() -> void:
set_process_input(true)
if _initial_drag_requested:
initial_drag()
func initial_drag():
@ -17,6 +21,10 @@ func initial_drag():
dragging = true
func queue_initial_drag():
_initial_drag_requested = true
func _input(event) -> void:
if event is not InputEventMouseButton:
return