Exemple #1
0
 public void UpdateHealthColor()
 {
     if (m_LastCreatureVisiblity)
     {
         var modifiedColor = ILightmapRenderer.MulColor32(m_HealthColor, m_LastLightFactor);
         m_NamePanel.color = modifiedColor;
         m_HealthProgressPanel.GetComponent <RawImage>().color = modifiedColor;
     }
 }
Exemple #2
0
        public void UpdateCreatureMisc(bool visible, float lightfactor)
        {
            if (m_LastCreatureVisiblity == visible && m_LastLightFactor == lightfactor)
            {
                return;
            }

            m_LastCreatureVisiblity = visible;
            m_LastLightFactor       = lightfactor;
            if (visible)
            {
                var modifiedHealthColor = ILightmapRenderer.MulColor32(m_HealthColor, m_LastLightFactor);
                m_NamePanel.color = modifiedHealthColor;
                m_HealthProgressPanel.GetComponent <RawImage>().color = modifiedHealthColor;
                m_ManaProgressPanel.GetComponent <RawImage>().color   = ILightmapRenderer.MulColor32(Color.blue, m_LastLightFactor);
            }
            else
            {
                var hiddenColor = ILightmapRenderer.MulColor32(HiddenCreatureColor, m_LastLightFactor);
                m_NamePanel.color = hiddenColor;
                m_HealthProgressPanel.GetComponent <RawImage>().color = hiddenColor;
                m_ManaProgressPanel.GetComponent <RawImage>().color   = hiddenColor;
            }
        }