Пример #1
0
    private void SubmitHandler()
    {
        Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, SubmitButton.transform);
        SubmitButton.AddInteractionPunch();

        if (!_lightsOn || _isSolved)
        {
            return;
        }
        if (!ForcedSolve)
        {
            Debug.LogFormat("[The Number #{0}] Submit pressed, Running Rules", _moduleId);

            RunRules();
        }
        switch (stage)
        {
        case 2:                 //all these are +1 due to the stage being incremented after the value is noted
            input /= 1000;
            break;

        case 3:
            input /= 100;
            break;

        case 4:
            input /= 10;
            break;

        default:
            break;
        }

        Debug.LogFormat("[The Number #{0}] Received {1}. Expected {2}", _moduleId, input, sequence);

        if (input == sequence)
        {
            Debug.LogFormat("[The Number #{0}] Module Passed", _moduleId);
            Module.HandlePass();
            Screen.text = "";
            ClearNumbers();
            _isSolved = true;
        }
        else
        {
            Debug.LogFormat("[The Number #{0}] Strike, Reset module", _moduleId);
            Module.HandleStrike();
            Strike = true;
            Init();
        }
    }
Пример #2
0
 void PressSubmitButton()
 {
     SubmitButton.AddInteractionPunch(0.2f);
     Audio.PlaySoundAtTransform(SFX[0].name, transform);
     if (!ModuleSolved && !Animating)
     {
         for (int x = 0; x < 5; x++)
         {
             if (BottomRenderer[x].sprite == null)
             {
                 return;
             }
         }
         StartCoroutine(Inspection());
     }
 }