コード例 #1
0
 internal override void PostEvent(IKnetikEvent e)
 {
     if (mListeners != null)
     {
         mListeners((T)e);
     }
 }
コード例 #2
0
        public void Publish(IKnetikEvent e)
        {
            UnityEngine.Debug.Assert(e != null, "Event System - parameter 'e' cannot be null!");

            EventPublisherBase subscriber = GetEventPublisherBase(e.GetType());

            if (subscriber != null)
            {
                try
                {
                    subscriber.PostEvent(e);
                }
                catch (Exception ex)
                {
                    KnetikLogger.LogError(string.Format("There was an error processing an event! Event: {0} : {1}, Reason: {2}.", e.GetType(), e, ex));
                }
            }
        }
コード例 #3
0
 internal abstract void PostEvent(IKnetikEvent e);
コード例 #4
0
 public static void Publish(IKnetikEvent e)
 {
     sEventSystem.Publish(e);
 }