actually, and for my personal game project purpose,
I develop a custom event manager with delegates and events.
There are 4 parts :
- the events manager
- the events listener
- the events trigger
- the events scripts who are called by the events listener.
For example, here I chose Start (like Awake, Update, ...) and the action is "Show Cursor Action".
Then you press the button add, and you add the action to the list below.
When you press the button, a method will verify if the chosen action must use some data models or not with some reflexion.
It is the first time I use delegate and events, so it is not perfect yet and not finished.
I also put some code on the Unity community forum.
http://forum.unity3d.com/threads/custom-event-manager-how-can-i-trigger-events-base-on-a-list-of-actions.289894/
0 commentaires:
Post a Comment