- 最后登录
- 2019-12-2
- 注册时间
- 2012-8-25
- 阅读权限
- 90
- 积分
- 34660
  
- 纳金币
- 38279
- 精华
- 111
|
2015-7-7 23:53 上传
Requires Unity 4.6.1 or higher - 需要使用Unity 4.6.1以上的版本
Code supports Unity 3.4 or higher
(The sample scene was created in Unity 4.0 and won't open in Unity 3.4, but the code works as expected.)
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.
Dispatch basic messages with two simple lines:
MessageDispatcher.AddListener("LEVEL_WON", OnLevelWon);
MessageDispatcher.SendMessage("LEVEL_WON");
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
Bonus: Includes a 'Profiler' for testing performance! Use this with any of your C# scripts.
Unity and Unity Pro versions supported.
Supports Unity 3.4+.
|
|