Exemplo n.º 1
0
 /// <summary>
 /// 调用游戏之后处理发送消息
 /// </summary>
 /// <param name="e"></param>
 private void OnUpdateTimer(Events.PluginArgs e)
 {
     if (UpdateTimerHandler != null)
     {
         UpdateTimerHandler(this, (Events.UpdateArgs)e);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 调用游戏之前处理收到消息
 /// </summary>
 /// <param name="e"></param>
 private void OnPreReceiveMessage(Events.PluginArgs e)
 {
     if (PreReceiveMessageHandler != null)
     {
         PreReceiveMessageHandler(this, (Events.MessagePreArgs)e);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 调用游戏之后处理发送消息
 /// </summary>
 /// <param name="e"></param>
 private void OnPostSendMessage(Events.PluginArgs e)
 {
     if (PostSendMessageHandler != null)
     {
         PostSendMessageHandler(this, (Events.MessagePostArgs)e);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 事件处理
        /// </summary>
        /// <param name="e"></param>
        public void OnEvent(Events.PluginArgs e)
        {
            switch (e.Event)
            {
            case PluginEvent.PreReceiveMessage:
                OnPreReceiveMessage(e);
                break;

            case PluginEvent.PreSendMessage:
                OnPreSendMessage(e);
                break;

            case PluginEvent.PostReceiveMessage:
                OnPostReceiveMessage(e);
                break;

            case PluginEvent.PostSendMessage:
                OnPostSendMessage(e);
                break;

            case PluginEvent.Update:
                OnUpdateTimer(e);
                break;
            }
        }