Ejemplo n.º 1
0
    private void ShowUnitButtons()
    {
        UnitAction unitAction = UnitAction.HEAL;

        if (selectedUnit.Type == UnitType.SETTLER)
        {
            unitAction = UnitAction.BUILD_CITY;
        }
        Sprite sprite = Resources.Load("UI/Icons/" + unitAction.ToString(), typeof(Sprite)) as Sprite;

        buyingButtons[0].GetComponent <Image>().sprite = sprite;
        buyingButtons[0].gameObject.SetActive(true);
        nameTextsButton[0].text = unitActionButtonName[(int)unitAction];
    }