internal OnlinePlayerJoiningTask(OnlineGameSession session, TcpConnection inputConnection)
        {
            targetGameSession    = session;
            this.inputConnection = inputConnection;

            //Поток для присоединения игрока
            playerJoiningThread = new Thread(ListenPlayerNameJoining)
            {
                IsBackground = true
            };
        }
Exemplo n.º 2
0
        internal void OnStop()
        {
            tcpListener.Stop();

            gameSession = null;
            foreach (OnlinePlayerJoiningTask task in joinTasks)
            {
                task.OnFinished -= RemoveTask;
                task.Finish();
            }
            joinTasks.Clear();
        }
Exemplo n.º 3
0
 internal void OnStart()
 {
     tcpListener.Start();
     gameSession = new OnlineGameSession();
 }