/// <summary> /// 初始化事件池的新实例。 /// </summary> /// <param name="mode">事件池模式。</param> public EventPool(EventPoolMode mode) { m_EventHandlers = new Dictionary <int, LinkedList <EventHandler <T> > >(); m_Events = new Queue <Event>(); m_EventPoolMode = mode; m_DefaultHandler = null; }
public EventPool(EventPoolMode eventPoolMode, int maxOperatorNumber = 64) { events = new Dictionary <int, EventHandler <T> >(); eventList = new SafetyQueue <LE_Event <T> >(); this.eventPoolMode = eventPoolMode; this.maxOperatorNumber = maxOperatorNumber; }
/// <summary> /// 初始化事件池的新实例。 /// </summary> /// <param name="mode">事件池模式。</param> public EventPool(EventPoolMode mode) { m_EventHandlers = new Dictionary <int, GameFrameworkLinkedList <EventHandler <T> > >(); m_Events = new Queue <Event>(); m_CachedNodes = new Dictionary <object, LinkedListNode <EventHandler <T> > >(); m_TempNodes = new Dictionary <object, LinkedListNode <EventHandler <T> > >(); m_EventPoolMode = mode; m_DefaultHandler = null; }
/// <summary> /// 初始化事件池的新实例 /// </summary> /// <param name="mode"></param> public EventPool(EventPoolMode mode) { _eventHandlers = new Dictionary <int, LinkedList <EventHandler <T> > >(); _events = new Queue <Event>(); _cachedNodes = new Dictionary <object, LinkedListNode <EventHandler <T> > >(); _tempNodes = new Dictionary <object, LinkedListNode <EventHandler <T> > >(); _eventPoolMode = mode; _defaultHandler = null; }
public EventPool(EventPoolMode mode) { m_EventHandlers = new Dictionary <int, EventHandler <T> >(); m_Events = new Queue <Event>(); m_EventPoolMode = mode; }
public static void OnInit(EventPoolMode mode) { eventPool = new EventPool <T>(mode); }