22 lines
397 B
GDScript

extends Spatial
class_name BodyPart
# Must be the direct child of a BodyBase
onready var base = get_parent()
onready var physics_shape = get_node("CollisionShape")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
assert(base is BodyBase)
base.add_child(physics_shape)
remove_child(physics_shape)
# Do something with the base
func action():
pass