public void Light4Click() { if (light4.isOn) { light4.Off(); } else { light4.On(); } if (light5.isOn) { light5.Off(); } else { light5.On(); } if (light3.isOn) { light3.Off(); } else { light3.On(); } }
void GameStart() { int randOn = Random.Range(0, 2); if (randOn == 0) { light1.On(); } else { light1.Off(); } randOn = Random.Range(0, 2); if (randOn == 0) { light2.On(); } else { light2.Off(); } randOn = Random.Range(0, 2); if (randOn == 0) { light3.On(); } else { light3.Off(); } randOn = Random.Range(0, 2); if (randOn == 0) { light4.On(); } else { light4.Off(); } randOn = Random.Range(0, 2); if (randOn == 0) { light5.On(); } else { light5.Off(); } }