Start() 공개 메소드

public Start ( ) : void
리턴 void
예제 #1
0
파일: Handler.cs 프로젝트: karlnp/OCTGN
 public void Start()
 {
     _acceptPlayers = false;
     _gameStarted   = true;
     _broadcaster.Start();
     GameStarted = true;
 }
예제 #2
0
 public void Start()
 {
     _acceptPlayers = false;
     _gameStarted   = true;
     _broadcaster.Start();
     GameStarted = true;
     State.Instance.Handler.GameStarted = true;
     // Just a precaution, shouldn't happen though.
     if (_gameSettings.AllowSpectators == false)
     {
         foreach (var p in State.Instance.Players)
         {
             if (p.IsSpectator)
             {
                 p.Kick("The game has started and doesn't allow spectators.");
             }
         }
     }
 }
예제 #3
0
 public void Start()
 {
     _acceptPlayers = false;
     _gameStarted   = true;
     _broadcaster.Start();
     GameStarted = true;
     State.Instance.Handler.GameStarted = true;
     // Just a precaution, shouldn't happen though.
     if (_gameSettings.AllowSpectators == false)
     {
         foreach (var p in State.Instance.Players)
         {
             if (p.IsSpectator)
             {
                 p.Kick(false, L.D.ServerMessage__SpectatorsNotAllowed);
             }
         }
     }
     if (State.Instance.Engine.IsLocal == false)
     {
         try
         {
             var c   = new ApiClient();
             var req = new PutGameHistoryReq(State.Instance.Engine.ApiKey,
                                             State.Instance.Engine.Game.Id.ToString());
             foreach (var p in State.Instance.Players.ToArray())
             {
                 req.Usernames.Add(p.Nick);
             }
             c.CreateGameHistory(req);
         }
         catch (Exception e)
         {
             Log.Error("Start Error creating Game History", e);
         }
     }
 }