//Init all variables, gameObjects, buttons and text void Awake() { //Calculate the numbre of balls for each level _nballs = 10 + 10 * (uint)(GameManager.gameManagerInstace.GetCurrentLevel() - 1); _spawn = true; _points = 0; _sameRoundPoints = 0; _firstBall = true; gameField.Init(this); deathZone.Init(this); ballSpawner.Init(ballPrefab, _nballs, this); ballStacker.Init(); uiManager.Init(); adsManagerGame.Init(this); resizeManager.Init(this); resizeManager.Resize(); aimController.Init(this, resizeManager.GetTopStop(), resizeManager.GetBotStop()); scoreText.GetComponent <Text>().text = "Points: " + _points.ToString(); _paused = false; _endRound = false; star1.gameObject.SetActive(false); star2.gameObject.SetActive(false); star3.gameObject.SetActive(false); }
/// <summary> /// Inits all the variables needed for starting a level /// </summary> public void Init() { finished = false; time = 0; resizeManager.Init(); LeatherManager.Instance.Init(); cellManager.Init(); cellManager.CreateGrid(); pointerManager.Init(this); UIManager.Init(this); }