Esempio n. 1
0
    IEnumerator <WaitForSeconds> Kill()
    {
        AudioSource speakers = GetComponent <AudioSource>();

        speakers.PlayOneShot(scream);

        Color color = Color.black;

        color.a = 0f;

        float step = 0.5f;

        while (eyeCamera.fieldOfView > 21)
        {
            eyeCamera.fieldOfView -= step;
            step           += .1f;
            color.a         = step;
            killImage.color = color;
            yield return(new WaitForSeconds(0.02f));
        }
        LevelResetter.ResetLevel();
    }
Esempio n. 2
0
 private void OnTriggerEnter(Collider other)
 {
     LevelResetter.ResetLevel();
 }