void ClearInfoPanel()
    {
        ImageObject.GetComponent <Image>().sprite            = null;
        ImageObject.GetComponent <Image>().color             = new Color(1f, 1f, 1f, 0);
        NameTextObject.GetComponent <Text>().text            = "";
        TypeTextObject.GetComponent <Text>().text            = "";
        CompanyTextObject.GetComponent <Text>().text         = "";
        ExpectQualityTextObject.GetComponent <Text>().text   = "";
        MaterialPointTextObject.GetComponent <Text>().text   = "";
        TechPointTextObject.GetComponent <Text>().text       = "";
        LookPointTextObject.GetComponent <Text>().text       = "";
        PerfectionPointTextObject.GetComponent <Text>().text = "";
        TotalPointTextObject.GetComponent <Text>().text      = "";
        PackagedValueImage.GetComponent <Image>().sprite     = Resources.Load <Sprite>("GameSystem/InGameUI/Sprite/QuestionMark");

        for (int i = 1; i < RequirementProductInfoPanel.transform.childCount - 1; i++)
        {
            for (int j = 0; j < RequirementProductInfoPanel.transform.GetChild(i + 1).childCount; j++)
            {
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(j).gameObject.SetActive(true);
            }
        }

        for (int i = 1; i < RequirementProductInfoPanel.transform.childCount - 1; i++)
        {
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 0);
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = null;
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(2).GetChild(0).gameObject.GetComponent <Text>().text    = "";
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(2).GetChild(1).gameObject.GetComponent <Text>().text    = "";
            RequirementProductInfoPanel.transform.GetChild(i).gameObject.GetComponent <Button>().interactable = false;
        }

        ChangeCostPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = "$ 0";
    }
예제 #2
0
    void DisplayInfo(string Name)
    {
        if (Name == "None")
        {
            NameTextObject.GetComponent <Text>().text = Name;
        }
        else
        {
            GoodsRecipe.Recipe TargetItemRecipe = CallGoodsRecipe.GetRecipe(Name);

            ImageObject.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + TargetItemRecipe.Type);
            ImageObject.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 1f);
            NameTextObject.GetComponent <Text>().text = TargetItemRecipe.OutputName;
            TypeTextObject.GetComponent <Text>().text = TargetItemRecipe.Type;

            MaterialPointTextObject.GetComponent <Text>().text = " x " + (Mathf.RoundToInt(TargetItemRecipe.Attractiveness.MaterialPoint * 10) * 0.1).ToString();
            TechPointTextObject.GetComponent <Text>().text     = " x " + (Mathf.RoundToInt(TargetItemRecipe.Attractiveness.TechPoint * 10) * 0.1).ToString();
            LookPointTextObject.GetComponent <Text>().text     = " x " + (Mathf.RoundToInt(TargetItemRecipe.Attractiveness.LookPoint * 10) * 0.1).ToString();
            TotalPointTextObject.GetComponent <Text>().text    = " x " + (Mathf.RoundToInt(TargetItemRecipe.Attractiveness.TotalPoint * 10) * 0.1).ToString();

            if (Name == CallTargetGoodsCreator.TargetGoodsName)
            {
                MainFunctionButton.GetComponent <Button>().interactable = false;
            }
            if (Name != CallTargetGoodsCreator.TargetGoodsName)
            {
                MainFunctionButton.GetComponent <Button>().interactable = true;
            }
        }

        CurrentItem = Name;

        UpdateRemainQuantityText();
    }
예제 #3
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;
    }
예제 #4
0
    public void ClearInfoPanel()
    {
        ImageObject.GetComponent <Image>().sprite    = null;
        ImageObject.GetComponent <Image>().color     = new Color(0, 0, 0, 0);
        NameTextObject.GetComponent <Text>().text    = "";
        TypeTextObject.GetComponent <Text>().text    = "";
        CompanyTextObject.GetComponent <Text>().text = "";

        RemainQuantityTextObject.GetComponent <Text>().text = "";

        MaterialPointTextObject.GetComponent <Text>().text = " x ";
        TechPointTextObject.GetComponent <Text>().text     = " x ";
        LookPointTextObject.GetComponent <Text>().text     = " x ";
        TotalPointTextObject.GetComponent <Text>().text    = " x ";

        CurrentItem = "";
    }
