public void IconClicked()//responds to a click on a button
    {
        StorageMNG storage = GetComponentInParent <StorageMNG>();

        if (!charAttributes.isDeployed) //evaluates if the unit is already on the battlefield
        {
            storage.TintIcon(this);     //marks a regiment to be placed on the battlefield
        }
        else
        {
            storage.RemoveRegiment(charAttributes);
            //storage.ReturnRegiment(this);//returns the hero to the storage
        }
    }
Пример #2
0
    public void IconClicked()// responde a un clic en un botón
    {
        StorageMNG storage = GetComponentInParent <StorageMNG>();

        if (!charAttributes.isDeployed) // evalúa si la unidad ya está en el campo de batalla
        {
            storage.TintIcon(this);     // marca un regimiento para colocarlo en el campo de batalla
        }
        else
        {
            storage.RemoveRegiment(charAttributes);
            //storage.ReturnRegiment(this);//returns the hero to the storage
        }
    }