Example #1
0
 private void CreateObjects()
 {
     this.mName = GameUITools.FindUILabel("name", base.gameObject);
     this.mLevelValue = GameUITools.FindUILabel("lvlTxt/num", base.gameObject);
     this.mStars = GameUITools.FindGameObject("stars", base.gameObject).AddComponent<GUIStars>();
     this.mStars.Init(5);
     this.mStars.Hide();
     this.initFlag = true;
     Vector3 localPosition = this.mLevelValue.transform.parent.localPosition;
     localPosition.x = -50f;
     this.mLevelValue.transform.parent.localPosition = localPosition;
 }
 private void CreateObjects()
 {
     this.mSelectPop = GameUITools.FindGameObject("SelectPetPopUp", base.gameObject).AddComponent<MagicMirrorSelectPetPopUp>();
     this.mSelectPop.Init(this);
     this.mSelectPop.Hide();
     GameObject parent = GameUITools.FindGameObject("Window", base.gameObject);
     GameObject parent2 = GameUITools.RegisterClickEvent("InAdd", new UIEventListener.VoidDelegate(this.OnInAddClick), parent);
     this.mInAdd = GameUITools.RegisterClickEvent("Add", new UIEventListener.VoidDelegate(this.OnInAddClick), parent2);
     this.mInTips = GameUITools.FindGameObject("Tips", parent2);
     this.mInInfo = GameUITools.FindGameObject("Info", parent2);
     this.mInName = GameUITools.FindUILabel("Name", this.mInInfo);
     this.mInLevel = GameUITools.FindUILabel("Level", this.mInInfo);
     this.mInStars = GameUITools.FindGameObject("Stars", this.mInInfo).AddComponent<GUIStars>();
     this.mInStars.Init(5);
     this.mInValues = GameUITools.FindGameObject("Values", this.mInInfo).AddComponent<GUIAttributeValue>();
     this.mInSkills = GameUITools.FindGameObject("Skill", this.mInInfo).AddComponent<GUIPetSkills>();
     parent2 = GameUITools.RegisterClickEvent("OutAdd", new UIEventListener.VoidDelegate(this.OnOutAddClick), parent);
     this.mOutAdd = GameUITools.RegisterClickEvent("Add", new UIEventListener.VoidDelegate(this.OnOutAddClick), parent2);
     this.mOutTips = GameUITools.FindGameObject("Tips", parent2);
     this.mOutInfo = GameUITools.FindGameObject("Info", parent2);
     this.mOutName = GameUITools.FindUILabel("Name", this.mOutInfo);
     this.mOutLevel = GameUITools.FindUILabel("Level", this.mOutInfo);
     this.mOutStars = GameUITools.FindGameObject("Stars", this.mOutInfo).AddComponent<GUIStars>();
     this.mOutStars.Init(5);
     this.mOutValues = GameUITools.FindGameObject("Values", this.mOutInfo).AddComponent<GUIAttributeValue>();
     this.mOutSkills = GameUITools.FindGameObject("Skill", this.mOutInfo).AddComponent<GUIPetSkills>();
     GameUITools.RegisterClickEvent("RulesBtn", new UIEventListener.VoidDelegate(this.OnRulesClick), parent);
     this.mCost = GameUITools.FindGameObject("Cost", parent);
     this.mDiamond = GameUITools.FindUILabel("Diamond", this.mCost);
     this.mMagicSoul = GameUITools.FindUILabel("MagicSoul", this.mCost);
     this.mChangeBtn = GameUITools.RegisterClickEvent("ChangeBtn", new UIEventListener.VoidDelegate(this.OnChangeClick), parent).GetComponent<UIButton>();
     this.mChangeBtns = this.mChangeBtn.GetComponents<UIButton>();
     this.mChangeBtnEffect = GameUITools.FindGameObject("Effect", this.mChangeBtn.gameObject);
     this.RefreshInInfo();
 }
 private void CreateObjects()
 {
     Transform transform = base.transform.Find("UIMiddle");
     this.mFlowerSp = transform.Find("flower").gameObject;
     this.mFlowerSp.transform.localScale = Vector3.zero;
     this.mUIEffect0 = this.mFlowerSp.transform.Find("ui57_4").gameObject;
     Tools.SetParticleRenderQueue2(this.mUIEffect0, 5500);
     NGUITools.SetActive(this.mUIEffect0, false);
     this.mUIEffect1 = base.transform.Find("Texture/ui57").gameObject;
     Tools.SetParticleRenderQueue2(this.mUIEffect1, 5490);
     NGUITools.SetActive(this.mUIEffect1, false);
     this.mUIEffect3 = base.transform.Find("Texture/ui57_5").gameObject;
     Tools.SetParticleRenderQueue2(this.mUIEffect3, 5450);
     NGUITools.SetActive(this.mUIEffect3, false);
     this.mUIEffect4 = base.transform.Find("Texture/ui57_6").gameObject;
     Tools.SetParticleRenderQueue2(this.mUIEffect4, 5550);
     NGUITools.SetActive(this.mUIEffect4, false);
     this.mCardModel = transform.Find("modelPos").gameObject;
     Transform transform2 = transform.Find("rightInfo");
     transform2.localScale = new Vector3(0f, 1f, 1f);
     this.mRightInfoBg = transform2.GetComponent<UISprite>();
     GameObject parent = GameUITools.FindGameObject("Info", this.mRightInfoBg.gameObject);
     this.mName = GameUITools.FindUILabel("Name", parent);
     this.mLevel = GameUITools.FindUILabel("Level", parent);
     this.mStars = GameUITools.FindGameObject("Stars", parent).AddComponent<GUIStars>();
     this.mStars.Init(5);
     this.mValues = GameUITools.FindGameObject("Values", parent).AddComponent<GUIAttributeValue>();
     this.mSkills = GameUITools.FindGameObject("Skill", parent).AddComponent<GUIPetSkills>();
     this.mContinueBtn = transform.Find("continueBtn").gameObject;
     UIEventListener expr_20C = UIEventListener.Get(this.mContinueBtn);
     expr_20C.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_20C.onClick, new UIEventListener.VoidDelegate(this.OnContinueBtnClick));
     this.mContinueScale = this.mContinueBtn.GetComponent<TweenScale>();
     this.mContinueBtn.transform.localScale = Vector3.zero;
     this.mSequenceForSuc = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate));
 }
