void Start() { PanelChoosePlayer.SetActive(true); //get the animator component anim = PanelChoosePlayer.GetComponent <Animator>(); //disable it on start to stop it from playing the default animation anim.enabled = false; Time.timeScale = 0; _SoundControler = FindObjectOfType <SoundControler>(); _BgSound = FindObjectOfType <BackgoundSoundControler>(); if (_GameControler._GameState._Music) { _ListButton[0].color = Color.white; } else { _ListButton[0].color = Color.grey; } if (_GameControler._GameState._Sound) { _ListButton[1].color = Color.white; } else { _ListButton[1].color = Color.grey; } }
// Use this for initialization void Start() { _UIManager = FindObjectOfType <UIManager>(); _cameraControler = FindObjectOfType <CameraControler>(); _numberText = GetComponent <NumberTextScale>(); _GameManager = FindObjectOfType <GameManager>(); _BgControler = FindObjectOfType <BackgoundSoundControler>(); _BgControler.PlayBackground(true); _SoundControler = FindObjectOfType <SoundControler>(); }