コード例 #1
0
ファイル: EventManager.cs プロジェクト: fdu5526/balloon
 public void RegistersEvent(EventDefine eventName , EventHandler handler , object sender = null )
 {
     if ( eventDict.ContainsKey(eventName) )
     {
         Dictionary<EventHandler,EventClass> ecDict;
         eventDict.TryGetValue(eventName, out ecDict);
         if ( ecDict == null )
         {
             Debug.LogError("No event class list found in " + eventName.ToString() +"'s dictionary");
         }else
         {
             if ( ecDict.ContainsKey(handler) )
             {
                 Debug.LogError("Mutiply define of handler" + eventName.ToString());
             }else
             {
                 ecDict.Add(handler, new EventClass(eventName,handler,sender));
             }
         }
     }
     else
     {
         var ecDict = new Dictionary<EventHandler,EventClass>();
         ecDict.Add(handler, new EventClass(eventName,handler,sender));
         eventDict.Add(eventName, ecDict);
     }
 }
コード例 #2
0
 void EnterStayAway(EventDefine eventName, object sender , EventArgs args )
 {
     GameObject obj = sender as GameObject;
     parItem.SetActive(false);
     parPers.SetActive(false);
     if ( obj.GetComponent<Person>() != null )
         parPers.SetActive(true);
     if ( obj.GetComponent<Item>() != null )
         parItem.SetActive(true);
 }
コード例 #3
0
    public bool ContainClockEvent(EventDefine eventName)
    {
        for( int i = 0; i < m_ClockEvents.Count; i++ )
        {
            if( m_ClockEvents[i].m_Name == eventName )
                return true;
        }

        return false;
    }
コード例 #4
0
 void OnTokenInit(EventDefine eventName, object sender, EventArgs args)
 {
     foreach( GuideInfo gInfo in guideInfoList )
     {
         string movieName = ((MessageEventArgs)args).GetMessage("name");
         if ( gInfo.movieName.Equals( movieName ))
         {
             StartGuide( gInfo );
         }
     }
 }
コード例 #5
0
 void LevelAfter(EventDefine eventName, object sender , EventArgs args )
 {
     if ( LogicManager.Instance.tempLevel.level.Equals(level))
     {
         parItem.SetActive(false);
         parPers.SetActive(false);
         StartCoroutine(fadeTo(1f));
     }else
     {
         StartCoroutine( fadeTo( 0 ));
     }
 }
コード例 #6
0
    //no parameters
    public static void Broadcast(EventDefine eventType)
    {
        Delegate d;

        if (m_EventTable.TryGetValue(eventType, out d))
        {
            CallBack callBack = d as CallBack;
            if (callBack != null)
            {
                callBack();
            }
            else
            {
                throw new Exception(string.Format("Erro in broadcasting: event {0} has a different delegate type.", eventType));
            }
        }
    }
コード例 #7
0
ファイル: EventCenter.cs プロジェクト: Hengle/CssD_Template
    //five parameters
    public static void Broadcast <T, X, Y, Z, W>(EventDefine EventDefine, T arg1, X arg2, Y arg3, Z arg4, W arg5)
    {
        Delegate d;

        if (m_EventTable.TryGetValue(EventDefine, out d))
        {
            CallBack <T, X, Y, Z, W> callBack = d as CallBack <T, X, Y, Z, W>;
            if (callBack != null)
            {
                callBack(arg1, arg2, arg3, arg4, arg5);
            }
            else
            {
                throw new Exception(string.Format("广播事件错误:事件{0}对应委托具有不同的类型", EventDefine));
            }
        }
    }
コード例 #8
0
ファイル: EventCenter.cs プロジェクト: Hengle/CssD_Template
    //single parameters
    public static void Broadcast <T>(EventDefine EventDefine, T arg)
    {
        Delegate d;

        if (m_EventTable.TryGetValue(EventDefine, out d))
        {
            CallBack <T> callBack = d as CallBack <T>;
            if (callBack != null)
            {
                callBack(arg);
            }
            else
            {
                throw new Exception(string.Format("广播事件错误:事件{0}对应委托具有不同的类型", EventDefine));
            }
        }
    }
