private void LoadAttaqueButton(string path) { TextAsset txt = Resources.Load <TextAsset>(path); if (txt != null) { string[] tps = txt.text.Split('\n'); for (int i = 0; i < tps.Length; i++) { string[] str = tps[i].Split(':'); if (str[0][0] != '#') { Item item = new Item(); item.Intitule = str[1]; item.Power = float.Parse(str[2]); item.IntituleType = str[3]; item.Mana = float.Parse(str[4]); item.Caracteristique = str[5]; item.animationA = int.Parse(str[6]); item.animationB = int.Parse(str[7]); otherShop.AddItem(item, otherShop); } } otherShop.RefreshDisplay(); } else { Debug.Log("est null"); } }
public ContactsController(OrganazerContext context, KeyboardInput parser) : base(context, parser) { var listBox = new ScrollList(1, 1, 11, 9); foreach (var person in context.People.ToList()) { listBox.AddItem(person.FirstName + " " + person.LastName, person.Id); } this.root = new ContactList(0, 0, listBox); }
public ContactsController(KeyboardInput parser, OrganizerEntities context) : base(parser, context) { var listBox = new ScrollList(1, 1, 11, 9); foreach (var person in context.People.ToList()) { listBox.AddItem(person.FirstName + " " + person.LastName, person.Id); } this.root = new ContactsList(0, 0, listBox); }