Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer node instance events during load #12

Open
Fydar opened this issue Oct 30, 2019 · 0 comments
Open

Buffer node instance events during load #12

Fydar opened this issue Oct 30, 2019 · 0 comments
Assignees
Labels
📦 RPGCore.Behaviour Issue related to the RPGCore.Behaviour package New feature or request

Comments

@Fydar
Copy link
Owner

Fydar commented Oct 30, 2019

The sequence in which a graph is instantiated into the game should be as follows:

  • Create the GraphInstance from the Graph.
    • Instantiate all the node instances.
    • Assign connection outputs from save file.
    • Map inputs and outputs of all nodes.
  • Call GraphInstance.Setup().
    • Prevent events from firing.
    • Run the node instance .Setup() method.
    • Allow events from the .Setup() method to fire.

This means that, whenever a node is loaded from a save file or instantiated for the first time, the node will act using it's default values, and then change the values to it's desired ones.

Events need to be buffered during this loading phase as the nodes that haven't been .Setup() yet cannot act on the event.

Event buffering will also be useful to prevent nodes firing more events than nessessary.

@Fydar Fydar added the New feature or request label Oct 30, 2019
@Fydar Fydar self-assigned this Oct 30, 2019
@Fydar Fydar added the 📦 RPGCore.Behaviour Issue related to the RPGCore.Behaviour package label Feb 19, 2020
@Fydar Fydar moved this to Todo in RPGCore Development Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 RPGCore.Behaviour Issue related to the RPGCore.Behaviour package New feature or request
Projects
Development

No branches or pull requests

1 participant