using CommonAI.Zone.Instance; using CommonLang.Protocol; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CommonAIServer.Node.Interface { public interface IPlayer { /// /// 单位全局唯一标识符 /// string PlayerUUID { get; } /// /// 用于显示的名字 /// string DisplayName { get; } /// /// 绑定数据 /// ZoneNode.PlayerClient BindingPlayer { get; set; } /// /// 向此玩家发送战斗服事件 /// /// void Send(IMessage msg); /// /// 监听接收消息 /// /// void Listen(Action handler); /// /// 连接时回调 /// /// void OnConnected(ZoneNode.PlayerClient binding); /// /// 断线时回调 /// void OnDisconnect(ZoneNode.PlayerClient binding); bool IsAttribute(string key); void SetAttribute(string key, object value); object GetAttribute(string key); } }