generated from krampus/template-godot4
16 lines
262 B
GDScript
16 lines
262 B
GDScript
extends Node3D
|
|
|
|
@export var beast_scene: PackedScene
|
|
|
|
|
|
func spawn() -> void:
|
|
despawn()
|
|
var instance: GrunkBeast = beast_scene.instantiate()
|
|
add_child(instance)
|
|
instance.start_spawn()
|
|
|
|
|
|
func despawn() -> void:
|
|
for c: Node in get_children():
|
|
c.queue_free()
|