Пример #1
0
 public PlayerSession GetSession(string sessionToken)
 {
     PlayerSession session;
     if (!PlayerSessions.TryGetValue(sessionToken, out session))
     {
         session = PlayerSessions[sessionToken] = new PlayerSession(sessionToken);
     }
     return session;
 }
Пример #2
0
        /// <summary>
        /// 返回一个动态创建的Actor,供客户端连接
        /// </summary>
        /// <param name="session">Session.</param>
        //public ActorNodeConfig GetGameActor(PlayerSession session, int mapId)
        //{
        //    ActorRunner actorRunner;
        //    if (!SubActors.TryGetValue(mapId, out actorRunner))
        //    {
        //              var actorNodeConf = _actor.Conf.Clone();
        //              actorRunner = SubActors[mapId] = ActorRunner.Run(actorNodeConf); // 启动一个Actor
        //          }

        //          return actorRunner.Actor.Conf;
        //}

        public Task <bool> UserLogout(PlayerSession session)
        {
            return(null);
        }
Пример #3
0
 /// <summary>
 /// 返回一个动态创建的Actor,供客户端连接
 /// </summary>
 /// <param name="session">Session.</param>
 //public ActorNodeConfig GetGameActor(PlayerSession session, int mapId)
 //{
 //    ActorRunner actorRunner;
 //    if (!SubActors.TryGetValue(mapId, out actorRunner))
 //    {
 //              var actorNodeConf = _actor.Conf.Clone();
 //              actorRunner = SubActors[mapId] = ActorRunner.Run(actorNodeConf); // 启动一个Actor
 //          }
 //          return actorRunner.Actor.Conf;
 //}
 public Task<bool> UserLogout(PlayerSession session)
 {
     return null;
 }