コード例 #9
0
ファイル: EventCenter.cs プロジェクト: loneys/ZJHGameClient
    /// <summary>
    /// 广播监听,两个参数
    /// </summary>
    /// <param name="eventType"></param>
    public static void Broadcast <T, X, Y>(EventDefine eventType, T arg1, X arg2, Y arg3)
    {
        Delegate d;

        if (m_EventTable.TryGetValue(eventType, out d))
        {
            CallBack <T, X, Y> callBack = d as CallBack <T, X, Y>;
            if (callBack != null)
            {
                callBack(arg1, arg2, arg3);
            }
            else
            {
                throw new Exception(string.Format("广播事件错误,事件{0}对应委托具有不同的类型", eventType));
            }
        }
    }
コード例 #10
0
ファイル: EventCenter.cs プロジェクト: loneys/ZJHGameClient
    /// <summary>
    /// 广播监听,没有参数
    /// </summary>
    /// <param name="eventType"></param>
    public static void Broadcast(EventDefine eventType)
    {
        Delegate d;

        if (m_EventTable.TryGetValue(eventType, out d))
        {
            CallBack callBack = d as CallBack;
            if (callBack != null)
            {
                callBack();
            }
            else
            {
                throw new Exception(string.Format("广播事件错误,事件{0}对应委托具有不同的类型", eventType));
            }
        }
    }
コード例 #11
0
ファイル: BEventManager.cs プロジェクト: AtwoodDeng/BluePrint
    public long GetTimer(EventDefine eventName)
    {
        for (int i = 0; i < m_ClockEvents.Count; i++)
        {
            if (m_ClockEvents[i].m_Name == eventName)
            {
                DateTime clockEnd    = new DateTime(m_ClockEvents[i].m_LastUpdateTime + m_ClockEvents[i].m_TimeSpan * Global.SECOND_TO_TICKS);
                DateTime currentDate = DateTime.Now;

                long     elapsedTicks = clockEnd.Ticks - currentDate.Ticks;
                TimeSpan elapsedSpan  = new TimeSpan(elapsedTicks);

                return(Convert.ToInt64(elapsedSpan.TotalSeconds));
            }
        }

        return(0);
    }
コード例 #12
0
ファイル: BEventManager.cs プロジェクト: AtwoodDeng/BluePrint
    /**
     * Register an event handler to listen to events of type /eventName/,
     * from the given sender only.
     */
    public void RegisterEvent(EventDefine eventName, EventHandler handler, object sender, int priority = 1)
    {
        m_AddEvents.Add(new EventClass(eventName, sender, handler, priority));

        if (!priorityList.Contains(priority))
        {
            priorityList.Add(priority);
            priorityList.Sort();
            priorityList.Reverse();
        }

        /*
         * Dictionary<object, List<EventHandler>> handlers = m_EventDictionary[eventName];
         * if (!handlers.ContainsKey(sender))
         * handlers[sender] = new List<EventHandler>();
         * handlers[sender].Add(handler);
         */
    }
コード例 #13
0
 private static void OnListenerRemoving(EventDefine eventType, Delegate callBack)
 {
     if (m_EventTable.ContainsKey(eventType))
     {
         Delegate d = m_EventTable[eventType];
         if (d == null)
         {
             throw new Exception(string.Format("RemoveListener Error:there is no commision for Event(1)", eventType));
         }
         else if (d.GetType() != callBack.GetType())
         {
             throw new Exception(string.Format("RemoveListener Error:try to remove different commision from Event(0), current commision is 1, want to remove commision 2.", eventType, d.GetType(), callBack.GetType()));
         }
     }
     else
     {
         throw new Exception(string.Format("RemoveListener Error:there is no such event", eventType));
     }
 }
コード例 #14
0
 private static void OnListenerRemoving(EventDefine eventType, Delegate callBack)
 {
     if (m_EventTable.ContainsKey(eventType))
     {
         Delegate d = m_EventTable[eventType];
         if (d == null)
         {
             throw new Exception(string.Format("移除监听错误:事件{0}没有对应的委托", eventType));
         }
         else if (d.GetType() != callBack.GetType())
         {
             throw new Exception(string.Format("移除监听错误:尝试为事件{0}移除不同类型的委托,当前委托类型为{1},要移除的委托类型为{2}", eventType, d.GetType(), callBack.GetType()));
         }
     }
     else
     {
         throw new Exception(string.Format("移除监听错误:没有事件码{0}", eventType));
     }
 }
