예제 #1
0
    public static void RefreshModes(KMGameInfo.State state)
    {
        _state = state;

        if (currentMode == TwitchPlaysMode.Normal)
        {
            if (Assets.Scripts.Records.RecordManager.Instance != null)
            {
                _disableBestRecords = Assets.Scripts.Records.RecordManager.Instance.DisableBestRecords;
            }
            if (Assets.Scripts.Stats.StatsManager.Instance != null)
            {
                _disableStats = Assets.Scripts.Stats.StatsManager.Instance.DisableStatChanges;
            }
        }

        if ((_state != KMGameInfo.State.PostGame && _state != KMGameInfo.State.Setup) || currentMode == nextMode)
        {
            return;
        }

        currentMode = nextMode;
        DisableLeaderboard();
        IRCConnection.Instance.SendMessage("Mode is now set to: {0}", Enum.GetName(typeof(TwitchPlaysMode), currentMode));
    }
예제 #2
0
 public static void RefreshModes()
 {
     if (!BombMessageResponder.BombActive && currentMode != nextMode)
     {
         currentMode = nextMode;
         IRCConnection.Instance.SendMessage("Mode is now set to: {0}", Enum.GetName(typeof(TwitchPlaysMode), currentMode));
     }
 }
예제 #3
0
    public static bool Set(TwitchPlaysMode mode, bool state = true)
    {
        if (state == false)
        {
            mode = TwitchPlaysMode.Normal;
        }

        nextMode = mode;
        if (!BombMessageResponder.BombActive)
        {
            currentMode = mode;
            return(true);
        }
        return(false);
    }
예제 #4
0
    public static bool Set(TwitchPlaysMode mode, bool state = true)
    {
        if (!state)
        {
            mode = TwitchPlaysMode.Normal;
        }

        nextMode = mode;
        if (_state != KMGameInfo.State.PostGame && _state != KMGameInfo.State.Setup)
        {
            return(false);
        }

        currentMode = mode;
        return(true);
    }
예제 #5
0
 public static void Toggle(TwitchPlaysMode mode) => Set(mode, nextMode != mode);
예제 #6
0
 public static bool InMode(TwitchPlaysMode mode) => currentMode == mode;
예제 #7
0
 public static string GetName(TwitchPlaysMode mode) => Enum.GetName(typeof(TwitchPlaysMode), mode);
예제 #8
0
 public static bool InMode(TwitchPlaysMode mode)
 {
     return(currentMode == mode);
 }
예제 #9
0
 public static string GetName(TwitchPlaysMode mode)
 {
     return(Enum.GetName(typeof(TwitchPlaysMode), mode));
 }