コード例 #1
0
 public RoundPlayers()
 {
     InitializeFinish += (sender, e) =>
     {
         players       = Players.Of(BotBits);
         roundsManager = RoundsManager.Of(BotBits);
     };
 }
コード例 #2
0
        protected override void Initialize(BotBitsClient client, object args)
        {
            var settings = (Settings)args;

            RoundsManager.Of(client).MinimumPlayers       = settings.MinimumPlayers;
            RoundsManager.Of(client).WaitTime             = settings.WaitTime;
            RoundsManager.Of(client).FlyingPlayersCanPlay = settings.FlyingPlayersCanPlay;
        }
コード例 #3
0
        private void RemovePlayerFromRound(Player player)
        {
            player.RemoveFromRound();

            if (Playing.Length < roundsManager.MinimumPlayers && roundsManager.Running ||
                Potential.Length < roundsManager.MinimumPlayers && roundsManager.Starting)
            {
                RoundsManager.Of(BotBits).ForceStop();
            }
        }
コード例 #4
0
        public Commands()
        {
            InitializeFinish += (sender, e) =>
            {
                roundsManager = RoundsManager.Of(BotBits);

                if (!CommandsExtension.IsLoadedInto(BotBits))
                {
                    return;
                }

                CommandLoader.Of(BotBits).Load(this);

                requireModerator = PermissionsExtension.IsLoadedInto(BotBits);
            };
        }