Exemple #1
0
 private bool Setup(int nIndex)
 {
     base.Awake();
     if (this._uiBackground == null)
     {
         Util.FindParentToChild <UISprite>(ref this._uiBackground, base.get_transform(), "Background");
     }
     if (this._uiIndex == null)
     {
         Util.FindParentToChild <UILabel>(ref this._uiIndex, base.get_transform(), "Index");
     }
     if (this._uiHpSlider == null)
     {
         Util.FindParentToChild <UISlider>(ref this._uiHpSlider, base.get_transform(), "HPSlider");
     }
     if (this._uiLv == null)
     {
         Util.FindParentToChild <UILabel>(ref this._uiLv, base.get_transform(), "Lv");
     }
     if (this._uiName == null)
     {
         Util.FindParentToChild <UILabel>(ref this._uiName, base.get_transform(), "Name");
     }
     if (this._uiSupplyState == null)
     {
         Util.FindParentToChild <CommonShipSupplyState>(ref this._uiSupplyState, base.get_transform(), "Materials");
     }
     if (this._bunnerShutter == null)
     {
         Transform transform = base.get_transform().FindChild("BannerShutter");
         if (transform != null)
         {
             this._bunnerShutter = transform.GetComponent <BannerShutter>();
         }
     }
     this._uiStarManager.init(0);
     this._nIndex = nIndex;
     return(true);
 }
 private bool Setup(int nIndex)
 {
     Awake();
     if (_uiBackground == null)
     {
         Util.FindParentToChild(ref _uiBackground, base.transform, "Background");
     }
     if (_uiIndex == null)
     {
         Util.FindParentToChild(ref _uiIndex, base.transform, "Index");
     }
     if (_uiHpSlider == null)
     {
         Util.FindParentToChild(ref _uiHpSlider, base.transform, "HPSlider");
     }
     if (_uiLv == null)
     {
         Util.FindParentToChild(ref _uiLv, base.transform, "Lv");
     }
     if (_uiName == null)
     {
         Util.FindParentToChild(ref _uiName, base.transform, "Name");
     }
     if (_uiSupplyState == null)
     {
         Util.FindParentToChild(ref _uiSupplyState, base.transform, "Materials");
     }
     if (_bunnerShutter == null)
     {
         Transform transform = base.transform.FindChild("BannerShutter");
         if (transform != null)
         {
             _bunnerShutter = ((Component)transform).GetComponent <BannerShutter>();
         }
     }
     _uiStarManager.init(0);
     _nIndex = nIndex;
     return(true);
 }