コード例 #15
0
 private static void OnListenerRemoving(EventDefine eventType, Delegate callBack)
 {
     if (m_EventTable.ContainsKey(eventType))
     {
         Delegate d = m_EventTable[eventType];
         if (d == null)
         {
             throw new Exception(string.Format("Erro in removing listener: delegate in current event not found.", eventType));
         }
         else if (d.GetType() != callBack.GetType())
         {
             throw new Exception(string.Format("Erro in removing listener:Removing a different delegate for event {0}. Delegate type for the even is {1}. Delegate type to be removed is {2}.", eventType, d.GetType(), callBack.GetType()));
         }
     }
     else
     {
         throw new Exception(string.Format("Erro in removing listener:Event {0} not exist", eventType));
     }
 }
コード例 #16
0
        private void OnBattleCardClicked(EventDefine type, System.Object[] args)
        {
            if (args.Length < 0 || args[0] != m_BattleCard.BattleCardObj)
            {
                return;
            }

            if (m_BattleCard.GetCardState() != CardStateType.E_CARD_STATE_WAITING)
            {
                return;
            }

            if (!m_BattleCard.IsDead)
            {
                return;
            }

            BoxManager.showMessageByID((int)MessageIdEnum.Msg135, Obj_MyselfPlayer.GetMe().money.ToString(), ((Obj_MyselfPlayer.GetMe().reviveCount + 1) * 1000).ToString());
            UIEventListener.Get(BoxManager.buttonYes).onClick += ReviveComfirmHandler;
        }
コード例 #17
0
    public Boolean UnRegisterEventHandler(EventDefine type, EventHandler handler)
    {
        if (handler == null)
        {
            return(false);
        }
        if (!m_EventHandlerList.ContainsKey(type))
        {
            return(false);
        }

        ArrayList handlerList = m_EventHandlerList[type];

        if (!handlerList.Contains(handler))
        {
            return(false);
        }

        handlerList.Remove(handler);
        return(true);
    }
コード例 #18
0
ファイル: EventManager.cs プロジェクト: fdu5526/balloon
 public void UnregistersEvent(EventDefine eventName , EventHandler handler)
 {
     if ( eventDict.ContainsKey(eventName))
     {
         Dictionary<EventHandler,EventClass> ecDict;
         eventDict.TryGetValue(eventName, out ecDict);
         if ( ecDict == null )
         {
             Debug.LogError("no event class list found in " + eventName.ToString() +"'s list");
         }else
         {
             if ( !ecDict.ContainsKey(handler) )
             {
                 // Debug.LogError("No define of handler" + eventName.ToString());
             }else
             {
                 ecDict.Remove(handler);
             }
         }
     }
 }
コード例 #19
0
        private void OnForwardBtn(EventDefine type, System.Object[] args)
        {
            if (GetBattleStateType() != BattleProcedureType.E_BATTLE_PROCEDURE_WAITING)
            {
                return;
            }

            if (Time.realtimeSinceStartup - m_ForwardBtnPressCounter < 3f / Time.timeScale)
            {
                return;
            }

            m_ForwardBtnPressCounter = Time.realtimeSinceStartup;

            //王明磊 : 统计模块代码 -> Statistics
            //如果是Guide阶段,需要统计此按钮的点击信息
            if (GameManager.Instance.isGuideMode())
            {
                switch (m_RoundCounter)
                {
                case 1:
                    PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn20).ToString());
                    break;

                case 2:
                    PlayerPrefsX.StatisticsIncrease("Btn" + ((int)StatisticsEnum.Btn21).ToString());
                    break;
                }
            }

            BattleCardManager.Instance.UpdateCardState();
            if (Obj_MyselfPlayer.GetMe().battleType == BattleType.PVE)
            {
                NetworkSender.Instance().AskBattleData(OnAskContinueBattleRet, m_RoundCounter + 1, Obj_MyselfPlayer.GetMe().curSubcopy.subCopyID);
            }
            else if (Obj_MyselfPlayer.GetMe().battleType == BattleType.CHONG_LOU)
            {
                NetworkSender.Instance().AskChonglouBattleData(OnAskContinuePataBattleRet);
            }
        }
コード例 #20
0
 public void UnregistersEvent(EventDefine eventName, EventHandler handler)
 {
     if (eventDict.ContainsKey(eventName))
     {
         Dictionary <EventHandler, EventClass> ecDict;
         eventDict.TryGetValue(eventName, out ecDict);
         if (ecDict == null)
         {
             Debug.LogError("no event class list found in " + eventName.ToString() + "'s list");
         }
         else
         {
             if (!ecDict.ContainsKey(handler))
             {
                 Debug.LogError("No define of handler" + eventName.ToString());
             }
             else
             {
                 ecDict.Remove(handler);
             }
         }
     }
 }
