示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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());
        }
示例#4
0
        // Functionality
        public void Begin()
        {
            if (Host.IsServer && Length > 0)
            {
                EndTime = Time.Now + Length;
            }

            if (Host.IsClient && StartMessage.Length > 0)
            {
                ChatBox.AddInformation(StartMessage);
            }

            OnBegin();
        }