123456789101112131415161718192021222324252627282930313233 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace YLBattle
- {
- /// <summary>
- /// 事件操作约束
- /// </summary>
- public interface IEventDispatcher
- {
- /// <summary>
- /// 创建事件对象
- /// </summary>
- /// <param name="type">事件类型</param>
- /// <returns>事件对象</returns>
- FieldEvent MakeEvent(EFieldEventType type);
- /// <summary>
- /// 事件投递
- /// </summary>
- /// <param name="ev">事件类型</param>
- void PostEvent(FieldEvent ev);
- /// <summary>
- /// 事件处理注册
- /// </summary>
- /// <param name="type">事件类型</param>
- /// <param name="handle">事件处理器</param>
- void RegisterEventHandle(EFieldEventType type, Action<FieldEvent> handle);
- }
- }
|