godot-next icon indicating copy to clipboard operation
godot-next copied to clipboard

Implement simpler, editable initialization order for CallbackDelegator's Behaviors.

Open willnationsdev opened this issue 5 years ago • 0 comments

Users may need Behaviors associated with a CallbackDelegator to initialize in a particular order. Right now, it is initialized based on whatever order the internal Dictionary provides them. Since that may be different depending on how they've been inserted and isn't easily controlled by the user, we need to come up with a method of assigning a priority order to the behaviors.

We should probably expose a priority API for a CBD's behaviors. One option would be to store them in an Array as well as the Dictionary. Its simpler, and guarantees that the priority range is composed of exclusively the allowable order. Alternatively, we could use a priority map Dictionary to assign priorities to them. This makes the process of initialization more complicated though as there isn't a specific ordered list of behaviors to initialize.

willnationsdev avatar Mar 31 '19 18:03 willnationsdev