Exemplo n.º 1
0
 public virtual void UnregisterListener(MEventListener listener)
 {
     if (eventListeners.Contains(listener))
     {
         eventListeners.Remove(listener);
     }
 }
Exemplo n.º 2
0
 public virtual void RegisterListener(MEventListener listener)
 {
     if (!eventListeners.Contains(listener))
     {
         eventListeners.Add(listener);
     }
 }
        private void OnEnable()
        {
            M      = ((MEventListener)target);
            script = MonoScript.FromMonoBehaviour(M);

            eventsListeners = serializedObject.FindProperty("Events");
            // debug = serializedObject.FindProperty("debug");

            list = new ReorderableList(serializedObject, eventsListeners, true, true, true, true);
            list.drawElementCallback = drawElementCallback;
            list.drawHeaderCallback  = HeaderCallbackDelegate;
            list.onAddCallback       = OnAddCallBack;
        }