예제 #5
0
    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;
    }
예제 #6
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();
        }
    }
예제 #7
0
    public void DisplayInfo(int Index)
    {
        CurrentWorkerIndex = Index;

        SetHappinessImoji();
        NameTextObject.GetComponent <Text>().text    = CallEmployeeValue.EmployeeList[Index].BaseInfo.Name;
        AgeTextObject.GetComponent <Text>().text     = "Test";
        PayTextObject.GetComponent <Text>().text     = CallEmployeeValue.EmployeeList[Index].BaseInfo.Salary.ToString();
        AbilityTextObject.GetComponent <Text>().text = " x " + CallEmployeeValue.EmployeeList[Index].BaseInfo.LaborForce.ToString();

        FatigueGraphBar.gameObject.GetComponent <Image>().fillAmount    = CallEmployeeValue.EmployeeList[Index].FatigueValue / CallEmployeeValue.EmployeeList[Index].BaseInfo.LaborForce;
        ExperienceGraphBar.gameObject.GetComponent <Image>().fillAmount = CallEmployeeValue.EmployeeList[Index].Experience / (CallEmployeeValue.EmployeeList[Index].BaseInfo.LaborForce * 10);

        if (ExperienceGraphBar.GetComponent <Image>().fillAmount >= 1f)
        {
            PromoteButton.GetComponent <Button>().interactable = true;
        }
        else
        {
            PromoteButton.GetComponent <Button>().interactable = false;
        }
        FireButton.GetComponent <Button>().interactable = true;
    }
