public void EndRound(Player winner) { squaresLeft.Clear(); RoundInProgress = false; Remaining.Clear(); squaresLeft.Clear(); UpdateAllStatus(); if (FreezeMode) { UpdateAllMotd(); } if (winner != null) { winner.Message("Congratulations, you won this round of countdown!"); PlayerActions.Respawn(winner); } else { Player[] players = Players.Items; foreach (Player pl in players) { PlayerActions.Respawn(pl); } } }
void BeginRound() { if (Interval == 0) { SetSpeed("normal"); } string modeSuffix = FreezeMode ? " in freeze mode" : ""; Map.Message("Starting " + SpeedType + " speed Countdown" + modeSuffix); if (FreezeMode) { Map.Message("You have 20 seconds to stand on a square"); Map.Message("You won't be able to move from that square once the game starts!"); DoCountdown("&b{0} &Sseconds left", 20, 20); } else { Map.Message("You have 5 seconds before squares start disappearing"); DoCountdown("&b{0} &Sseconds left", 5, 5); } if (!Running) { return; } Map.Message("GO!!!!!!!"); Player[] players = Players.Items; Remaining.Clear(); foreach (Player pl in players) { Remaining.Add(pl); } if (!Running || !FreezeMode) { return; } Map.Message("&bPlayers Frozen"); foreach (Player pl in players) { Position pos = pl.Pos; pl.Extras["MCG_CD_X"] = pos.X; pl.Extras["MCG_CD_Z"] = pos.Z; } RemoveAllSquareBorders(); }