Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.S) && nextToPlayer)
        {
            switch (nextScene)
            {
            case 0:
                GlobalControl.Instance.ResetSceneLists();
                SceneManager.LoadScene(GlobalControl.MAIN_SCENE_NUM);
                break;

            case 1:
                SceneManager.LoadScene(GlobalControl.VSHOP_SCENE_NUM);
                break;

            case 2:
                SceneManager.LoadScene(GlobalControl.NSHOP_SCENE_NUM);
                break;

            case 3:
                LevelEnd.LoadLevel();
                break;

            default:
                print("ERROR: shouldn't be here (Update in Gate)");
                break;
            }
        }
    }