示例#1
0
 public override void Update()
 {
     if (isVisible && isEnabled)
     {
         for (int i = 0; i < m_RadialChart.Length; i++)
         {
             float percent = JobsUtils.GetPercentEmployedF(i);
             m_RadialChart[i].SetValues(new float[] { percent, 1f - percent });
         }
     }
 }
示例#2
0
        /*
         * private UISlider CreateEmploymentSlider(int level)
         * {
         *  UISlider slider = AddUIComponent<UISlider>();
         *  slider.name = "Level" + level + "Slider";
         *  //slider.size = new Vector2(x, y);
         *  slider.relativePosition = new Vector3(valueAnchor, 50 + level * sep);
         *  slider.minValue = 0f;
         *
         *  UITextureSprite uITextureSprite3 = base.Find<UITextureSprite>("LandfillGradient");
         *  uITextureSprite3.renderMaterial.SetColor("_ColorA", Singleton<InfoManager>.instance.m_properties.m_modeProperties[16].m_targetColor);
         *              uITextureSprite3.renderMaterial.SetColor("_ColorB", Singleton<InfoManager>.instance.m_properties.m_modeProperties[16].m_negativeColor);
         *
         *  UISprite thumb = base.Find<UISprite>("Thumb");
         *  slider.thumbObject = thumb;
         *
         *  slider.AttachUIComponent(thumb.gameObject);
         *  slider.AttachUIComponent(uITextureSprite3.gameObject);
         *
         *  return slider;
         * }
         * */

        public override void Update()
        {
            if (isVisible && isEnabled)
            {
                for (int i = 0; i < m_EmploymentLabels.Length; i++)
                {
                    m_EmploymentLabels[i].text = JobsUtils.educationLevelNames[i] + " : ";
                    m_EmploymentValues[i].text = JobsUtils.GetEmploymentLabel(i);

                    /*
                     * m_EmploymentSlider[i].maxValue = (float)JobsUtils.GetEmploymentMaxValue(i);
                     * m_EmploymentSlider[i].value = (float)JobsUtils.GetEmploymentCurrentValue(i);
                     */
                }
            }
        }