Ejemplo n.º 1
0
	public void SelectPuzzleLevel () {
		int level = int.Parse (UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject.name);
		puzzle = levelLocker.GetPuzzleLevels (selectedPuzzle);

		if (puzzle [level]) {
			puzzleGameManager.SetLevel (level);
			loadPuzzleGame.LoadPuzzle (level, selectedPuzzle);
		}
	}
Ejemplo n.º 2
0
    //Passing level selected to next scene via holder class
    public void SelectPuzzleLevel()
    {
        //getting the current selected level
        int level = int.Parse(UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject.name);

        puzzle = levelLocker.GetPuzzleLevels();
        if (puzzle[level])
        {
            LevelHolder.currentLevel = level;
            SceneManager.LoadScene(1);
        }
    }
Ejemplo n.º 3
0
    public void SelectPuzzleLevel()
    {
        //starsLocker.DeactivateStars();
        //since our levels are 0, 1, 2, ... etc, but names are stored at strings, we want the integer value of the level name which is a number
        int level = int.Parse(UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject.name);

        puzzle = levelLocker.GetPuzzleLevels(selectedPuzzle);

        if (puzzle[level])
        {
            puzzleGameManager.SetLevel(level);
            loadPuzzleGame.LoadPuzzle(level, selectedPuzzle);
        }
    }