Пример #1
0
    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);
    }
Пример #2
0
    public void SelectWarningType(GlobalWarning newWarning)
    {
        HideAllWarnings();

        selectedWarning = newWarning;

        if (newWarning != null) {
            panelHeader.text = GlobalWarning.GetWarningTypeString(selectedWarning.GetWarningType());
            selectedWarning.PopulatePanel();
        }
    }