示例#1
0
    private void ManageIconGreyOut()
    {
        PlayerMotherbase motherbase = GameManager.Instance.GetLocalMotherbaseComponent();

        if (motherbase)
        {
            if (motherbase.money < PlayerMotherbase.AGGRESIVE_COST)
            {
                aggressiveUnitBtn.interactable = false;
            }
            else
            {
                aggressiveUnitBtn.interactable = true;
            }

            if (motherbase.money < PlayerMotherbase.CONSTRUCT_COST)
            {
                constructionUnitBtn.interactable = false;
            }
            else
            {
                constructionUnitBtn.interactable = true;
            }

            // Update money indicator
            moneyLabel.text = "$" + motherbase.money;
        }
    }
示例#2
0
    private void AddConstructionUnit()
    {
        PlayerMotherbase motherbase = GameManager.Instance.GetLocalMotherbaseComponent();

        motherbase.SpawnConstructionUnit();
    }
示例#3
0
    private void AddAggressiveUnit()
    {
        PlayerMotherbase motherbase = GameManager.Instance.GetLocalMotherbaseComponent();

        motherbase.SpawnAggressiveUnit();
    }