// Use this for initialization void Start() { Time.timeScale = 1f; timer = classRoomTime + 3; timerBar.duration = timer; state = GameState.Light; chaos = 0; score = LevelManager.sharedInstance.score; scoreText.text = score.ToString(); timeSinceLastTick = -2.9f; students = FindObjectsOfType <Student>(); childsToCorrupt = (LevelManager.sharedInstance.level - 1) / 2; timeToCorrupt = timer / (childsToCorrupt + 1); corruptTimer = timeToCorrupt; bgAudioSource = AudioController.SharedInstance; bgAudioSource.ChangeMusic(lightBGM); bgAudioSource.ChangeBGMVolume(1f); bgAudioSource.PlaySoundEffect(StartingSound, 0); GameObject go = GameObject.Find("Class Number"); Texture2D texture = SharedResources.GetSharedInstance().numbers[LevelManager.sharedInstance.level]; Image im = go.GetComponent <Image>(); SharedResources.GetSharedInstance(); im.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f)); }