// Use this for initialization void Start() { numSpawns = transform.childCount; spawnObjects = new SpawnObject[numSpawns]; activeSpawns = new bool[numSpawns]; // Loop through all children and create an array of them for (int i = 0; i < numSpawns; i++) { spawnObjects[i] = transform.GetChild(i).GetComponent <SpawnObject>(); } numObjects = 0; if (AudioManager.instance != null) { instance = AudioManager.instance; } SetHasRequiredDeath(); SetIncreasesStreak(); if (increasesStreak) { streak = FindObjectOfType <StreakController>(); } }
private void Streak(Vector3 start, Vector3 end) { GameObject obj = Instantiate(streak, Vector3.zero, Quaternion.identity); StreakController str = obj.GetComponent <StreakController>(); str.Init(); str.setStart(start); str.setEnd(end); }