List <SpeechManager_Unit> getSpeeches(int owner, int min, int max, Unit exclude) { List <Unit> units = Unit.GetAllUnitsOfOwner(owner, true); int count = Mathf.Min(Random.Range(min, max + 1), units.Count); List <Unit> picked = M_Math.GetRandomObjects(new List <Unit>(units).Where(u => u != exclude).ToList(), count); return(picked.Select(p => p.GetComponent <SpeechManager_Unit>()).ToList()); }