예제 #1
0
    //Have to respawn from last checkpoint/spawn point
    void GoContinue()
    {
        int sceneid = ms.lastscene;
        int checkid = ms.lastcheckpoint;

        Vector2 [][] datalisty = spawndata.returndata();
        ms.setJellyHealth(100);
        ms.setJellyGauge(1);
        ms.set_definedSpawn(true);
        ms.setSpawnLocation(datalisty[sceneid][checkid].x, datalisty[sceneid][checkid].y);
        if (sceneid == 0)
        {
            destination = "JungleScene";
        }
        else if (sceneid == 1)
        {
            destination = "VolcanoScene";
        }
        else if (sceneid == 2)
        {
            destination = "insideVolcanoScene";
        }
        else
        {
            destination = "FinalLevel";
        }
        SceneManager.LoadScene(destination);
    }
예제 #2
0
    void GoToLevel()
    {
        int checkid = int.Parse(EventSystem.current.currentSelectedGameObject.name);

        checkid -= 1;
        Debug.Log(checkid);
        Vector2 [][] datalisty = spawndata.returndata();
        ms.setJellyHealth(player_script.health);
        ms.setJellyGauge(player_script.Ability_gauge());
        ms.set_definedSpawn(true);
        ms.setSpawnLocation(datalisty[sceneid][checkid].x, datalisty[sceneid][checkid].y);
        SceneManager.LoadScene(scenename);
    }