public void SelecaoPepsi() { int value = Escolha.GetComponent <Dropdown>().value; switch (value) { case 0: fRefri = fCoca; break; case 1: fRefri = fPepsi; break; } }
// Start is called before the first frame update void Start() { Mistura = transform.GetChild(1).GetChild(0).GetComponent <Image>(); Maior = transform.GetChild(2).GetChild(0).GetComponent <Image>(); txtPreco = transform.GetChild(2).GetChild(0).GetChild(0).GetComponent <Text>(); txtOoks = transform.GetChild(3).GetComponent <Text>(); CorT = Color.white; CorM = Color.white; GetComponent <Slider>().minValue = FxFaixa.x; GetComponent <Slider>().maxValue = FxFaixa.y; fRefri = gbCoca.GetComponent <BarMls>().Fuzzyficar; fRum = gbRum.GetComponent <BarMls>().Fuzzyficar; fGelo = gbGelo.GetComponent <BarMls>().Fuzzyficar; fCoca = gbCoca.GetComponent <BarMls>().Fuzzyficar; fPepsi = gbPepsi.GetComponent <BarMls>().Fuzzyficar; SelecaoPepsi(); }
void Selecao() { if (fPepsi.MLS == 0 && fCoca.MLS == 0) { fRefri = fCoca; } else if (fCoca.MLS == 0) { fRefri = fPepsi; } else if (fPepsi.MLS == 0) { fRefri = fCoca; } else { fRefri = fNull; } }