public override void PlayerJoined(Player player) { Log.Info($"\"{player.Name}\" has joined the game"); ChatBox.AddInformation(Player.All, $"{player.Name} has joined", $"avatar:{player.SteamId}"); // // Just spawn them straight in // player.Respawn(); }
public override void PlayerDisconnected(Player player, NetworkDisconnectionReason reason) { Log.Info($"\"{player.Name}\" has left the game ({reason})"); ChatBox.AddInformation(Player.All, $"{player.Name} has left ({reason})", $"avatar:{player.SteamId}"); // // Just spawn them straight in // player.Respawn(); }
public void End(BaseRound newRound = null) { EndTime = 0f; OnEnd(); if (Host.IsClient && EndMessage.Length > 0) { ChatBox.AddInformation(EndMessage); } (Game.Current as Game).SetRound(newRound ?? GetNextRound()); }
// Functionality public void Begin() { if (Host.IsServer && Length > 0) { EndTime = Time.Now + Length; } if (Host.IsClient && StartMessage.Length > 0) { ChatBox.AddInformation(StartMessage); } OnBegin(); }