예제 #8
0
    void ClearInfoPanel()
    {
        ImageObject.GetComponent <Image>().sprite            = null;
        ImageObject.GetComponent <Image>().color             = new Color(1f, 1f, 1f, 0);
        NameTextObject.GetComponent <Text>().text            = "";
        TypeTextObject.GetComponent <Text>().text            = "";
        CompanyTextObject.GetComponent <Text>().text         = "";
        CostTextObject.GetComponent <Text>().text            = "";
        MaterialPointTextObject.GetComponent <Text>().text   = "";
        TechPointTextObject.GetComponent <Text>().text       = "";
        LookPointTextObject.GetComponent <Text>().text       = "";
        PerfectionPointTextObject.GetComponent <Text>().text = "";
        TotalPointTextObject.GetComponent <Text>().text      = "";
        PackagedValueImage.GetComponent <Image>().color      = new Color(1f, 1f, 1f, 1f);

        for (int i = 1; i < RequirementProductInfoPanel.transform.childCount - 1; i++)
        {
            for (int j = 0; j < RequirementProductInfoPanel.transform.GetChild(i + 1).childCount; j++)
            {
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(j).gameObject.SetActive(true);
            }
        }

        for (int i = 1; i < RequirementProductInfoPanel.transform.childCount - 1; i++)
        {
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 0);
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = null;
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(2).GetChild(0).gameObject.GetComponent <Text>().text    = "";
            RequirementProductInfoPanel.transform.GetChild(i).GetChild(2).GetChild(1).gameObject.GetComponent <Text>().text    = "";
            RequirementProductInfoPanel.transform.GetChild(i).gameObject.GetComponent <Button>().interactable = false;
        }

        RequireProcessorPanel.SetActive(true);
        RequireProcessorImage.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 0);
        RequireProcessorNameText.GetComponent <Text>().text = "";
        RequireProcessorTypeText.GetComponent <Text>().text = "";
    }
    void DisplayInfo(string Name)
    {
        if (Name == "None")
        {
            NameTextObject.GetComponent <Text>().text = "None";

            ChangeCostPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = "$ 0";
            string ButtonName = "";
            if (CallTargetProcessorAct.TargetGoodsRecipe != null)
            {
                ButtonName = "Remove Process";
                MainFunctionButton.GetComponent <Button>().interactable = true;
            }
            else
            {
                ButtonName = "Change";
                MainFunctionButton.GetComponent <Button>().interactable = false;
            }

            MainFunctionButton.transform.GetChild(0).gameObject.GetComponent <Text>().text = ButtonName;
        }
        else
        {
            TechValue.RecipeInfo        TargetItemRecipe = CallTechValue.GetRecipe(Name);
            TechRecipe.ProcessActorInfo TargetActorInfo  = CallTechRecipe.GetProcessActorInfo(CurrentCategory);

            ImageObject.GetComponent <Image>().sprite          = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + TargetItemRecipe.Recipe.Type);
            ImageObject.GetComponent <Image>().color           = new Color(1f, 1f, 1f, 1f);
            NameTextObject.GetComponent <Text>().text          = TargetItemRecipe.Recipe.OutputName;
            TypeTextObject.GetComponent <Text>().text          = TargetItemRecipe.Recipe.Type;
            CompanyTextObject.GetComponent <Text>().text       = TargetItemRecipe.Owner;
            ExpectQualityTextObject.GetComponent <Text>().text = "TEST";

            MaterialPointTextObject.GetComponent <Text>().text   = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.MaterialPoint * 10) * 0.1).ToString();
            TechPointTextObject.GetComponent <Text>().text       = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.TechPoint * 10) * 0.1).ToString();
            LookPointTextObject.GetComponent <Text>().text       = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.LookPoint * 10) * 0.1).ToString();
            PerfectionPointTextObject.GetComponent <Text>().text = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.PerfectionPoint * 10) * 0.1).ToString();
            TotalPointTextObject.GetComponent <Text>().text      = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.TotalPoint * 10) * 0.1).ToString();
            if (TargetItemRecipe.Recipe.Attractiveness.isPackaged)
            {
                PackagedValueImage.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/InGameUI/Sprite/PossitiveMark");
            }
            else
            {
                PackagedValueImage.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/InGameUI/Sprite/NegativeMark");
            }

            for (int i = 1; i < RequirementProductInfoPanel.transform.childCount - 1; i++)
            {
                for (int j = 0; j < RequirementProductInfoPanel.transform.GetChild(i + 1).childCount; j++)
                {
                    RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(j).gameObject.SetActive(false);
                }
            }

            if (TargetItemRecipe.Recipe.InputName != null)
            {
                for (int i = 0; i < TargetItemRecipe.Recipe.InputName.Length; i++)
                {
                    for (int j = 0; j < RequirementProductInfoPanel.transform.GetChild(i + 1).childCount; j++)
                    {
                        RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(j).gameObject.SetActive(true);
                    }
                    GoodsRecipe.Recipe InputItem = CallGoodsRecipe.GetRecipe(TargetItemRecipe.Recipe.InputName[i]);
                    RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 1f);
                    RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + InputItem.Type);
                    RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(2).GetChild(0).gameObject.GetComponent <Text>().text    = InputItem.OutputName;
                    RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(2).GetChild(1).gameObject.GetComponent <Text>().text    = InputItem.Type;
                    if (TargetItemRecipe.Owner == PlayerCompanyName)
                    {
                        RequirementProductInfoPanel.transform.GetChild(i + 1).gameObject.GetComponent <Button>().interactable = true;
                    }
                    else
                    {
                        RequirementProductInfoPanel.transform.GetChild(i + 1).gameObject.GetComponent <Button>().interactable = false;
                    }
                }
            }

            string ButtonName = "";
            if (CallTargetProcessorAct.ProcessorActorName == CurrentCategory)
            {
                if (CallTargetProcessorAct.TargetGoodsRecipe != null)
                {
                    ButtonName = "Change Goods";
                    if (CallTargetProcessorAct.TargetGoodsRecipe.OutputName == CurrentItem)
                    {
                        MainFunctionButton.GetComponent <Button>().interactable = false;
                    }
                    else
                    {
                        MainFunctionButton.GetComponent <Button>().interactable = true;
                    }

                    ChangeCostPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = "$ 0";
                }
            }
            else
            {
                MainFunctionButton.GetComponent <Button>().interactable = true;

                if (CallTargetProcessorAct.TargetGoodsRecipe != null)
                {
                    if (CallTargetProcessorAct.TargetGoodsRecipe.OutputName == CurrentItem)
                    {
                        ButtonName = "Change Processor";
                    }
                    else
                    {
                        ButtonName = "Change Processor & Goods";
                    }
                }
                else
                {
                    ButtonName = "Change Processor & Goods";
                }

                ChangeCostPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = "$ " + TargetActorInfo.Cost.ToString();
            }
            MainFunctionButton.transform.GetChild(0).gameObject.GetComponent <Text>().text = ButtonName;
        }
    }
