public void Activate(GlobalWarning parent, Hex newHab, GlobalWarning.subType[] newSubTypes, Sprite[] newSprites, Color32[] newColors) { habitat = newHab; parentWarning = parent; GenerateContent(parentWarning.GetWarningType()); for(int i = 0; i < newSubTypes.Length; i++) { GlobalWarning.subType item = newSubTypes[i]; subInfo.Add(item); AddIcon(item, newSprites[i], newColors[i]); } SetTextPos(newSprites.Length); }
public void SelectWarningType(GlobalWarning newWarning) { HideAllWarnings(); selectedWarning = newWarning; if (newWarning != null) { panelHeader.text = GlobalWarning.GetWarningTypeString(selectedWarning.GetWarningType()); selectedWarning.PopulatePanel(); } }