Example #1
0
    void checkIfAllSwitchesPulled()
    {
        int numberOff = 0;

        foreach (LaboratorySwitchController _switch in switches)
        {
            if (_switch.isOff == true)
            {
                numberOff++;
            }
        }
        if (numberOff >= switches.Length)
        {
            abnormalEffects.setInvincibility(false);
            if (startTimer == false)
            {
                setUpTimer();
            }
        }
        else
        {
            abnormalEffects.setInvincibility(true);
        }
    }