Verse Library verse

02 Fragment

Finds descendant interactable components and subscribes their success events to a collection handler.

verse-library/verse-scene-graph-build-a-system/02-fragment.verse

# Find the interactable components below us and listen to each one.
Interactables := Entity.FindDescendantComponents(interactable_component)
for (Interactable : Interactables):
    Interactable.SucceededEvent.Subscribe(OnCollected)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in