AnidemDex / AnidemDex/Blockflow

Implement event behavior

未关闭
#149 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
discussion editor enhancement
主要语言
GDScript
星标
118
派生
9
PR 合并指标
30 天内没有已合并 PR

描述

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)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。