void Start() { this.startMenu = GameObject.Find("StartMenu"); this.levelMenu = GameObject.Find("LevelMenu"); this.aboutMenu = GameObject.Find("AboutMenu"); this.startAnim = this.startMenu.GetComponent <Animator>(); this.levelAnim = this.levelMenu.GetComponent <Animator>(); this.aboutAnim = this.aboutMenu.GetComponent <Animator>(); this.levelScript = this.levelMenu.GetComponent <LevelMenuScript>(); this.aboutScript = this.aboutMenu.GetComponent <AboutMenuScript>(); }
private void Start() { winScript = FindObjectOfType <LevelMenuScript>(); _scoreScript = FindObjectOfType <ScoreScript>(); _spriteRenderer = GetComponent <SpriteRenderer>(); }