public int GetPartsOfType(BodyPart.ElementType type) { int partsOfType = 0; partsOfType = m_typeScores[(int)type]; return(partsOfType); }
private static List <GameObject> RemoveAllOfType(List <GameObject> parts, BodyPart.ElementType type) { List <GameObject> toRemove = new List <GameObject> (); foreach (GameObject part in parts) { if (part.GetComponent <BodyPart> ().GetElementType() == type) { toRemove.Add(part); } } foreach (GameObject part in toRemove) { parts.Remove(part); } return(parts); }