Esempio n. 1
0
    private void EquipoOrden()
    {
        Refresh();
        EquipoControl ec = grabbed.GetComponent <EquipoControl>();

        texto.GetComponent <Text>().text = "Nombre: " + ec.equip.codigo;
        textoSac.Add(GameObject.Instantiate(texto, this.gameObject.transform));
        textoSac.Add(GameObject.Instantiate(texto, this.gameObject.transform));
        textoSac.Add(GameObject.Instantiate(texto, this.gameObject.transform));
        textoSac[0].GetComponent <Text>().text = "Tipo: " + ec.GetTipoEsp();
        textoSac[1].GetComponent <Text>().text = "CFM real: " + ec.CFMreal();
        if (ec.equip.calculo)
        {
            textoSac[2].GetComponent <Text>().text = "Equipo de ventilación";
        }
        else
        {
            textoSac[2].GetComponent <Text>().text = "Equipo de aire acondicionado";
            textoSac[2].GetComponent <RectTransform>().sizeDelta = new Vector2(200, 20);
            textoSac[2].GetComponent <RectTransform>().SetInsetAndSizeFromParentEdge(RectTransform.Edge.Left, 10, 200);
        }
        ReOrderElements();
    }