Exemplo n.º 1
0
    public void LoadNextGameLevel()
    {
        if (level < LevelUtils.GetLevelsInZone(zone) - 1)
        {
            level++;
        }
        else
        {
            level = 0;
            zone++;
        }

        if (LevelUtils.GetLevelsInZone(zone) != 0)
        {
            SyncSaveData();
            LoadCurrentGameLevel();
        }
        else
        {
            level = 0;
            zone  = 0;
            SyncSaveData();
            GameActionsManager.Instance.LoadApplicationLevel(0);
        }
    }
Exemplo n.º 2
0
    void Start()
    {
        FadeManager.Instance.FadeIn();

        for (int zone = 0; zone <= SaveDataRepo.Data.maxZone; zone++)
        {
            for (int level = 0; level <= (zone < SaveDataRepo.Data.maxZone ? LevelUtils.GetLevelsInZone(zone) - 1 : SaveDataRepo.Data.maxLevel); level++)
            {
                GameObject planet = MakePlanetForLevel(zone, level, LevelUtils.GetLevelsInZone(zone));
                MakeButtonOnPlanetForLevel(planet, zone, level);
            }
        }
    }
Exemplo n.º 3
0
    public void LoadPreviousGameLevel()
    {
        if (level > 0)
        {
            level--;
        }
        else
        {
            level = LevelUtils.GetLevelsInZone(zone - 1) - 1;
            zone--;
        }

        SyncSaveData();

        LoadCurrentGameLevel();
    }