public void AdicionaPcons() { if (playerPoints > 0) { tmpCons += 1; playerPoints -= 1; Mcons.GetComponent <TextMesh>().text = (tmpCons + cons).ToString(); } Ppontos.GetComponent <TextMesh>().text = playerPoints.ToString(); }
public void ShowValues() { Mname.GetComponent <TextMesh> ().text = nome.ToString(); Mlevel.GetComponent <TextMesh> ().text = level.ToString(); Mvida.GetComponent <TextMesh> ().text = vida.ToString(); Mener.GetComponent <TextMesh> ().text = ener.ToString(); Mtox.GetComponent <TextMesh> ().text = tox.ToString(); Mcons.GetComponent <TextMesh> ().text = cons.ToString(); Mresis.GetComponent <TextMesh> ().text = resis.ToString(); Mfor.GetComponent <TextMesh> ().text = forc.ToString(); Ppontos.GetComponent <TextMesh> ().text = playerPoints.ToString(); }
public void Cancelar() { playerPoints += tmpCons; playerPoints += tmpFor; playerPoints += tmpResis; Ppontos.GetComponent <TextMesh> ().text = playerPoints.ToString(); Mresis.GetComponent <TextMesh>().text = resis.ToString(); Mcons.GetComponent <TextMesh>().text = cons.ToString(); Mfor.GetComponent <TextMesh>().text = forc.ToString(); tmpCons = 0; tmpFor = 0; tmpResis = 0; }
public void RemovePcons() { if (tmpCons > 0) { tmpCons -= 1; playerPoints += 1; if (tmpCons == 0) { Mcons.GetComponent <TextMesh>().text = cons.ToString(); } else { Mcons.GetComponent <TextMesh>().text = (tmpCons + cons).ToString(); } Ppontos.GetComponent <TextMesh>().text = playerPoints.ToString(); } }