Exemplo n.º 1
0
        //Initializes the game for each level.
        void InitGame()
        {
            doingSetup     = true;
            levelImage     = GameObject.Find("LevelImage");
            levelText      = GameObject.Find("LevelText").GetComponent <Text> ();
            hiScoreText    = GameObject.Find("HiScoreText").GetComponent <Text> ();
            hiscoreValue   = GameObject.Find("HiScoreValue").GetComponent <Text> ();
            jugar          = GameObject.Find("Jugar").GetComponent <Text> ();
            menu           = GameObject.Find("Menu").GetComponent <Text> ();
            levelText.text = "Day " + level;
            levelImage.SetActive(true);

            hiScoreText.text  = "";
            hiscoreValue.text = "";
            jugar.text        = "";
            menu.text         = "";

            Invoke("HideLevelImage", levelStartDelay);
            enemies.Clear();

            //Call the SetupScene function of the BoardManager script, pass it current level number.
            boardScript.SetupScene(level);
        }
Exemplo n.º 2
0
        //Initializes the game for each level.
        public void InitGame()
        {
            //While doingSetup is true the player can't move, prevent player from moving while title card is up.
            doingSetup = true;
            //Get a reference to our image LevelImage by finding it by name.
            levelImage = GameObject.Find("LevelImage");
            //Get a reference to our text LevelText's text component by finding it by name and calling GetComponent.
            levelText = GameObject.Find("LevelText").GetComponent <Text>();

            //Set the text of levelText to the string "Day" and append the current level number.
            levelText.text = "Day " + level;

            //Set levelImage to active blocking player's view of the game board during setup.
            levelImage.SetActive(true);

            //Call the HideLevelImage function with a delay in seconds of levelStartDelay.
            Invoke("HideLevelImage", levelStartDelay);

            //Clear any Enemy objects in our List to prepare for next level.
            enemies.Clear();

            //Call the SetupScene function of the BoardManager script, pass it current level number.
            boardScript.SetupScene(level);
        }
Exemplo n.º 3
0
 //Initializes the game for each level.
 void InitGame()
 {
     boardScript.SetupScene(level);
 }
Exemplo n.º 4
0
 //Initializes the game for each level.
 void InitGame()
 {
     //Call the SetupScene function of the BoardManager script, pass it current level number.
     boardScript.SetupScene(level);
 }
Exemplo n.º 5
0
 static private void OnSceneLoaded(Scene arg0, LoadSceneMode arg1)
 {
     instance.SetupScene(GameManager.instance.level);
 }