Signal Kit
Relative Motion
$10.00
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
03/19(2018) |
10.0 |
11/01(2024) |
10.0 |
Jump AssetStore
Signal Kit is a simple signal library that can be used in editor or runtime code. Signals allow you to send messages to subscribers without having to worry about how to find them.
To use Signal Kit you need 3 simple parts:
1. A Signal Manager (See Demo/Scripts/DemoSignalManager.cs) - This is a class you create that extends SKSignalManager. In it, you simply define the signals you want to use.
2. Signal Handler(s) (See Demo/Scripts/DemoLightSignalHandler.cs) - This is simply any component that subscribes and responds to signals.
3. Signal Emitter(s) (See Demo/Scripts/DemoSignalEmitter.cs) - Any script that emits signals. You can also emit signals via animation key events (See Demo/Scripts/DemoAnimEventEmitter.cs). Just add this script to any GameObject you wish to be able to emit via animation event, then add event with the function name EmitSignal.
Signals are added in your Signal Manager as mentioned above. Each signal can pass up to 4 parameters (if you need to pass more than that, you’ll need to package them up in a class or struct and pass that).