private void SetElementalLogString(int damage, eElement element)
    {
        switch (element)
        {
        case eElement.NEUTRAL:
            SetLogText(unitName + " was hit for <color=#CACACAFF>" + damage + " " + element.ToString().ToLower()
                       + "</color> damage.");
            break;

        case eElement.EARTH:
            SetLogText(unitName + " was hit for <color=#BF860BFF>" + damage + " " + element.ToString().ToLower()
                       + "</color> damage.");
            break;

        case eElement.FIRE:
            SetLogText(unitName + " was hit for <color=#FF0000FF>" + damage + " " + element.ToString().ToLower()
                       + "</color> damage.");
            break;

        case eElement.AIR:
            SetLogText(unitName + " was hit for <color=#20902AFF>" + damage + " " + element.ToString().ToLower()
                       + "</color> damage.");
            break;

        case eElement.WATER:
            SetLogText(unitName + " was hit for <color=#00ACE5FF>" + damage + " " + element.ToString().ToLower()
                       + "</color> damage.");
            break;
        }
    }
Ejemplo n.º 2
0
    private void DisplayElementLabel(eElement element)
    {
        string label = element.ToString().ToLower();

        char[] a = label.ToCharArray();
        a[0]  = char.ToUpper(a[0]);
        label = new string (a);

        GUIStyle fontColour = new GUIStyle();

        fontColour.fontStyle = FontStyle.Bold;

        switch (element)
        {
        case eElement.FIRE:
            fontColour.normal.textColor = fire;
            break;

        case eElement.EARTH:
            fontColour.normal.textColor = earth;
            break;

        case eElement.AIR:
            fontColour.normal.textColor = air;
            break;

        case eElement.WATER:
            fontColour.normal.textColor = water;
            break;
        }

        EditorGUILayout.LabelField(label + " Damage:", fontColour, GUILayout.MaxWidth(100));
    }