Esempio n. 1
0
    public virtual void AddIcons(DialogueOptionInitializer doi, RHSpeaker speaker, RHConversation conversation)
    {
        string timeStr = Time.ToString("F2") + " s";

        doi.AddTextIcon(timeStr, Color.white);
        for (int i = 0; i < 5; i++)
        {
            RHStat s            = (RHStat)i;
            float  sum          = 0;
            int    numListeners = 0;
            foreach (RHListener l in conversation.Listeners.Keys)
            {
                if (l == speaker.GetComponent <RHListener>())
                {
                    continue;
                }
                float f = GetPower(speaker, l, conversation, s);
                sum += f;
                numListeners++;
            }
            if (Mathf.Abs(sum) <= 1)
            {
                continue;
            }
            Color c = RHManager.ProportionToColor(GetBasePower(s), sum / numListeners);
            doi.AddIcon(RHManager.GetStatIcon(s), sum.ToString("F1"), c, (sum > 0) ? Color.white : Color.red);
        }
    }