Page 427 - MDP2022-3
P. 427
IEnumerator LightControl()
{
LightOn();
yield return new WaitForSeconds(3f);
LightOff();
yield return new WaitForSeconds(1f);
LightOn();
yield return new WaitForSeconds(0.7f);
LightOff();
yield return new WaitForSeconds(0.7f);
LightOn();
yield return new WaitForSeconds(0.7f);
LightOff();
yield return new WaitForSeconds(0.7f);
LightOn();
yield return new WaitForSeconds(0.3f);
LightOff();
yield return new WaitForSeconds(0.3f);
LightOn();
yield return new WaitForSeconds(0.3f);
LightOff();
yield return new WaitForSeconds(0.3f);
LightOn();
yield return new WaitForSeconds(0.1f);
LightOff();
yield return new WaitForSeconds(0.1f);
for (int i = 0; i < 10; i++)
{
LightOn();
yield return new WaitForSeconds(0.05f);
LightOff();
yield return new WaitForSeconds(0.05f);
}
girlGhost.SetActive(true);
girlToiletLight.SetActive(false);
girlToiletSpotLight.SetActive(true);
can_open = true;
girlToiletDoor.GetComponent<AudioSource>().clip = audio2;
}
public void LightOn()
{
girlToiletLight.SetActive(true);
audio.Stop();
audio.Play();
}