Friday, 9 January 2015

Custom Event Trigger development (Unity3D and C#)

Hello everybody,

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 the event trigger script, the user can choose when an action must be trigger and the action type.
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

 
Copyright 2014 Polygon Experiment