cg小白兔 发表于 2024-6-28 15:44:14

【更新】Event System - Dispatcher 1.646




Event and message dispatching is a critical part of any game. Message dispatching ensures that game objects are able to communicate in a consistent, reliable, and efficient way.

Dispatcher does this and makes it easy too! Simply tell the Dispatcher what an object wants to listen for. When another object sends that message to the Dispatcher, the Dispatcher will ensure all the "listeners" are notified.

Features
* Create and send custom message types
* Send messages containing custom data
* Send messages to everyone
* Send messages to objects based on their name
* Send messages to objects based on their tag
* Send messages to objects based on a string
* Send a message immediately
* Send a message at the next frame
* Schedule a message for the future
* Connect multiple listeners to a single message
* High performance



事件和消息派发是任何游戏的关键部分。消息派发可确保游戏对象以一致、可靠和高效的方式进行通信。

Dispatcher 可以做到这一点,而且还很简单!只需告诉调度程序某个对象想要监听什么信息。当另一个对象向调度程序发送该消息时,调度程序将确保通知所有 "监听者"。

功能
* 创建和发送自定义消息类型
* 发送包含自定义数据的消息
* 向所有人发送消息
* 根据对象名称向对象发送消息
* 根据标签向对象发送信息
* 根据字符串向对象发送信息
* 立即发送信息
* 在下一帧发送信息
* 为未来安排一条信息
* 将多个监听器连接到一条信息
* 高性能



页: [1]
查看完整版本: 【更新】Event System - Dispatcher 1.646