コード例 #21
0
 void Update()
 {
     foreach (EventInvocation eventInv in postEventList)
     {
         EventDefine tempEventName = eventInv.m_Name;
         foreach (EventHandler handler in eventDict[tempEventName].Keys)
         {
             EventClass eventClass = eventDict[tempEventName][handler];
             Message    msg        = eventInv.m_message;
             if (eventInv.m_sender == null)
             {
                 msg.SetSender(eventClass.m_sender);
             }
             else
             {
                 msg.SetSender(eventInv.m_sender);
             }
             msg.SetEventName(eventClass.m_Name);
             handler(msg);
         }
     }
     postEventList.Clear();
 }
コード例 #22
0
ファイル: EventCenter.cs プロジェクト: loneys/ZJHGameClient
 /// <summary>
 /// 移除监听,三个参数
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="callBack"></param>
 public static void RemoveListener <T, X, Y, Z>(EventDefine eventType, CallBack <T, X, Y, Z> callBack)
 {
     if (m_EventTable.ContainsKey(eventType))
     {
         Delegate d = m_EventTable[eventType];
         if (d == null)
         {
             throw new Exception(string.Format("移除监听错误:事件{0}没有对应的委托", eventType));
         }
         else if (d.GetType() != callBack.GetType())
         {
             throw new Exception(string.Format("移除监听错误:尝试为事件{0}移除不同类型的委托,当前委托类型为{1},要移除的委托类型为{2}", eventType, d.GetType(), callBack.GetType()));
         }
     }
     else
     {
         throw new Exception(string.Format("移除监听错误,没有事件码{0}", eventType));
     }
     m_EventTable[eventType] = (CallBack <T, X, Y, Z>)m_EventTable[eventType] - callBack;
     if (m_EventTable[eventType] == null)
     {
         m_EventTable.Remove(eventType);
     }
 }
コード例 #23
0
ファイル: BackBlock.cs プロジェクト: AtwoodDeng/MovieSwitch
 void OnAllEnd(EventDefine eventName, object sender, EventArgs args)
 {
     isOcupied = false;
 }
コード例 #24
0
 public EventInvocation(EventDefine name, Message msg = null, object sender = null)
 {
     m_Name = name; m_message = msg; m_sender = sender;
 }
コード例 #25
0
ファイル: EventManager.cs プロジェクト: fdu5526/balloon
 public void PostEvent(EventDefine eventName , Message msg = null , object sender=null)
 {
     if (msg == null )
         msg = new Message();
     postEventList.Add(new EventInvocation(eventName,msg, sender));
 }
コード例 #26
0
    void ExitStayAway(EventDefine eventName, object sender, EventArgs args)
    {
//		parItem.SetActive(false);
//		parPers.SetActive(false);
    }
コード例 #27
0
 public void SetEventName(EventDefine name)
 {
     m_eventName = name;
 }
コード例 #28
0
 public void Fire(EventDefine type, System.Object arg0)
 {
     Fire(type, new System.Object[] { arg0 });
 }
コード例 #29
0
 public void Fire(EventDefine type, System.Object[] args)
 {
     m_EventList.Add(new Event(type, args));
 }
コード例 #30
0
 //five parameters
 public static void AddListener <T, X, Y, Z, W>(EventDefine eventType, CallBack <T, X, Y, Z, W> callBack)
 {
     OnListenerAdding(eventType, callBack);
     m_EventTable[eventType] = (CallBack <T, X, Y, Z, W>)m_EventTable[eventType] + callBack;
 }
コード例 #31
0
 public void PostEventSynchronously(EventDefine eventName, object sender)
 {
     PostEventSynchronously(eventName, sender, EventArgs.Empty);
 }
コード例 #32
0
 public void Fire(EventDefine type, object param1 = null, object param2 = null, object param3 = null, object param4 = null)
 {
     m_EventQueue.Enqueue(new Event(type, param1, param2, param3, param4));
 }