Example #4
0
 protected void CreateObjects()
 {
     this.mBG = base.gameObject.GetComponent<UISprite>();
     this.mIconItem = CommonIconItem.Create(base.gameObject, new Vector3(11f, -9f, 0f), new CommonIconItem.VoidCallBack(this.OnIconClick), true, 0.9f, null);
     this.mLevel = GameUITools.FindUILabel("Level", base.gameObject);
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mInfoPanel = GameUITools.FindGameObject("InfoPanel", base.gameObject);
     this.mInfo = GameUITools.FindUISprite("Info", this.mInfoPanel.gameObject);
     this.mList = GameUITools.FindGameObject("List", this.mInfoPanel.gameObject);
     this.mPoint0 = GameUITools.FindUILabel("Point0", this.mInfo.gameObject);
     this.mPoint0Value = GameUITools.FindUILabel("Value", this.mPoint0.gameObject);
     this.mPoint1 = GameUITools.FindUILabel("Point1", this.mInfo.gameObject);
     this.mPoint1Value = GameUITools.FindUILabel("Value", this.mPoint1.gameObject);
     this.mRefineLevel = GameUITools.FindUILabel("RefineLevel", this.mInfo.gameObject);
     this.mRefineLevelBG = GameUITools.FindUISprite("BG", this.mRefineLevel.gameObject);
     this.mDesc = GameUITools.FindUILabel("Desc", this.mInfo.gameObject);
     this.mRelation = GameUITools.FindUILabel("Relation", this.mInfo.gameObject);
     this.mStars = GameUITools.FindGameObject("Stars", this.mInfo.gameObject).AddComponent<GUIStars>();
     this.mStars.Init(5);
     this.mOwner = GameUITools.FindUILabel("Owner", base.gameObject);
     this.mOwner.gameObject.SetActive(true);
     this.mPrice = GameUITools.FindUILabel("Price", base.gameObject);
     this.mPriceName = GameUITools.FindUILabel("Name", this.mPrice.gameObject);
     this.mPriceIcon = GameUITools.FindUISprite("Icon", this.mPrice.gameObject);
     this.mSelectToggle = GameUITools.FindGameObject("SelectToggle", base.gameObject).AddComponent<CommonBagItemToggle>();
     CommonBagItemToggle expr_25A = this.mSelectToggle;
     expr_25A.ValueChangeEvent = (CommonBagItemToggle.ValueChangeCallBack)Delegate.Combine(expr_25A.ValueChangeEvent, new CommonBagItemToggle.ValueChangeCallBack(this.OnSelectToggleChange));
     CommonBagItemToggle expr_282 = this.mSelectToggle;
     expr_282.PreValueChangeEvent = (CommonBagItemToggle.PreValueChangeCallBack)Delegate.Combine(expr_282.PreValueChangeEvent, new CommonBagItemToggle.PreValueChangeCallBack(this.OnPreSelectToggleChange));
     this.mEnhanceBtn = GameUITools.RegisterClickEvent("Enhance", new UIEventListener.VoidDelegate(this.OnEnhanceClick), this.mList);
     this.mEnhanceLb = GameUITools.FindUILabel("Label", this.mEnhanceBtn);
     this.mEnhanceMax = GameUITools.FindUILabel("Max", this.mEnhanceBtn);
     this.mRefineBtn = GameUITools.RegisterClickEvent("Refine", new UIEventListener.VoidDelegate(this.OnRefineClick), this.mList);
     this.mRefineLb = GameUITools.FindUILabel("Label", this.mRefineBtn);
     this.mRefineMax = GameUITools.FindUILabel("Max", this.mRefineBtn);
     this.mRefineLock = GameUITools.FindUISprite("Lock", this.mRefineBtn);
     this.mListGoBtn = GameUITools.RegisterClickEvent("ListGo", new UIEventListener.VoidDelegate(this.OnListGoBtnClick), this.mList);
     this.mListBtn = GameUITools.RegisterClickEvent("ListBtn", new UIEventListener.VoidDelegate(this.OnListBtnClick), base.gameObject);
     this.mClickableBtnSprite = GameUITools.RegisterClickEvent("ClickableBtn", new UIEventListener.VoidDelegate(this.OnClickableBtnClick), base.gameObject).GetComponent<UISprite>();
     this.mClickableBtn = this.mClickableBtnSprite.GetComponent<UIButton>();
     this.mClickableBtns = this.mClickableBtnSprite.GetComponents<UIButton>();
     this.mClickableBtnTxt = GameUITools.FindUILabel("Txt", this.mClickableBtnSprite.gameObject);
     this.mClickableBtnEffect = GameUITools.FindGameObject("Effect", this.mClickableBtnSprite.gameObject);
     this.mClickableBtnEffect.gameObject.SetActive(false);
     if (this.IsShowPanel())
     {
         this.mListBtn.SetActive(true);
     }
     else
     {
         this.mListBtn.SetActive(false);
         UIWidget component = this.mInfo.GetComponent<UIWidget>();
         component.bottomAnchor.target = null;
         component.topAnchor.target = null;
         component.leftAnchor.target = null;
         component.rightAnchor.target = null;
     }
     if (this.ShowSelect())
     {
         this.mSelectToggle.gameObject.SetActive(true);
     }
     else
     {
         this.mSelectToggle.gameObject.SetActive(false);
     }
     this.InitObjects();
     GameUITools.UpdateUIBoxCollider(base.transform, 8f, true);
 }