public void updateValues() { if (checkName(Name.text)) { App.xmlFile.EditPlayer(index, new Player(Name.text, Position.text, Int32.Parse(Skill.text))); PresentPlayers.reloadButtons(); } }
public void addPlayer() { string name = Name.GetComponent <Text> ().text; string position = Position.GetComponent <Text> ().text; string skill = Skill.GetComponent <Text> ().text; if (checkName(name)) { App.xmlFile.AddPlayer(new Player(name, position, Int32.Parse(skill))); PresentPlayers.addNextButton(); } Name.GetComponent <Text>().text = String.Empty; Position.GetComponent <Text>().text = "Goalkeeper"; Skill.GetComponent <Text>().text = "1"; }
public void deleteValues() { App.xmlFile.DeletePlayer(index); PresentPlayers.reloadButtons(); }