コード例 #33
0
    /**
     * Register an event handler to listen to events of type /eventName/,
     * from the given sender only.
     */
    public void RegisterClockEvent(EventDefine eventName, ClockEventHandler handler, long startTimeTicks, long timeSpanSeconds)
    {
        //when you regist a clock event it may has been elapse some timeSpan
        DateTime clockBegin = new DateTime(startTimeTicks);
        DateTime currentDate = DateTime.Now;

        long elapsedTicks = currentDate.Ticks - clockBegin.Ticks;
        TimeSpan elapsedSpan = new TimeSpan(elapsedTicks);

        long totalSeconds = Convert.ToInt64(elapsedSpan.TotalSeconds);

        // there is /count/ timeSpan between start time and now
        long count = totalSeconds / timeSpanSeconds;
        for( long i = 0; i < count ; i++ )
        {
            handler(eventName);
        }

        // reset start time ticks to a reason value
        startTimeTicks += count * timeSpanSeconds * Global.SECOND_TO_TICKS;

        if( !ContainClockEvent(eventName))
        {
            m_ClockEvents.Add(new ClockEventClass(eventName, handler, startTimeTicks, timeSpanSeconds));
        }
        else
        {
            int index = GetClockEventIndex(eventName);
            m_ClockEvents[index] = new ClockEventClass(eventName, handler, startTimeTicks, timeSpanSeconds);
        }
    }
コード例 #34
0
 /**
  * Unregisters this event handler from all events of this type, regardless
  * of what it is listening for (all senders or specific senders).
  */
 public void UnregisterEventAllSenders(EventDefine eventName, EventHandler handler)
 {
     foreach (object sender in m_EventDictionary[eventName].Keys)
         UnregisterEvent(eventName, handler, sender);
 }
コード例 #35
0
 /**
  * Calling this function stops this event handler from listening
  * to events from all senders--if it is registered to listen to specific
  * senders, it will still listen to those. See UnregisterEventAllSenders().
  */
 public void UnregisterEvent(EventDefine eventName, EventHandler handler, int priority = 1)
 {
     UnregisterEvent(eventName, handler, AllSenders, priority);
 }
コード例 #36
0
 /**
  * Call this to stop an event handler from listening to events
  * from a specific sender.
  */
 public void UnregisterEvent(EventDefine eventName, EventHandler handler, object sender, int priority = 1)
 {
     if (sender is EventArgs)
         Debug.LogWarning("You posted an event with the sender being an EventArgs " +
                          "object. It's probably wrong.");
     m_RemoveEvents.Add(new EventClass(eventName, sender, handler, priority));
 }
コード例 #37
0
    public void UnregisterClockEvent(EventDefine eventName)
    {
        int index = -1;
        for( int i = 0; i < m_ClockEvents.Count; i++ )
        {
            if( m_ClockEvents[i].m_Name == eventName )
            {
                index = i;
            }
        }

        if( index > 0 )
            m_ClockEvents.RemoveAt(index);
    }
コード例 #38
0
 /**
  * Post the given event right now, without waiting for Update().
  * Be very careful about deadlocks.
  *
  * Note that this forces Update().
  */
 public void PostEventSynchronously(EventDefine eventName, object sender, EventArgs arg)
 {
     PostEvent(eventName, sender, arg);
     Update();
 }
コード例 #39
0
 public void Fire(EventDefine type)
 {
     Fire(type, new System.Object[] { });
 }
コード例 #40
0
    public int GetClockEventIndex(EventDefine eventName)
    {
        for( int i = 0; i < m_ClockEvents.Count; i++ )
        {
            if( m_ClockEvents[i].m_Name == eventName )
                return i;
        }

        return -1;
    }
コード例 #41
0
 public void Fire(EventDefine type, System.Object arg0, System.Object arg1, System.Object arg2)
 {
     Fire(type, new System.Object[] { arg0, arg1, arg2 });
 }
コード例 #42
0
 public void NextLevelAfter(EventDefine eventName, object sender , EventArgs args )
 {
     mainCharacter = null;
     StartCoroutine( setMainCharacterAfterSecond(LogicManager.Instance.levelChangeTime));
 }
コード例 #43
0
 public Event(EventDefine type, System.Object[] args)
 {
     this.type = type;
     this.args = args;
 }
コード例 #44
0
 public void PostEvent(EventDefine eventName, object sender, EventArgs arg)
 {
     if (sender is EventArgs)
         Debug.LogWarning("You posted an event with the sender being an EventArgs " +
                          "object. It's probably wrong.");
     m_WaitingEvents.Add(new EventInvocation(eventName, sender, arg));
 }
コード例 #45
0
 // Post event to all sender
 public void PostEvent(EventDefine eventName)
 {
     PostEvent(eventName, AllSenders, EventArgs.Empty);
 }
