Beispiel #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();
     }
 }
Beispiel #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";
        }
Beispiel #3
0
 public void deleteValues()
 {
     App.xmlFile.DeletePlayer(index);
     PresentPlayers.reloadButtons();
 }