Пример #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();
        }