コード例 #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);
		}
	}
コード例 #2
0
ファイル: SelectLevel.cs プロジェクト: Ritesh25696/Mahjong
    //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);
        }
    }
コード例 #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);
        }
    }