private void HandleModulePass()
    {
        if (_alreadyHandledPass)
        {
            return;
        }
        _alreadyHandledPass = true;
        switch (FakeStatusLight.SetLightColor(FakeStatusLight.PassColor))
        {
        case StatusLightState.Red:
            BombModule.LogFormat("Setting the status light to Red. Did you want that with a side of strikes? Keepo");
            FakeStatusLight.HandlePass(StatusLightState.Red);
            break;

        case StatusLightState.Green:
            BombModule.LogFormat("Setting the status light to its normal Green color for solved.");
            FakeStatusLight.HandlePass(StatusLightState.Green);
            break;

        //case StatusLightState.Off:
        default:
            BombModule.LogFormat("Turning off the Status light. Kappa");
            FakeStatusLight.HandlePass();
            break;
        }
        BombModule.Log("Module Solved");
    }
示例#2
0
    void ButtonPress()
    {
        buttonSelectable.AddInteractionPunch();
        GetComponent <KMAudio>().PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, buttonSelectable.transform);
        if (moduleSolved)
        {
            return;
        }
        if (TogglePress == false)
        {
            Debug.LogFormat("[Red Herring #{0}] You have started the timer.", moduleId);
            TogglePress = true;
            StartCoroutine(StartThing());
        }

        else
        {
            if (CanPress)
            {
                FakeStatusLight.HandlePass(StatusLightState.Green);
                buttonObject.GetComponent <MeshRenderer>().material = startColor;
                cbText.text  = string.Empty;
                moduleSolved = true;
            }
            else
            {
                Strike();
            }
            Started = false;
        }
    }
示例#3
0
    void onFakeSolve()
    {
        Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.CorrectChime, Module.transform);
        if (_isDeact && barColor == goalColor)
        {
            _isSolved = true;
            Debug.LogFormat("[Nomai #{0}] Real solve! Congratulations!", _moduleId);
            FakeStatusLight.HandlePass();
            StopAllCoroutines();
            barControl.gameObject.transform.localScale = new Vector3(0f, 0f, 0f);
            return;
        }

        currentStatusLightState = StatusLightState.Green;
        timeEvents.Add("FakeSolve");
        timeEventsTimes.Add((float)timeRatio);
        FakeStatusLight.SetPass();
        _isResetting = true;

        Debug.LogFormat("[Nomai #{0}] Fake solve! Module is not interactable until next loop.", _moduleId);
    }
示例#4
0
 private void HandleSubmit()
 {
     if (_grid[_curPos] == 0)
     {
         Debug.LogFormat("[Cursed Double-Oh #{0}] Pressed Submit on 00. Module solved.", _moduleId);
         _isSolved = true;
         FakeStatusLight.HandlePass();
         Audio.PlaySoundAtTransform("DoubleOSolve", transform);
     }
     else if (_grid[_curPos] < 10)
     {
         Debug.LogFormat("[Cursed Double-Oh #{3}] Pressed Submit on number {0:00} (grid location {1},{2}).  Strike!  Now resetting...", _grid[_curPos], _curPos % 9 + 1, _curPos / 9 + 1, _moduleId);
         FakeStatusLight.HandleStrike();
         ResetSituation();
     }
     else
     {
         Debug.LogFormat("[Cursed Double-Oh #{3}] Pressed Submit on number {0:00} (grid location {1},{2}).  Now resetting...", _grid[_curPos], _curPos % 9 + 1, _curPos / 9 + 1, _moduleId);
         Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.Strike, Module.transform);
         FakeStatusLight.FlashStrike();
         ResetSituation();
     }
 }
示例#5
0
    void PressChungun()
    {
        Chungun.AddInteractionPunch();
        GetComponent <KMAudio>().PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, Chungun.transform);
        if (TogglePress == false)
        {
            Debug.LogFormat("[Red Herring #{0}] You have started the timer.", moduleId);
            TogglePress = true;
            StartCoroutine(StartThing());
            switch (DistractionPicker)
            {
            case 0:
                StartCoroutine(Swan());
                break;

            case 1:
                StartCoroutine(Door1Noise());
                break;

            case 2:
                StartCoroutine(Door2Noise());
                break;

            case 3:
                StartCoroutine(GlassNoise());
                break;

            case 4:
                StartCoroutine(DoubleOhStrikeTime());
                break;

            case 5:
                StartCoroutine(NeedyDistract());
                break;

            case 6:
                StartCoroutine(Discord1());
                break;

            case 7:
                StartCoroutine(Discord2());
                break;

            case 8:
                StartCoroutine(Discord3());
                break;

            case 9:
                return;

                break;
            }
        }

        else
        {
            if (CanPress == true)
            {
                FakeStatusLight.HandlePass(StatusLightState.Green);
                Chungus.GetComponent <MeshRenderer>().material = Colors[1];
                moduleSolved = true;
            }

            else
            {
                Strike();
            }
        }
    }
 public void Submit()
 {
     if (IsSolved)
     {
         return;
     }
     DebugMsg(NoteNames[Answer] + " was submitted");
     if (Answer == NoteIndex)         //If Correct
     {
         DebugMsg("Answer correct");
         CurrentStage++;
         for (int i = 0; i < RedNotes.Length; i++)
         {
             RedNotes[i] = false;
         }
         if (CurrentStage >= 3)
         {
             Light.HandlePass();
             DebugMsg("Three stages have been passed. Module solved.");
         }
         else
         {
             CurrentNote = GenerateNote();
         }
     }
     else         //If Incorrect
     {
         NumStrikes++;
         if (NumStrikes < StrikeText.Length + 1)
         {
             Light.FlashStrike();
             PPKMAudio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.Strike, PPModule.GetComponent <Transform>());
             RedNotes[Answer] = true;
             MainText.color   = Red;
             DebugMsg("Answer incorrect. Fake strike recorded.");
         }
         else
         {
             Light.HandleStrike();
             RefAvailable    = true;
             RefInd.material = RAMat;
             CurrentNote     = GenerateNote();
             CurrentStage    = 0;
             NumStrikes      = 0;
             for (int i = 0; i < RedNotes.Length; i++)
             {
                 RedNotes[i] = false;
             }
             MainText.color = On;
             DebugMsg("Answer incorrect. Real strike recorded.");
         }
         for (int i = 0; i < StrikeText.Length; i++)
         {
             TextMesh t = StrikeText[i];
             if (NumStrikes > i)
             {
                 t.color = On;
             }
             else
             {
                 t.color = Off;
             }
         }
     }
     //Regardless
     for (int i = 0; i < StageInd.Length; i++)
     {
         if (i < CurrentStage)
         {
             StageInd[i].material = StageOn;
         }
         else
         {
             StageInd[i].material = StageOff;
         }
     }
 }