コード例 #46
0
 public void PostEvent(EventDefine eventName, object sender)
 {
     PostEvent(eventName, sender, EventArgs.Empty);
 }
コード例 #47
0
 public EventClass(EventDefine name, EventHandler handler, object sender = null)
 {
     m_Name = name; m_Handler = handler; m_sender = sender;
 }
コード例 #48
0
 void ExitStayAway(EventDefine eventName, object sender , EventArgs args )
 {
     //		parItem.SetActive(false);
     //		parPers.SetActive(false);
 }
コード例 #49
0
    public long GetTimer(EventDefine eventName)
    {
        for( int i = 0; i < m_ClockEvents.Count; i++ )
        {
            if( m_ClockEvents[i].m_Name == eventName )
            {
                DateTime clockEnd = new DateTime(m_ClockEvents[i].m_LastUpdateTime + m_ClockEvents[i].m_TimeSpan * Global.SECOND_TO_TICKS);
                DateTime currentDate = DateTime.Now;

                long elapsedTicks = clockEnd.Ticks - currentDate.Ticks;
                TimeSpan elapsedSpan = new TimeSpan(elapsedTicks);

                return Convert.ToInt64(elapsedSpan.TotalSeconds);
            }
        }

        return 0;
    }
コード例 #50
0
 // Post event to all sender with args
 public void PostEvent(EventDefine eventName, EventArgs arg)
 {
     PostEvent(eventName, AllSenders, arg);
 }
コード例 #51
0
 private void OnGameStart(EventDefine type, object param1 = null, object param2 = null, object param3 = null, object param4 = null)
 {
     Debug.Log(param1);
 }
コード例 #52
0
ファイル: Program.cs プロジェクト: dearz/Practice
        //委托示例
        private static void DelegateTest()
        {
            var eventA = new EventDefine();

            eventA.MyEvent += new EventRespond().RespondAction;

            eventA.EventHappen();

            Console.ReadKey();
        }
コード例 #53
0
 public ClockEventClass(EventDefine name, ClockEventHandler handler, long startTime, long timeSpan)
 {
     m_Name = name; m_LastUpdateTime = startTime; m_TimeSpan = timeSpan; m_handler = handler;
 }
コード例 #54
0
    /**
     * Register an event handler to listen to events of type /eventName/,
     * from the given sender only.
     */
    public void RegisterEvent(EventDefine eventName, EventHandler handler, object sender, int priority = 1)
    {
        m_AddEvents.Add(new EventClass(eventName, sender, handler, priority));

        if( !priorityList.Contains(priority) )
        {
            priorityList.Add(priority);
            priorityList.Sort();
            priorityList.Reverse();
        }

        /*
        Dictionary<object, List<EventHandler>> handlers = m_EventDictionary[eventName];
        if (!handlers.ContainsKey(sender))
            handlers[sender] = new List<EventHandler>();
        handlers[sender].Add(handler);
        */
    }
コード例 #55
0
 //five parameters
 public static void RemoveListener <T, X, Y, Z, W>(EventDefine eventType, CallBack <T, X, Y, Z, W> callBack)
 {
     OnListenerRemoving(eventType, callBack);
     m_EventTable[eventType] = (CallBack <T, X, Y, Z, W>)m_EventTable[eventType] - callBack;
     OnListenerRemoved(eventType);
 }
コード例 #56
0
 public ClockEventClass(ClockEventClass copy)
 {
     m_Name = copy.m_Name; m_LastUpdateTime = copy.m_LastUpdateTime; m_TimeSpan = copy.m_TimeSpan; m_handler = copy.m_handler;
 }
コード例 #57
0
 //no parameters
 public static void AddListener(EventDefine eventType, CallBack callBack)
 {
     OnListenerAdding(eventType, callBack);
     m_EventTable[eventType] = (CallBack)m_EventTable[eventType] + callBack;
 }
コード例 #58
0
 public EventClass(EventDefine name, object sender, EventHandler handler, int priority = 1)
 {
     m_Name = name; m_Sender = sender; m_handler = new PriorityEventHandler(handler, priority);
 }
コード例 #59
0
ファイル: Sensable.cs プロジェクト: AtwoodDeng/spaceChange
 protected void ExitStayAway(EventDefine eventName, object sender, EventArgs args)
 {
     stayAway = null;
 }
コード例 #60
0
 public EventInvocation(EventDefine name, object sender, EventArgs args)
 {
     m_Name = name; m_Sender = sender; m_Args = args;
 }