FairyGUI.EventDispatcher.GetEventBridge C# (CSharp) Method

GetEventBridge() private method

private GetEventBridge ( string strType ) : EventBridge
strType string
return EventBridge
        internal EventBridge GetEventBridge(string strType)
        {
            if (_dic == null)
                _dic = new Dictionary<string, EventBridge>();

            EventBridge bridge = null;
            if (!_dic.TryGetValue(strType, out bridge))
            {
                bridge = new EventBridge(this);
                _dic[strType] = bridge;
            }
            return bridge;
        }

Usage Example

示例#1
0
 public EventListener(EventDispatcher owner, string type)
 {
     _bridge = owner.GetEventBridge(type);
     _type   = type;
 }