public void ClearInfoPanel() { WorkerImageObject.GetComponent <Image>().sprite = null; WorkerImageObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 0); NameTextObject.GetComponent <Text>().text = ""; AgeTextObject.GetComponent <Text>().text = ""; PayTextObject.GetComponent <Text>().text = ""; AbilityTextObject.GetComponent <Text>().text = ""; FatigueGraphBar.GetComponent <Image>().fillAmount = 0f; ExperienceGraphBar.GetComponent <Image>().fillAmount = 0f; PromoteButton.GetComponent <Button>().interactable = false; FireButton.GetComponent <Button>().interactable = false; CurrentWorkerIndex = -1; }
public void UpdateInfoPanel() { SetHappinessImoji(); AgeTextObject.GetComponent <Text>().text = "Test"; PayTextObject.GetComponent <Text>().text = CallEmployeeValue.EmployeeList[CurrentWorkerIndex].BaseInfo.Salary.ToString(); AbilityTextObject.GetComponent <Text>().text = " x " + CallEmployeeValue.EmployeeList[CurrentWorkerIndex].BaseInfo.LaborForce.ToString(); FatigueGraphBar.GetComponent <Image>().fillAmount = CallEmployeeValue.EmployeeList[CurrentWorkerIndex].FatigueValue / CallEmployeeValue.EmployeeList[CurrentWorkerIndex].BaseInfo.LaborForce; ExperienceGraphBar.GetComponent <Image>().fillAmount = CallEmployeeValue.EmployeeList[CurrentWorkerIndex].Experience / (CallEmployeeValue.EmployeeList[CurrentWorkerIndex].BaseInfo.LaborForce * 10); if (ExperienceGraphBar.GetComponent <Image>().fillAmount >= 1f) { PromoteButton.GetComponent <Button>().interactable = true; } else { PromoteButton.GetComponent <Button>().interactable = false; } }