Esempio n. 1
0
    public void ReachGoal()
    {
        StarController sc = StarController.sc;

        if (sc != null)
        {
            sc.SaveStarData();
        }
        int curLvl = sc.GetLevelIndex(SceneData.sd.levelID);

        SceneData.sd.goToLevelSelect = true;
        audio.Stop();
        foreach (HeadToggle h in FindObjectsOfType(typeof(HeadToggle)))
        {
            h.GetComponent <AudioSource>().volume = 0;
        }
        VictoryOverlay.vo.Activate(sc.CollectedStarsInLevel(curLvl), sc.TotalStarsInLevel(curLvl));
        //VictoryOverlay.vo.Activate(1,4);
        //SceneManager.LoadScene (0);
    }