feat: choose outfit from library when creating a dragon
This commit is contained in:
parent
fd8609c0ab
commit
f07b28d2dc
22 changed files with 370 additions and 17 deletions
|
@ -2,7 +2,7 @@ extends Window
|
|||
class_name Dragon
|
||||
|
||||
@export var dragon_speed: float = 20.0
|
||||
@export var dragon: Node2D
|
||||
@export var dragon: DragonSprite
|
||||
|
||||
@onready var _actual_position: Vector2 = position
|
||||
var main_window_rect: Rect2i
|
||||
|
@ -40,6 +40,10 @@ func _process(delta: float) -> void:
|
|||
_move_to_target(delta)
|
||||
|
||||
|
||||
func dress(hat: Texture2D, shirt: Texture2D, shoes: Texture2D):
|
||||
dragon.dress(hat, shirt, shoes)
|
||||
|
||||
|
||||
func _move_to_target(delta: float):
|
||||
if _actual_position.distance_to(_target_pos) > 10.0:
|
||||
var direction: Vector2 = (_target_pos - _actual_position).normalized()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue