Ejemplo n.º 1
0
 void TwitchHandleForcedSolve()
 {
     Debug.LogFormat("[BuzzFizz #{0}]: Forcably disabling the module viva TP Handler.", cmodID);
     forceDisable = true;
     needyModule.SetResetDelayTime(float.MaxValue, float.MaxValue);
     needyModule.HandlePass();
 }
Ejemplo n.º 2
0
    void Awake()
    {
        moduleId = moduleIdCounter++;
        module.OnNeedyActivation   += OnNeedyActivation;
        module.OnNeedyDeactivation += OnNeedyDeactivation;
        module.OnTimerExpired      += OnTimerExpired;
        bomb.OnBombExploded        += delegate() { bombSolved = true; };
        bomb.OnBombSolved          += delegate() { bombSolved = true; };
        submit.OnInteract          += delegate() { Submit(); return(false); };
        foreach (KMSelectable button in arrowButtons)
        {
            button.OnInteract += delegate() { PressArrowButton(button); return(false); }
        }
        ;
    }

    void Start()
    {
        Debug.LogFormat("[Boozleglyph Identification #{0}] Needy initiated.", moduleId);
        module.SetResetDelayTime(70f, 90f);
        screenText.text = "";
        allTextures     = new List <Texture[]> {
            set1, set2, set3
        };
    }
Ejemplo n.º 3
0
    void Awake()
    {
        moduleId = moduleIdCounter++;
        module.OnNeedyActivation   += OnNeedyActivation;
        module.OnNeedyDeactivation += OnNeedyDeactivation;
        module.OnTimerExpired      += OnTimerExpired;
        bomb.OnBombExploded        += delegate() { bombSolved = true; };
        bomb.OnBombSolved          += delegate() { bombSolved = true; };
        button.OnInteract          += delegate() { ButtonPress(); return(false); };
        foreach (KMSelectable axisButton in axisButtons)
        {
            axisButton.OnInteract += delegate() { AxisButtonPress(axisButton); return(false); }
        }
        ;
    }

    void Start()
    {
        Debug.LogFormat("[Hyperneedy #{0}] Needy initiated.", moduleId);
        module.SetResetDelayTime(45f, 60f);
        usedColors = discColors.ToList().Shuffle().ToArray();
        for (int i = 0; i < 16; i++)
        {
            allDiscRenders[i].material.color = usedColors[i];
            defaultPositions[i]       = allDiscs[i].localPosition;
            allDiscs[i].localPosition = new Vector3(0f, 0f, 0f);
        }
    }
    // TP Handling

    void TwitchHandleForcedSolve()
    {
        forceDisable = true;
        needySelf.SetResetDelayTime(float.MaxValue, float.MaxValue);
        needySelf.HandlePass();
        hasActivated = false;
    }
Ejemplo n.º 5
0
    void Awake()
    {
        moduleId = moduleIdCounter++;
        module.OnNeedyActivation   += OnNeedyActivation;
        module.OnNeedyDeactivation += OnNeedyDeactivation;
        module.OnTimerExpired      += OnTimerExpired;
        bomb.OnBombExploded        += delegate() { bombSolved = true; };
        bomb.OnBombSolved          += delegate() { bombSolved = true; };
        soundButton.OnInteract     += delegate() { PressSoundButton(); return(false); };
        foreach (KMSelectable button in buttons)
        {
            button.OnInteract += delegate() { PressButton(button); return(false); }
        }
        ;
        colorblindText.gameObject.SetActive(GetComponent <KMColorblindMode>().ColorblindModeActive);
    }

    void Start()
    {
        Debug.LogFormat("[Marco Polo #{0}] Needy initiated.", moduleId);
        positions[0].localPosition = new Vector3(-(transform.lossyScale.x / .278f), 0f, 0f);
        positions[1].localPosition = new Vector3(transform.lossyScale.x / .278f, 0f, 0f);
        Debug.Log(transform.lossyScale.x);
        module.SetResetDelayTime(45f, 60f);
        foreach (TextMesh t in buttonTexts)
        {
            t.text = "";
        }
    }
Ejemplo n.º 6
0
    void OnNeedyDeactivation()
    {
        bombModule.SetResetDelayTime(99999f, 99999f);
        isDisabled = true;
        if (isLive)
        {
            bombAudio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.WireSequenceMechanism, bombModule.transform);

            for (int i = 0; i < kpAnims.Length; ++i)
            {
                kpAnims[i].Play("KeypadHide", 0, 0);
            }

            bombModule.HandlePass();
        }
        isLive          = false;
        mainScreen.text = "";
    }
Ejemplo n.º 7
0
 void HandleDeactivation()
 {
     needySelf.SetResetDelayTime(float.PositiveInfinity, float.PositiveInfinity); // Makes it so that the needy is disabled forever.
     needySelf.HandlePass();
     isActive       = false;
     permDeactivate = true;
     QuickLog("Board upon deactivation: ");
     LogBoard();
     StopAllCoroutines();
     StartCoroutine(HandleGameOver());
     //RequestDetonation();
 }
Ejemplo n.º 8
0
    void Start()
    {
        Debug.LogFormat("[Red Light Green Light #{0}] Needy initiated.", moduleId);
        module.SetResetDelayTime(30f, 45f);
        float scalar = transform.lossyScale.x;

        foreach (Light l in lights)
        {
            l.gameObject.SetActive(false);
            l.range *= scalar;
        }
        buttonText.text = "";
    }
Ejemplo n.º 9
0
    void Awake()
    {
        moduleId = moduleIdCounter++;
        module.OnNeedyActivation   += OnNeedyActivation;
        module.OnNeedyDeactivation += OnNeedyDeactivation;
        module.OnTimerExpired      += OnTimerExpired;
        bomb.OnBombExploded        += delegate() { bombSolved = true; };
        bomb.OnBombSolved          += delegate() { bombSolved = true; };
        foreach (KMSelectable button in buttons)
        {
            button.OnInteract += delegate() { ButtonPress(button); return(false); }
        }
        ;
    }

    void Start()
    {
        Debug.LogFormat("[Rotating Squares #{0}] Needy initiated.", moduleId);
        module.SetResetDelayTime(45f, 60f);
    }
Ejemplo n.º 10
0
    void Awake()
    {
        moduleId = moduleIdCounter++;
        module.OnNeedyActivation   += OnNeedyActivation;
        module.OnNeedyDeactivation += OnNeedyDeactivation;
        module.OnTimerExpired      += OnTimerExpired;
        bomb.OnBombExploded        += delegate() { bombSolved = true; };
        bomb.OnBombSolved          += delegate() { bombSolved = true; };
        centerButton.OnInteract    += delegate() { PressButton(); return(false); };
        foreach (KMSelectable button in buttons)
        {
            button.OnInteract += delegate() { PressButton(button); return(false); }
        }
        ;
        colorblindText.gameObject.SetActive(GetComponent <KMColorblindMode>().ColorblindModeActive);
    }

    void Start()
    {
        Debug.LogFormat("[Simon Stashes #{0}] Needy initiated.", moduleId);
        module.SetResetDelayTime(60f, 90f);
        for (int i = 0; i < 6; i++)
        {
            base36Values[i] = base36.IndexOf(bomb.GetSerialNumber()[i]);
        }
        float scalar = transform.lossyScale.x;

        foreach (Light l in buttonLights)
        {
            l.enabled = false;
            l.range  *= scalar;
        }
        centerLight.enabled = false;
        centerLight.range  *= scalar;
        centerButton.GetComponent <Renderer>().material.color = gray;
    }
    // Use this for initialization
    void Start()
    {
        needyModule.OnNeedyActivation += delegate
        {
            if (forceDisable)
            {
                needyModule.HandlePass();
                return;
            }
            isActive = true;
            List <int> tempSegmentsID = segmentIDs.ToList();
            curSegmentPos.Clear();
            while (tempSegmentsID.Count > 0)
            {
                int valueToAdd = tempSegmentsID[Random.Range(0, tempSegmentsID.Count)];
                curSegmentPos.Add(valueToAdd);
                tempSegmentsID.Remove(valueToAdd);
            }
            UpdateSegments();
            Debug.LogFormat("[Faulty Seven Segment Display #{0}]: The set of the seven segments scrambled for {1} needy activation(s) are:", curModID, activationCount);
            LogSegments(curSegmentPos.ToArray());
            TPDetected = TwitchPlaysActive;
            if (TPDetected)
            {
                needyModule.SetNeedyTimeRemaining(needyModule.GetNeedyTimeRemaining() * 2);
            }
        };
        needyModule.OnNeedyDeactivation += delegate
        {
            isActive = false;
        };
        needyModule.OnTimerExpired += delegate
        {
            isActive = false;
            Debug.LogFormat("[Faulty Seven Segment Display #{0}]: The current set of the seven segments when the time ran out for {1} needy activation(s):", curModID, activationCount++);
            LogSegments(curSegmentPos.ToArray());
            if (!curSegmentPos.SequenceEqual(segmentIDs.ToList()))
            {
                needyModule.HandleStrike();
                needyModule.SetResetDelayTime(15f, 40f);
            }
            else
            {
                needyModule.SetResetDelayTime(60f, 160f);
            }
        };
        foreach (GameObject objCom in segmentObjects)
        {
            localPosSeg.Add(objCom.transform.localPosition);
            localRotSeg.Add(objCom.transform.localEulerAngles);
        }
        for (int x = 0; x < segmentSelectables.Length; x++)
        {
            int temp = x;
            segmentSelectables[x].OnInteract += delegate
            {
                segmentSelectables[temp].AddInteractionPunch();
                audioSelf.PlaySoundAtTransform("tick", transform);
                if (curSegmentPos.Count > 0)
                {
                    bool isSelected  = false;
                    int  idxSelected = -1;
                    for (int u = 0; u < segmentSelectables.Length; u++)
                    {
                        var selectable = segmentSelectables[u];
                        if (selectable.Highlight.GetComponent <MeshRenderer>().enabled)
                        {
                            isSelected  = true;
                            idxSelected = u;
                        }
                    }
                    if (!isSelected)
                    {
                        segmentSelectables[temp].Highlight.GetComponent <MeshRenderer>().enabled = true;
                    }
                    else
                    {
                        SwapSegments(temp, idxSelected);
                        foreach (KMSelectable selectable in segmentSelectables)
                        {
                            selectable.Highlight.GetComponent <MeshRenderer>().enabled = false;
                        }
                    }
                }
                return(false);
            };
        }

        curModID = modID++;
        Debug.LogFormat("[Faulty Seven Segment Display #{0}]: The correct set of the seven segments are logged as the following:", curModID);
        LogSegments();
    }
Ejemplo n.º 12
0
 void TwitchHandleForcedSolve()
 {
     canRun = false;
     needyModule.SetResetDelayTime(float.PositiveInfinity, float.PositiveInfinity);
     needyModule.HandlePass();
 }
Ejemplo n.º 13
0
    void ModifyDelay()
    {
        int streakCount = Mathf.Min(curStreak, 3);

        needyHandler.SetResetDelayTime(streakNeedyActivateDelayMin[streakCount], streakNeedyActivateDelayMax[streakCount]);
    }
Ejemplo n.º 14
0
 void Start()
 {
     module.SetResetDelayTime(30f, 50f);
 }
    void ModifyDelay()
    {
        int streakCount = progressHandler.CurrentProgress();

        needyHandler.SetResetDelayTime(streakNeedyActivateDelayMin[streakCount], streakNeedyActivateDelayMax[streakCount]);
    }