void UpdateCompleteState() { ConfirmButtonTextObject.GetComponent <Text>().text = "Completed"; ConfirmButtonObject.GetComponent <Button>().interactable = false; ConfirmButtonObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 1f); TechTreeInitializing(true); }
void ClearInfoPanel() { TitleImageObject.GetComponent <Image>().sprite = null; TitleImageObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 0f); NameTextObject.GetComponent <Text>().text = ""; ProgressBarImageObject.GetComponent <Image>().fillAmount = 0f; ProgressPanelClear(); ConfirmButtonTextObject.GetComponent <Text>().text = "Start"; ConfirmButtonObject.GetComponent <Button>().interactable = false; }
void DisplayResearchInfo() { ClearInfoPanel(); if (CurrnetResearchName != "") { // TitleImageObject.GetComponent<Image>().sprite = Resources.Load<Sprite>("GameSystem/InGameUI/Sprite/TechTreeTitleImage_" + CurrnetResearchName); TitleImageObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 1f); NameTextObject.GetComponent <Text>().text = CurrnetResearchName; ConfirmButtonObject.GetComponent <Button>().interactable = true; if (CurrnetResearchName == CallTargetLabatoryAct.CurrentResearchingTech) { // ProgressBarImageObject.GetComponent<Image>().fillAmount = ConfirmButtonTextObject.GetComponent <Text>().text = "Cancel"; ConfirmButtonObject.GetComponent <Image>().color = new Color(1f, 0.4f, 0.4f, 1f); } else { if (CallTargetLabatoryAct.CurrentResearchingTech != null) { ConfirmButtonTextObject.GetComponent <Text>().text = "Change"; ConfirmButtonObject.GetComponent <Image>().color = new Color(1f, 0.5f, 0.2f, 1f); } else { if (CallTechValue.GetTechPossible(CurrnetResearchName)) { ConfirmButtonTextObject.GetComponent <Text>().text = "Start"; } else { ConfirmButtonTextObject.GetComponent <Text>().text = "Completed"; ConfirmButtonObject.GetComponent <Button>().interactable = false; } ConfirmButtonObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 1f); } } UpdateProgressInfo(); } }