using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class AlphaB : MonoBehaviour
{
    Image image1;
    Osito Piezas;
    // Start is called before the first frame update
    void Start()
    {
        Piezas = GameObject.Find("Osito").GetComponent<Osito>();
    }

    // Update is called once per frame
    void Update()
    {
        image1 = GetComponent<Image>();
        Color A = image1.color;
        A.a = 0.5f;
        image1.color = A;

        if (Piezas.Body == true)
        {
            image1 = GetComponent<Image>();
            A.a = 1f;
            image1.color = A;
            if (Piezas.Body == false)
            {
                image1 = GetComponent<Image>();
                A.a = 0.5f;
                image1.color = A;
            }
        }

    }
}
