void OnTriggerEnter2D(Collider2D other) { switch (gameObject.name) { case "ToBedroom": fader.LoadScene("ChambreMatin"); break; case "ToWork": fader.LoadScene("CuisineSalonNuit"); SoundScript.FadeOut(); break; } }
void OnTriggerStay2D(Collider2D other) { if (!Input.GetKeyDown(KeyCode.Return)) { return; } Model.NewDay(); fader.LoadScene("ChambreMatin"); SoundScript.FadeOut(); }