public static UIRebellionOrgaizeShipBanner Instantiate(UIRebellionOrgaizeShipBanner prefab, Transform parent, int nIndex)
        {
            UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner = UnityEngine.Object.Instantiate(prefab);

            uIRebellionOrgaizeShipBanner.transform.parent = parent;
            uIRebellionOrgaizeShipBanner.transform.localScaleOne();
            uIRebellionOrgaizeShipBanner.transform.localPositionZero();
            uIRebellionOrgaizeShipBanner.Setup(nIndex);
            return(uIRebellionOrgaizeShipBanner);
        }
Esempio n. 2
0
        public static UIRebellionOrgaizeShipBanner Instantiate(UIRebellionOrgaizeShipBanner prefab, Transform parent, int nIndex)
        {
            UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner = Object.Instantiate <UIRebellionOrgaizeShipBanner>(prefab);

            uIRebellionOrgaizeShipBanner.get_transform().set_parent(parent);
            uIRebellionOrgaizeShipBanner.get_transform().localScaleOne();
            uIRebellionOrgaizeShipBanner.get_transform().localPositionZero();
            uIRebellionOrgaizeShipBanner.Setup(nIndex);
            return(uIRebellionOrgaizeShipBanner);
        }
        private IEnumerator CreaetShipBanner()
        {
            _listShipBanners = new List <UIRebellionOrgaizeShipBanner>();
            if (_listBannerPos != null)
            {
                for (int i = 0; i < _listBannerPos.Count; i++)
                {
                    _listShipBanners.Add(UIRebellionOrgaizeShipBanner.Instantiate(((Component)_prefabRebellionShipBanner).GetComponent <UIRebellionOrgaizeShipBanner>(), base.transform, i));
                    _listShipBanners[i].transform.localPosition = _listBannerPos[i];
                    _listShipBanners[i].transform.name          = $"RebellionOrgaizeShipBanner{i}";
                    yield return(null);
                }
                yield return(Observable.NextFrame(FrameCountType.EndOfFrame).StartAsCoroutine());

                panel.widgetsAreStatic = true;
            }
        }