12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Pomelo
- {
- public class ZoneConfig
- {
- /// <summary>
- /// 启动路径
- /// </summary>
- public string startPath;
- /// <summary>
- /// 资源路径
- /// </summary>
- public string assetPath;
- }
- public interface IZone
- {
- //开启场景控制器
- void Start(ZoneConfig zoneConfig);
- /** 网络重置 */
- void onNetReconnect(string connetorId, IFastSession session);
- //关闭场景控制器
- void Stop();
- void SetCallBack(string gameSrvId);
- //创建副本
- void CreateZone(string playerId, string gameServerId, int mapTemplateId, string instanceId, bool forceCreate, string data, Action<int> cb, Action<Exception> err);
- //销毁副本
- void DestroyZone(string instanceId, Action<Exception, object> cb);
- //玩家进入副本
- void PlayerEnter(string playerId, string instanceId, string data, Action<Exception, object> cb);
- //玩家离开副本
- void PlayerLeave(string playerId, string instanceId, bool keepObject, Action<Exception, object> cb);
- //玩家网络状况改变
- void PlayerNetStateChanged(string playerId, string state);
- //清理所有的玩家
- void ClearAllPlayers(Action<Exception, object> cb);
- //获取所有玩家数量
- void GetAllPlayerCount(Action<Exception, int> cb);
- // 接收玩家数据包
- void PlayerReceive(string playerId, byte[] msg);
- // 获取服务器状态
- void GetServerState(string serverID, Action<Exception, object> cb);
- //游戏服注册
- void RegisterGameServer(int serverId, int crossId, Action<Exception, string> cb);
- //获取单位血量
- void GetUnitHP(string instanceId, int objectId, Action<Exception, int> cb);
- }
- }
|