Exemplo n.º 1
0
    public void OnCickPopOpen()
    {
        if (fundsController.GetFunds() < factoryManager.GetFactoryStatus(buildFactoryID, 0).rankUpcost)
        {
            missPopups[1].SetActive(true);
            return;
        }

        if (mapGenerator.CheckCanBuildPos() == false)
        {
            missPopups[0].SetActive(true);
            return;
        }
        checkPopup.SetActive(true);
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < 4; i++)
        {
            if (factory.CanBuild(i) == true)
            {
                buildButtons[i].interactable = true;

                buildText[i].text = "商品:" + factory.GetFactoryStatus(i % 4, 0).productName
                                    + "\n生産数:" + factory.GetFactoryStatus(i % 4, 0).productCount
                                    + "\n建設費:" + factory.GetFactoryStatus(i % 4, 0).rankUpcost
                                    + "\n維持費:" + (factory.GetFactoryStatus(i % 4, 0).rankUpcost / 10).ToString();
            }
            else
            {
                buildButtons[i].interactable = false;

                buildText[i].text = "商品:" + "?????"
                                    + "\n生産数:" + "?????"
                                    + "\n建設費:" + "?????"
                                    + "\n維持費:" + "?????";
            }
        }
        checkButton.interactable = false;
    }