Input Event Source Generator
by
Moth
| Summary | An strong typed source generator for event based Input capture |
|---|---|
| Description |
Access to Input - Generate Typed Inputs from editor and it will auto-generate an event "Pressed", "Down" and "Released" for each input registered. Usage: Add Input Broadcaster Service to the scene. Listen to event (OnStart or where required) Sandbox.InputManager.GeneratedInput.Pressed.Jump += MyImplementation; If listening to event the event listener MUST be disconnected (OnDestroy and where you need it) Sandbox.InputManager.GeneratedInput.Pressed.Jump -= MyImplementation; Then you can implement any behavior you want or set the variables you need, example: private void MyImplementation() { DoJump(); IsJumping = true; }Access to Input - Generate Typed Inputs from editor and it will auto-generate an event "Pressed", "Down" and "Released" for each input registered.
Usage:
Add Input Broadcaster Service to the scene.
Listen to event (OnStart or where required)
Sandbox.InputManager.GeneratedInput.Pressed.Jump += MyImplementation;
If listening to event the event listener MUST be disconnected (OnDestroy and where you need it)
Sandbox.InputManager.GeneratedInput.Pressed.Jump -= MyImplementation;
Then you can implement any behavior you want or set the variables you need, example:
private void MyImplementation() { DoJump(); IsJumping = true; }
|
| Votes | 👍0 👎0 ❤️0 |
| Error Rate | 0% |
| Data | {} |
| Version | Created | Size (modified) | Files | Changes |
|---|---|---|---|---|
| 237020 | 87.2 KB | 18 +18 | Initial release |
Loading history…