Exemplo n.º 1
0
    private IEnumerator ButtonClick(int choice)
    {
        sound.PlayOneShot(click, globals.op.option_sound);
        yield return(new WaitForSeconds(click.length));

        if (choice == 1)
        {
            globals.NextLevel = "_S_MENU";
            SceneManager.LoadScene("_Scenes/_S_MENU");
        }
        else if (choice == 9)
        {
            globals.Delete_Player();
            globals.Reset_Player();
        }
        else if (choice == 10)
        {
            GoalsScript goals = globalObj.GetComponent <GoalsScript>();
            goals.Delete_Goals();
            goals.Reset_Goals();
        }
    }