예제 #1
0
    void UpdateCompleteState()
    {
        ConfirmButtonTextObject.GetComponent <Text>().text       = "Completed";
        ConfirmButtonObject.GetComponent <Button>().interactable = false;

        ConfirmButtonObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 1f);

        TechTreeInitializing(true);
    }
예제 #2
0
    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;
    }
예제 #3
0
    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();
        }
    }