Example #1
0
    private void OnEnable()
    {
        if (!TwitchPlaysService.DebugMode)
        {
            InputInterceptor.DisableInput();
        }

        leaderboard.ClearSolo();
        TwitchPlaysService.logUploader.Clear();

        StartCoroutine(CheckForBomb());
    }
    private void OnEnable()
    {
        BombActive = true;
        EnableDisableInput();
        leaderboard.ClearSolo();
        TwitchPlaysService.logUploader.Clear();

        bool bombStarted = false;

        parentService.GetComponent <KMGameInfo>().OnLightsChange += delegate(bool on)
        {
            if (bombStarted || !on)
            {
                return;
            }
            bombStarted = true;

            if (TwitchPlaySettings.data.BombLiveMessageDelay > 0)
            {
                System.Threading.Thread.Sleep(TwitchPlaySettings.data.BombLiveMessageDelay * 1000);
            }

            if (_bombCommanders.Count == 1)
            {
                _ircConnection.SendMessage(TwitchPlaySettings.data.BombLiveMessage);
            }
            else
            {
                _ircConnection.SendMessage(TwitchPlaySettings.data.MultiBombLiveMessage);
            }

            if (TwitchPlaySettings.data.EnableAutomaticEdgework)
            {
                foreach (var commander in _bombCommanders)
                {
                    commander.FillEdgework(commander.twitchBombHandle.bombID != _currentBomb);
                }
            }
            OtherModes.setMultiplier(9);
        };

        StartCoroutine(CheckForBomb());
    }