public PopupXBoxGodSelectMsg getGodBox(God item) { GameObject obj = Instantiate(xBoxGodSelect) as GameObject; PopupXBoxGodSelectMsg specific = obj.GetComponent <PopupXBoxGodSelectMsg>(); specific.setTo(ui.world, item); return(specific); }
public PopupXScroll getScrollSetGods(List <God> gods) { PopupXScroll specific = getInnerXScrollSetGods(); foreach (God item in gods) { PopupXBoxGodSelectMsg box = getGodBox(item); box.gameObject.transform.SetParent(specific.gameObject.transform); box.ui = world.ui; specific.scrollables.Add(box); } return(specific); }