示例#1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        switch (gameObject.name)
        {
        case "ToBedroom": fader.LoadScene("ChambreMatin"); break;

        case "ToWork": fader.LoadScene("CuisineSalonNuit"); SoundScript.FadeOut(); break;
        }
    }
示例#2
0
    void OnTriggerStay2D(Collider2D other)
    {
        if (!Input.GetKeyDown(KeyCode.Return))
        {
            return;
        }

        Model.NewDay();
        fader.LoadScene("ChambreMatin");
        SoundScript.FadeOut();
    }