private void TriggerTutorial(lvlType lvl)
    {
        switch (lvl)
        {
        case lvlType.normal:
            normalModeTut.tutCont.SetActive(true);
            normalModeTut.tut.StartTutorial();
            break;

        case lvlType.simon:
            break;

        case lvlType.cascada:
            break;

        case lvlType.frenesi:
            break;

        case lvlType.bonus:
            break;

        default:
            ShowNormalLoadingScreen();
            break;
        }
    }
Beispiel #2
0
    public void SaveLvlByMode(lvlType lvlType, int currLvl)
    {
        string saveKey = lvlType.ToString() + lvlSuffix;

        if (currLvl < 1)
        {
            currLvl = 1;
        }

        PlayerPrefs.SetInt(saveKey, currLvl);
        PlayerPrefs.Save();
    }
Beispiel #3
0
    private LevelInfo GetLvlFromListByType(lvlType lvlTypeEnum)
    {
        foreach (var t in lvlsList)
        {
            if (t.lvlTypeInfo.lvlType == lvlTypeEnum)
            {
                return(t);
            }
        }

        return(lvlsList[0]);
    }
    public void TryTriggerTutorial(lvlType lvl)
    {
        int lvlInType = SerializationManager.instance.LoadLvlByMode(lvl);

        if (lvlInType <= 1)
        {
            TriggerTutorial(lvl);
        }
        else
        {
            ShowNormalLoadingScreen();
            OnCompleteCurrentTutorial();
        }
    }
Beispiel #5
0
    public int LoadLvlByMode(lvlType lvlType)
    {
        int    lvl     = 1;
        string saveKey = lvlType.ToString() + lvlSuffix;

        if (PlayerPrefs.HasKey(saveKey))
        {
            lvl = PlayerPrefs.GetInt(saveKey);
        }

        if (lvl < 1)
        {
            lvl = 1;
        }

        return(lvl);
    }
Beispiel #6
0
    void Update()
    {
        movement     = true;
        currentScene = SceneManager.GetActiveScene().name;
        if (playerScript != null)
        {
            currentPlayerPos = playerScript.playerTrans.transform.position;
        }



        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if ((!pause) && (lvl != lvlType.MAINMENU))
            {
                pauseGame();
            }
        }
        if (currentScene == "MainMenu")
        {
            lvl      = lvlType.MAINMENU;
            movement = false;
        }
        if (currentScene == "Combat")
        {
            lvl      = lvlType.COMBAT;
            movement = false;
        }
        if (currentScene.IndexOf("Town") > -1 || currentScene.IndexOf("town") > -1)
        {
            lvl      = lvlType.TOWN;
            movement = true;
        }
        if (currentScene.IndexOf("House") > -1 || currentScene.IndexOf("house") > -1)
        {
            lvl      = lvlType.HOUSE;
            movement = true;
        }

        if ((lvl == lvlType.TOWN) && combatTimer)
        {
            combatStart();
        }
    }
Beispiel #7
0
 public void SetSimonGameMode()
 {
     currentGameMode = lvlType.simon;
     lvl_Index       = SerializationManager.instance.LoadLvlByMode(currentGameMode);
 }
Beispiel #8
0
 public void SetNormalGameMode()
 {
     currentGameMode = lvlType.normal;
     lvl_Index       = SerializationManager.instance.LoadLvlByMode(currentGameMode);
 }
Beispiel #9
0
 public void SetLastPlayedMode()
 {
     currentGameMode = SerializationManager.instance.LoadLastGameModePlayed();
     lvl_Index       = SerializationManager.instance.LoadLvlByMode(currentGameMode);
 }
Beispiel #10
0
    //TO DO:
    //Set a structure to fill up the end panels.


    #endregion

    #region Lvl Management

    public void SetGameMode(lvlType type) //Unused
    {
        currentGameMode = type;
    }
Beispiel #11
0
 public void SaveLastGameModePlayed(lvlType lvlPlayed)
 {
     PlayerPrefs.SetString(lastPlayedMode, lvlPlayed.ToString());
     PlayerPrefs.Save();
 }