Beispiel #1
0
 void deleteSavedData()
 {
     lvlmanager.lastUnlockedlvl = 0;
     EndGameVariables.UpdateData("");
     GPlayclass.UpdateCloudLevel(0);
     GPlayclass.UpdateTimeAndDeaths("");
 }
    public static void UpdateLevel()
    {
        GameObject go = GameObject.Find("SceneManager(Clone)");

        lvlManag = go.GetComponent <lvlManager>();

        Int32.TryParse(SceneManager.GetActiveScene().name, out lvlCount);
        lvlManag.UpdateLevel(lvlCount);

        GPlayclass.UpdateCloudLevel(lvlManag.lastUnlockedlvl); //almacena el numero del nivel en una variable que es guardada en la nube
    }
Beispiel #3
0
    public void UnlockNextPack(int sceneNo)
    {
        bool exists = false;

        for (int i = 0; i < playedCount; i++)
        {
            if (playedMaps[i] == sceneNo)
            {
                exists = true;
            }
        }
        if (playedCount + 1 != playedMaps.Length)
        {
            playedMaps[playedCount++] = sceneNo;
        }

        if (!exists && (currentPNo * lvlCount) + sceneNo > lastUnlockedlvl)
        {
            lastUnlockedlvl++;
        }

        if (lastUnlockedlvl >= 20)
        {
            GPlayclass.UnlockAchievement("CgkI-Meyi84DEAIQAA");
        }
        if (lastUnlockedlvl >= 40)
        {
            GPlayclass.UnlockAchievement("CgkI-Meyi84DEAIQAQ");
        }
        if (lastUnlockedlvl >= 60)
        {
            GPlayclass.UnlockAchievement("CgkI-Meyi84DEAIQAg");
        }

        GPlayclass.UpdateCloudLevel(lastUnlockedlvl); //almacena el numero de nivel en una variable de la nube
    }