void Start() { spawner = GameObject.Find("Spawners"); audioSource = bounceSound.GetComponent <AudioSource>(); Invoke("Explode", 2); score = Camera.main.GetComponent <DemoScore>(); }
void Start() { ai = GetComponent <Ai>(); anim = GetComponent <Animator>(); audioSource = gameObject.AddComponent <AudioSource>(); score = Camera.main.GetComponent <DemoScore>(); GameObject go = GameObject.FindGameObjectWithTag("Player"); if (go) { player = go.transform; } }