17 lines
411 B
GDScript
17 lines
411 B
GDScript
extends Node3D
|
|
|
|
@export var balloon_resource: String = "res://Resources/meshes/dog.tres"
|
|
signal balloon_chosen
|
|
|
|
func _ready() -> void:
|
|
$Balloon_model.mesh = load(balloon_resource)
|
|
|
|
|
|
func _on_area_3d_body_entered(body: Node3D) -> void:
|
|
if not body.is_in_group("throwable") and not body is Player:
|
|
return
|
|
balloon_chosen.emit(balloon_resource)
|
|
|
|
func set_mesh(mesh: String):
|
|
$Balloon_model.mesh = load(mesh)
|