private string GetJsonParams(EnumHeroes code) { //подгрузка jsona string json = code.ToString(); return(json); }
private void Start() { Button[] buttons = buttonsHeroes.GetComponentsInChildren <Button> (); for (int i = 0; i < buttons.Length; ++i) { int index = i; EnumHeroes eHero = GetHeroByID(index); buttons [i].GetComponentInChildren <Text> ().text = eHero.ToString(); buttons [i].onClick.AddListener(() => { CreateHero(eHero); }); } }