All Questions

Community

D
clifford william
posted to: The Spawn State

Why not use yield(owner.animator, "animation_finished")?

Is there any reason not to use this? Instead of using signals from owner?
  • Nathan Lovato replied

    It's mostly because the skin's a separate scene so we kind of encapsulate its internals and work through its interface. The idea is the states are components of the player scene so we allow them to access any direct child of the Player node, as if their code was part of the Player script.

    But in the team, we generally avoid accessing the children of scene instances and provide public methods, properties, and signals to do so instead.