/** 更新节点容器 */ public void UpdateContent() { GameObject content = getContent(currentTapIndex); if (currentTapIndex == TAP_HUNT_CONTENT) { StarSoulHuntContent sshc = content.GetComponent <StarSoulHuntContent> (); sshc.nebulaPanel.gameObject.transform.localScale = new Vector3(1f, 1f, 1f); sshc.integral = integral; sshc.hountSid = hountSid; sshc.UpdateUI(); } else if (currentTapIndex == TAP_EQUIP_CONTENT) { StarSoulEquipContent ssec = content.GetComponent <StarSoulEquipContent> (); ssec.updateUI(); } else if (currentTapIndex == TAP_STORE_CONTENT) { StarSoulStoreContent sssc = content.GetComponent <StarSoulStoreContent> (); sssc.UpdateUI(); } else if (currentTapIndex == TAP_MAKE_CONTENT) { StarSoulMakeContent ssmc = content.GetComponent <StarSoulMakeContent> (); } }
/** 初始化容器 */ private IEnumerator initContent(int tapIndex) { // GameObject lastPoint = contents [this.currentTapIndex]; // if(lastPoint.transform.childCount>0) // Utils.RemoveAllChild (lastPoint.transform); resetContentsActive(); GameObject content = getContent(tapIndex); switch (tapIndex) { case TAP_HUNT_CONTENT: StarSoulHuntContent ssh = content.GetComponent <StarSoulHuntContent> (); ssh.init(this, PlayerPrefs.GetInt(UserManager.Instance.self.uid + PlayerPrefsComm.STARSOUL_HUNT_TAP)); ssh.updateNebulaEffectUI(); //更新星魂特效视图 break; case TAP_EQUIP_CONTENT: StarSoulEquipContent ec = content.GetComponent <StarSoulEquipContent> (); ec.init(this, selectIndex, card); break; case TAP_STORE_CONTENT: StarSoulStoreContent ssc = content.GetComponent <StarSoulStoreContent> (); ssc.init(this, ButtonStoreStarSoul.ButtonStateType.Power); break; case TAP_MAKE_CONTENT: StarSoulMakeContent msc = content.GetComponent <StarSoulMakeContent> (); msc.init(); break; } GuideManager.Instance.guideEvent(); MaskWindow.UnlockUI(); yield break; }
/** button点击事件 */ public override void buttonEventBase(GameObject gameObj) { base.buttonEventBase(gameObj); if (gameObj.name == "close") { //刷新限时猎魂 if (LuckyEquipContent.needReload == 1) { LuckyEquipContent.needReload = 2; } StorageManagerment.Instance.clearAllStarSoulNew(); finishWindow(); } else { GameObject content = getContent(currentTapIndex); if (currentTapIndex == TAP_HUNT_CONTENT) { //StarSoulHuntContent sshc = content.GetComponent<StarSoulHuntContent> (); SoulHuntContent sshc = content.GetComponent <SoulHuntContent> (); sshc.hountSid = hountSid; sshc.buttonEventBase(gameObj); } else if (currentTapIndex == TAP_EQUIP_CONTENT) { StarSoulEquipContent ssec = content.GetComponent <StarSoulEquipContent> (); ssec.buttonEventBase(gameObj); } else if (currentTapIndex == TAP_STORE_CONTENT) { StarSoulStoreContent sssc = content.GetComponent <StarSoulStoreContent> (); sssc.buttonEventBase(gameObj); } else if (currentTapIndex == TAP_MAKE_CONTENT) { StarSoulMakeContent ssmc = content.GetComponent <StarSoulMakeContent> (); ssmc.buttonEventBase(gameObj); } } }