Exemplo n.º 1
0
    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>();
    }
Exemplo n.º 2
0
 private void Start()
 {
     winScript       = FindObjectOfType <LevelMenuScript>();
     _scoreScript    = FindObjectOfType <ScoreScript>();
     _spriteRenderer = GetComponent <SpriteRenderer>();
 }