コード例 #1
0
 void spring_SpringExited(object sender, EventArgs e)
 {
     if (tas != null)
     {
         tas.ChangeMyStatus(false, false);
     }
 }
コード例 #2
0
 private void spring_SpringStarted(object sender, EventArgs e)
 {
     if (Program.main.config.AllowInGameJoin)
     {
         tas.ChangeMyStatus(false, false);
         tas.ChangeLock(false);
     }
 }
コード例 #3
0
 public void Stop()
 {
     if (manager != null)
     {
         manager.Stop();
     }
     StopVote();
     spring.ExitGame();
     tas.ChangeMyStatus(false, false);
     tas.LeaveBattle();
 }
コード例 #4
0
 public void Stop()
 {
     StopVote();
     spring.ExitGame();
     tas.ChangeMyStatus(false, false);
     tas.LeaveBattle();
 }
コード例 #5
0
 public void Stop()
 {
     StopVote();
     //if (unsyncKicker != null) unsyncKicker.Close();
     //unsyncKicker = null;
     spring.ExitGame();
     tas.ChangeMyStatus(false, false);
     tas.LeaveBattle();
 }
コード例 #6
0
 private void spring_SpringExited(object sender, EventArgs e)
 {
     if (tas != null)
     {
         tas.ChangeMyStatus(false, false);
     }
     if (PlanetWars != null)
     {
         PlanetWars.SpringExited();
     }
 }
コード例 #7
0
        void CheckForBattleExit()
        {
            if ((DateTime.Now - spring.GameStarted) > TimeSpan.FromSeconds(20))
            {
                if (spring.IsRunning)
                {
                    Battle b     = tas.GetBattle();
                    int    count = 0;
                    foreach (UserBattleStatus p in b.Users)
                    {
                        if (p.IsSpectator)
                        {
                            continue;
                        }

                        User u;
                        if (!tas.GetExistingUser(p.name, out u))
                        {
                            continue;
                        }
                        if (u.isInGame)
                        {
                            count++;
                        }
                    }
                    if (count < 1)
                    {
                        SayBattle("closing game, " + count + " active player left in game");
                        spring.ExitGame();
                    }
                }
                // kontrola pro pripad ze by se nevypl spring
                User us;
                if (!spring.IsRunning && tas.GetExistingUser(tas.UserName, out us) && us.isInGame)
                {
                    tas.ChangeMyStatus(false, false);
                }
            }
        }