private void UnemployementButtonOnEventClick(UIComponent component, UIMouseEventParameter eventParam)
 {
     _employmentDetailsPanel.isVisible = !_employmentDetailsPanel.isVisible;
     if (_employmentDetailsPanel.isVisible)
     {
         BuildingsInfoManager.ShouldWeCount = true;
         BuildingsInfoManager.CalculateAllWorkplaces();
     }
     _employmentDetailsPanel.relativePosition = new Vector3(438, 58);
 }
 public override void Update()
 {
     if (isVisible && isEnabled)
     {
         BuildingsInfoManager.calculateAllWorkplaces();
         for (int i = 0; i < m_EmploymentLabels.Length; i++)
         {
             m_EmploymentLabels[i].text = JobsUtils.educationLevelNames[i];
             m_EmploymentValues[i].text = ": " + JobsUtils.GetEmploymentLabel(i);
             m_WorkplaceValues[i].text  = BuildingsInfoManager.GetWorkplacesLabel(i);
         }
     }
 }
Exemple #3
0
 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_WorkplaceValues[i].text           = BuildingsInfoManager.GetWorkplacesLabel(i);
             m_WorkspaceDetailLabels[i].text     = JobsUtils.EducationLevelNames[i];
             m_WorkspacesDetailValues[0, i].text = BuildingsInfoManager.comWorkplaces[i].ToString();
             m_WorkspacesDetailValues[1, i].text = BuildingsInfoManager.offWorkplaces[i].ToString();
             m_WorkspacesDetailValues[2, i].text = BuildingsInfoManager.indWorkplaces[i].ToString();
             m_WorkspacesDetailValues[3, i].text = BuildingsInfoManager.GetServiceWorkspaceCount(i).ToString();
             m_WorkspacesDetailValues[4, i].text = BuildingsInfoManager.GetWorkplacesByLevel(i).ToString();
         }
     }
 }
Exemple #4
0
        public override void Update()
        {
            if (isVisible && isEnabled)
            {
                for (int i = 0; i < m_RadialChart.Length; i++)
                {
                    float percent;
                    switch (RadialChartPrefix)
                    {
                    case "workplaces":
                        percent = BuildingsInfoManager.GetPercent(i);
                        break;

                    default:
                        percent = JobsUtils.GetPercentEmployedF(i);
                        break;
                    }

                    m_RadialChart[i].SetValues(new float[] { percent, 1f - percent });
                }
            }
        }