Beispiel #1
0
    public ButtonComponentSolver(BombCommander bombCommander, ButtonComponent bombComponent) :
        base(bombCommander, bombComponent)
    {
        ModuleInformation buttonInfo         = ComponentSolverFactory.GetModuleInfo("ButtonComponentSolver", "!{0} tap [tap the button] | !{0} hold [hold the button] | !{0} release 7 [release when the digit shows 7]");
        ModuleInformation buttonInfoModified = ComponentSolverFactory.GetModuleInfo("ButtonComponentModifiedSolver", "Click the button with !{0} tap. Click the button at time with !{0} tap 8:55 8:44 8:33. Hold the button with !{0} hold. Release the button with !{0} release 9:58 9:49 9:30.");

        bombComponent.GetComponent <Selectable>().OnCancel += bombComponent.OnButtonCancel;
        _button = bombComponent.button;
        modInfo = VanillaRuleModifier.IsSeedVanilla() ? buttonInfo : buttonInfoModified;
    }
    public ButtonComponentSolver(TwitchModule module) :
        base(module)
    {
        ModuleInformation buttonInfo         = ComponentSolverFactory.GetModuleInfo("ButtonComponentSolver", "!{0} tap [tap the button] | !{0} hold [hold the button] | !{0} release 7 [release when the digit shows 7]");
        ModuleInformation buttonInfoModified = ComponentSolverFactory.GetModuleInfo("ButtonComponentModifiedSolver", "Click the button with !{0} tap. Click the button at a time with !{0} tap 8:55 8:44 8:33. Hold the button with !{0} hold. Release the button with !{0} release 9:58 9:49 9:30.");

        var buttonModule = (ButtonComponent)module.BombComponent;

        buttonModule.GetComponent <Selectable>().OnCancel += buttonModule.OnButtonCancel;
        _button = buttonModule.button;
        ModInfo = VanillaRuleModifier.IsSeedVanilla() ? buttonInfo : buttonInfoModified;
    }
    public ButtonComponentSolver(BombCommander bombCommander, ButtonComponent bombComponent, IRCConnection ircConnection, CoroutineCanceller canceller) :
        base(bombCommander, bombComponent, ircConnection, canceller)
    {
        ModuleInformation buttonInfo       = ComponentSolverFactory.GetModuleInfo("ButtonComponentSolver");
        ModuleInformation squarebuttonInfo = ComponentSolverFactory.GetModuleInfo("ButtonV2");

        bombComponent.GetComponent <Selectable>().OnCancel += bombComponent.OnButtonCancel;
        _button = bombComponent.button;
        modInfo = new ModuleInformation
        {
            builtIntoTwitchPlays       = buttonInfo.builtIntoTwitchPlays,
            CameraPinningAlwaysAllowed = buttonInfo.CameraPinningAlwaysAllowed,
            helpText = VanillaRuleModifier.IsSeedVanilla()
                ? buttonInfo.helpText
                : squarebuttonInfo.helpText,
            manualCode        = buttonInfo.manualCode,
            moduleDisplayName = buttonInfo.moduleDisplayName,
            moduleID          = buttonInfo.moduleID,
            moduleScore       = VanillaRuleModifier.IsSeedVanilla()
                ? buttonInfo.moduleScore
                : squarebuttonInfo.moduleScore
        };
    }