public GameObject ErzeugeFormInput(IDatenbankEintrag datenbankEintrag) { var formInput = Instantiate(this.formInputPrefab); this.ErzeugeFormInputButton(formInput, datenbankEintrag); return(this.SetzeButtonText(formInput)); }
public override void GetInhalt(List <IKartenelement> eintraege) { if (MenueModul.Instance.gameObject.activeInHierarchy) { MenueModul.Instance.SchliesseModul(); IDatenbankEintrag datenbankEintrag = eintraege[0]; List <IDatenbankEintrag> datenbankEintraege = new List <IDatenbankEintrag>(); foreach (var eintrag in eintraege) { datenbankEintraege.Add(eintrag); } FormModul.Instance.GetInhalt(datenbankEintraege); } }
void ErzeugeFormInputButton(GameObject popupEintrag, IDatenbankEintrag datenbankEintrag) { var popupButton = popupEintrag.transform.GetChild(0).gameObject; if (typeof(Teilaufgabe).IsAssignableFrom(datenbankEintrag.GetType())) { popupButton.AddComponent <TeilaufgabeInputAdapter>(); popupButton.GetComponent <TeilaufgabeInputAdapter>().Eintrag = (Teilaufgabe)datenbankEintrag; } else if (typeof(Item).IsAssignableFrom(datenbankEintrag.GetType())) { popupButton.AddComponent <ItemInputAdapter>(); popupButton.GetComponent <ItemInputAdapter>().Eintrag = (Item)datenbankEintrag; } }