void Awake() { _resources = new IslandResources(); _lifeformDeck = GetComponent <LifeformDeck>(); _planetDeck = GetComponent <PlanetDeck>(); audioSource = GetComponent <MusicBehaviour>(); highestWorship = _resources.Worship; _lifeformDeck.CardClicked += LifeformDeck_CardClicked; _planetDeck.CardClicked += PlanetDeck_CardClicked; endTurn.onClick.AddListener(new UnityAction(() => { _state = GameState.RoundOver; })); gameOver.onClick.AddListener(new UnityAction(() => { SceneManager.LoadScene("main"); })); musicPlaying = PlayerPrefs.GetInt("music", 1) == 1; if (musicPlaying) { musicLabel.text = "Music On"; } else { musicLabel.text = "Music Off"; } var musicController = GetComponent <MusicBehaviour>(); musicButton.onClick.AddListener(new UnityAction(() => { musicPlaying = !musicPlaying; if (musicPlaying) { musicLabel.text = "Music On"; } else { musicLabel.text = "Music Off"; } musicController.ToggleMusic(musicPlaying); })); }