void Awake() { if (instance == null) instance = this; else if (instance != this) Destroy(gameObject); // Init levels array and fill it levels = new string[4]; levels[0] = "Pzp_Level1_3"; levels[1] = "Pzp_Level2_2"; levels[2] = "Pzp_Level3_1"; levels[3] = "Pzp_Level4_1"; // Determine shots per level shotsPerLevel = new int[4]; shotsPerLevel[0] = 7; shotsPerLevel[1] = 8; shotsPerLevel[2] = 9; shotsPerLevel[3] = 5; //Debug.Log ("Game Manager Ready"); balls = new List<Ball_Generic>(); // Don't accept mouse input for shots yet isShotAwaiting = false; // Identify Ui Manager uiManager = GameObject.Find("UiManager").GetComponent<UiManager>(); uiManager.init (); // Set all levels as "not won" lastLevelWon = 0; }