using System.Collections; using System.Collections.Generic; using UnityEngine; public class SaySomething : MonoBehaviour { [SerializeField] private List playerHealths; void Start() { playerHealths = new List( FindObjectsOfType()); //playerHealths.AddRange( ); foreach(HealthController hc in playerHealths) { if(hc.currentHealth <= 0) { FindObjectOfType().PlayPhrase(Random.Range(0, 15).ToString()); } } } // Update is called once per frame }