Exemplo n.º 1
0
 public void updateValues()
 {
     if (checkName(Name.text))
     {
         App.xmlFile.EditPlayer(index, new Player(Name.text, Position.text, Int32.Parse(Skill.text)));
         PresentPlayers.reloadButtons();
     }
 }
Exemplo n.º 2
0
        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";
        }
Exemplo n.º 3
0
 public void deleteValues()
 {
     App.xmlFile.DeletePlayer(index);
     PresentPlayers.reloadButtons();
 }