AnidemDex / AnidemDex/Blockflow

Implement event behavior

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
discussion editor enhancement
Dominant language
GDScript
Stars
118
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Right now, we have to call some functions manually to make the processor work, which is kinda expected due the way the plugin was designed at the beginning, but is not ideal if we want to do _everything_ with the visual script.

The solution I propose would be implementing an event behavior system, one that lets us define some callbacks to start the processing of `CommandCollection` without needing to call `start` manually (and even letting us execute collections in main loops like `_process`).

![image-44.png](https://github.com/AnidemDex/Blockflow/assets/7025991/555dcbc3-deb4-49be-ba09-500b2c47164b)

- `Event`s will be tied to the node, reflecting an internal callback or a signal connection _in the scene_. I don't know if due this nature we'll not be able to use the default Godot signal connection helper, maybe we'll need to integrate a new one to make a proper connection; personally I prefer it this way, it gives us more control about how the connection will be handled and how the event is created.

- `Event`s will have a default descriptive name (as you see in the screenshot) and a way to be renamed as whatever the user wants. This is not a priority, but is something that must be implemented.

- Each `Event` will define one (and only one) `CommandCollection` to execute when the event fires.

This also introduces the processing of collections in parallel in order to handle multiple events at the same time, so maybe a new processor will be needed to not break the current processor (since it only handles one collection at time)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.