Пример #1
0
    public bool Lvl2WinCloud = false;         //level 2 win for cloud levels


    // Start is called before the first frame update
    void Start()
    {
        //array will store a button corresponding to the level number
        Level2Buttons = GameObject.FindGameObjectsWithTag("Level2Button");
        Level3Buttons = GameObject.FindGameObjectsWithTag("Level3Button");

        //for each tagged object, it will be hidden at the start of the game
        //hide lvl 2 button

        /*foreach(GameObject button in Level2Buttons)
         * {
         *  if(Lvl1WinInd == false || Lvl1WinCloud == false)
         *      button.GetComponentInChildren<Text>().text = "Locked";
         *
         * }
         * //hide lvl 3 button
         * foreach(GameObject button in Level3Buttons)
         * {
         *  if(Lvl2WinInd == false || Lvl2WinCloud == false)
         *      button.GetComponentInChildren<Text>().text = "Locked";
         * }*/

        StartCoroutine(buttonLock());

        LevelLockerRef = this;
    }
Пример #2
0
 /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
 void Start()
 {
     loadPuzzleGame            = GameObject.Find("Puzzle Game Controller").GetComponent <LoadPuzzleGame>();
     puzzleGameManager         = GameObject.Find("Puzzle Game Controller").GetComponent <PuzzleGameManager>();
     levelLocker               = GetComponent <LevelLocker>();
     selectPuzzleMenuAnimator  = selectPuzzleMenuPanel.GetComponent <Animator>();
     selectPuzzleLevelAnimator = selectPuzzleLevelPanel.GetComponent <Animator>();
 }
 /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
 void Start()
 {
     settingsController        = GameObject.Find("Puzzle Menu Controller").GetComponent <SettingsController>();
     puzzleGameManager         = GameObject.Find("Puzzle Game Controller").GetComponent <PuzzleGameManager>();
     selectLevelScript         = GameObject.Find("Puzzle Level Controller").GetComponent <SelectLevelScript>();
     levelLocker               = GameObject.Find("Puzzle Level Controller").GetComponent <LevelLocker>();
     starsLocker               = GameObject.Find("Puzzle Level Controller").GetComponent <StarsLocker>();
     selectPuzzleMenuAnimator  = selectPuzzleMenuPanel.GetComponent <Animator>();
     selectPuzzleLevelAnimator = selectPuzzleLevelPanel.GetComponent <Animator>();
 }
 /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
 void Start()
 {
     puzzleGameManager         = GetComponent <PuzzleGameManager>();
     layoutPuzzleButtons       = GetComponent <LayoutPuzzleButtons>();
     levelLocker               = GameObject.Find("Puzzle Level Controller").GetComponent <LevelLocker>();
     puzzleLevelSelectAnimator = puzzleLevelSelectPanel.GetComponent <Animator>();
     puzzleGamePanelAnimator1  = puzzleGamePanel1.GetComponent <Animator>();
     puzzleGamePanelAnimator2  = puzzleGamePanel2.GetComponent <Animator>();
     puzzleGamePanelAnimator3  = puzzleGamePanel3.GetComponent <Animator>();
     puzzleGamePanelAnimator4  = puzzleGamePanel4.GetComponent <Animator>();
     puzzleGamePanelAnimator5  = puzzleGamePanel5.GetComponent <Animator>();
 }