void Start () { rb2D = GetComponent<Rigidbody2D> (); rb2D.velocity = new Vector2 (velocidade, 0); geradorObstaculos = FindObjectOfType (typeof(GeradorObstaculos)) as GeradorObstaculos; }
private void Start() { this.cenario = this.GetComponentsInChildren <Carrossel>(); this.obstaculo = this.GetComponentInChildren <GeradorObstaculos>(); this.aviao = this.GetComponentInChildren <Aviao>(); }