Unity event manager draft:
"Press q to make it bacon"
Type safe event manager (http://www.willrmiller.com/?p=87) with communication (data sended to events) between sender and receiver.
EventManager.cs is the main asset, all other assets are here like an example.
On the project side we have:
- Contents with explosion from asset store, sound and texture on the scene
- Scenes have the only scene of the project
- Scripts have to folder one with the Event Manager and the other with sample scripts (pig lives, explosion, trigger of keyboard events and Basic event to send data to events)
Hierarchy has:
- Canvas
- Unity Event Manager
- Event Manager game object
- Trigger to launch keyboard event
- Scene Elements has: pig sprite and explosion game object
Resources and code:
Using base code from: http://www.willrmiller.com/?p=87
Pig sprite from: http://all-free-download.com/free-vector/download/pig_clip_art_7109.html
Explosion from asset store: http://u3d.as/94N
Explosion sound from: http://soundbible.com/1151-Grenade.html