예제 #10
0
    void DisplayInfo(string Name)
    {
        TechValue.RecipeInfo TargetItemRecipe = CallTechValue.GetRecipe(Name);

        ImageObject.GetComponent <Image>().sprite    = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + TargetItemRecipe.Recipe.Type);
        ImageObject.GetComponent <Image>().color     = new Color(1f, 1f, 1f, 1f);
        NameTextObject.GetComponent <Text>().text    = TargetItemRecipe.Recipe.OutputName;
        TypeTextObject.GetComponent <Text>().text    = TargetItemRecipe.Recipe.Type;
        CompanyTextObject.GetComponent <Text>().text = TargetItemRecipe.Owner;
        CostTextObject.GetComponent <Text>().text    = "TEST";

        MaterialPointTextObject.GetComponent <Text>().text   = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.MaterialPoint * 10) * 0.1).ToString();
        TechPointTextObject.GetComponent <Text>().text       = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.TechPoint * 10) * 0.1).ToString();
        LookPointTextObject.GetComponent <Text>().text       = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.LookPoint * 10) * 0.1).ToString();
        PerfectionPointTextObject.GetComponent <Text>().text = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.PerfectionPoint * 10) * 0.1).ToString();
        TotalPointTextObject.GetComponent <Text>().text      = "x " + (Mathf.RoundToInt(TargetItemRecipe.Recipe.Attractiveness.TotalPoint * 10) * 0.1).ToString();
        if (TargetItemRecipe.Recipe.Attractiveness.isPackaged)
        {
            PackagedValueImage.GetComponent <Image>().color = new Color(0, 1f, 0, 1f);
        }
        else
        {
            PackagedValueImage.GetComponent <Image>().color = new Color(1f, 0, 0, 1f);
        }

        for (int i = 1; i < RequirementProductInfoPanel.transform.childCount - 1; i++)
        {
            for (int j = 0; j < RequirementProductInfoPanel.transform.GetChild(i + 1).childCount; j++)
            {
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(j).gameObject.SetActive(false);
            }
        }

        if (TargetItemRecipe.Recipe.InputName != null)
        {
            for (int i = 0; i < TargetItemRecipe.Recipe.InputName.Length; i++)
            {
                for (int j = 0; j < RequirementProductInfoPanel.transform.GetChild(i + 1).childCount; j++)
                {
                    RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(j).gameObject.SetActive(true);
                }
                GoodsRecipe.Recipe InputItem = CallGoodsRecipe.GetRecipe(TargetItemRecipe.Recipe.InputName[i]);
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 1f);
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + InputItem.Type);
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(2).GetChild(0).gameObject.GetComponent <Text>().text    = InputItem.OutputName;
                RequirementProductInfoPanel.transform.GetChild(i + 1).GetChild(2).GetChild(1).gameObject.GetComponent <Text>().text    = InputItem.Type;
                if (TargetItemRecipe.Owner == PlayerCompanyName)
                {
                    RequirementProductInfoPanel.transform.GetChild(i + 1).gameObject.GetComponent <Button>().interactable = true;
                }
                else
                {
                    RequirementProductInfoPanel.transform.GetChild(i + 1).gameObject.GetComponent <Button>().interactable = false;
                }
            }
        }

        if (TargetItemRecipe.Recipe.RequiredProcessor == null)
        {
            RequireProcessorPanel.SetActive(false);
        }
        else
        {
            string ProcessorType = TargetItemRecipe.Recipe.RequiredProcessor.Split('?')[0];
            string ProcessorName = TargetItemRecipe.Recipe.RequiredProcessor.Split('?')[1];

            RequireProcessorPanel.SetActive(true);
            RequireProcessorImage.GetComponent <Image>().color  = new Color(1f, 1f, 1f, 1f);
            RequireProcessorNameText.GetComponent <Text>().text = ProcessorName;
            RequireProcessorTypeText.GetComponent <Text>().text = ProcessorType;
        }
    }