public bool HasTrophy(DrakeAI.DrakeColor color) { foreach (GameObject slotObj in trophySlots) { TrophySlot slot = slotObj.GetComponent <TrophySlot> (); if (slot.color == color && slot.IsFilled()) { return(true); } } return(false); }
void FillSlot(DrakeAI.DrakeColor color) { Debug.Log(color); foreach (GameObject slotObj in trophySlots) { TrophySlot slot = slotObj.GetComponent <TrophySlot> (); Debug.Log(slot.color); if (slot.color.Equals(color)) { slot.Obtain(); } } }