Example #1
0
 /**
  * initialize variables and set the level
  */
 void Start()
 {
     height  = new Vector3(0, 0.93f, 0);
     buttons = new GameObject[7] {
         button1, button2, button3, button4, button5, button6, button7
     };
     blockId = 0;
     blocks  = new List <GameObject>();
     addBlock(startButton);
     lm = levelManager.GetComponent <levelManager>();
     lm.setLevel(activeLevel.GetComponent <activeLevel>().getLevel());
     GetComponent <AudioSource>().volume = activeLevel.GetComponent <activeLevel>().getMusicVol();
     lm.setVol(activeLevel.GetComponent <activeLevel>().getSfxVol());
 }