public void Clear() { this.m_tabIndex = -1; if (this.m_container != null) { this.m_container.RecycleAllElement(); } this.m_container = null; this.day_progress_bg = (this.day_progress = null); this.day_huoyue_txt = null; this.tasklistScript_main = null; this.tasklistScript_usual = null; this.week_huoyue_text = null; this.week_node1 = null; this.week_node2 = null; this.tablistScript = null; this.m_CUIForm = null; this.m_mainTaskNode = null; this.m_unlockNode = null; this.m_levelRewardNode = null; this.m_levelRewardList = null; this.m_mainTaskNode = null; this.m_unlockNode = null; this.m_levelRewardNode = null; this.m_levelRewardList = null; this.m_normalTaskNode = null; this.m_emptyTaskNode = null; this.m_taskNode0 = null; this.m_taskNode1 = null; this.m_unlockInfoTxt = null; this.m_levelRewardText = null; this.jumpRewardGameObject = null; this.m_orgWeekgoldProgress = -0.1f; Singleton <CTaskSys> .get_instance().model.curLevelRewardData = null; CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CTaskSys.TASK_LevelRewardFORM_PATH); if (form != null) { Singleton <CUIManager> .GetInstance().CloseForm(CTaskSys.TASK_LevelRewardFORM_PATH); } }
private void OnTrainingHelperInit(CUIEvent uiEvent) { if (this.m_form == null) { this.m_form = Singleton <CBattleSystem> .instance.FightFormScript; DebugHelper.Assert(this.m_form != null); this.m_openBtn = this.m_form.transform.FindChild("Panel_Prop/ButtonOpen").gameObject; this.m_panelObj = this.m_form.transform.FindChild("Panel_Prop/Panel_BaseProp").gameObject; this.InitHostileFuncList(); this.InitSelfFuncList(); this.InitGeneralFuncList(); this.InitBtnToggle(); this.m_form.transform.FindChild("Panel_Prop").gameObject.CustomSetActive(true); Transform transform = this.m_form.transform.FindChild("MapPanel"); if (transform != null) { transform.gameObject.CustomSetActive(false); } } }
public void OpenForm(string[] imgPath, int imgNum, CUIEvent uiEventParam = null, string title = null, string btnName = null, bool bAutoMove = true) { this.m_form = Singleton <CUIManager> .GetInstance().OpenForm(BANNER_INTRO_DIALOG_PATH, false, true); if (this.m_form != null) { CUIContainerScript component = this.m_form.GetWidget(2).transform.FindChild("pickObj").GetComponent <CUIContainerScript>(); this.m_totalImgNum = Math.Min(Math.Min(imgPath.Length, imgNum), component.m_prepareElementAmount); this.m_imgPath = imgPath; this.m_uiEventParam = uiEventParam; this.m_title = title; this.m_btnName = btnName; this.m_PickIdxList = new int[this.m_totalImgNum]; this.m_bAutoMove = bAutoMove; this.m_curImgIndex = 0; this.InitForm(); this.InitPickObjElement(this.m_totalImgNum); this.RefreshUI(0); } }
private void entertainmentAddLock(CUIFormScript form) { Transform transform = form.transform.FindChild("Panel_Main/List").GetComponent <CUIListScript>().GetElemenet(3).transform; if (transform != null) { if (!Singleton <CFunctionUnlockSys> .instance.FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ENTERTAINMENT)) { transform.GetComponent <Image>().color = CUIUtility.s_Color_Button_Disable; transform.FindChild("Lock").gameObject.CustomSetActive(true); ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)0x19); transform.FindChild("Lock/Text").GetComponent <Text>().text = Utility.UTF8Convert(dataByKey.szLockedTip); } else { transform.GetComponent <Image>().color = CUIUtility.s_Color_White; transform.FindChild("Lock").gameObject.CustomSetActive(false); } } }
public void SetNewFlagForUnionBattleEntry(bool bShow) { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form != null) { GameObject gameObject = form.transform.Find("BtnCon/UnionBtn").gameObject; if (gameObject != null) { if (bShow) { this.ShowNewFlag(gameObject, enNewFlagKey.New_UnionBattleEntry_V1); } else { this.HideNewFlag(gameObject, enNewFlagKey.New_UnionBattleEntry_V1); } } } }
public void SetNewFlagForMessageBtnEntry(bool bShow) { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form != null) { GameObject gameObject = form.transform.Find("LobbyBottom/SysEntry/ChatBtn_sub/Menu/MessageBtn").gameObject; if (gameObject != null) { if (bShow) { this.ShowNewFlag(gameObject, enNewFlagKey.New_MessageEntry_V1); } else { this.HideNewFlag(gameObject, enNewFlagKey.New_MessageEntry_V1); } } } }
public void SetNewFlagForGodRankBtn(bool bShow) { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(RankingSystem.s_rankingForm); if (form != null) { GameObject gameObject = form.transform.Find("bg/AllRankType/AllRankSelectMenu/ListElement7").gameObject; if (gameObject != null) { if (bShow) { this.ShowNewFlag(gameObject, enNewFlagKey.New_GodRank_V1); } else { this.HideNewFlag(gameObject, enNewFlagKey.New_GodRank_V1); } } } }
private static void ShowRewardPanel(CUIFormScript form, COMDT_RANKDETAIL data) { if (data == null) { return; } Text component = form.GetWidget(5).GetComponent <Text>(); uint num = (uint)((data.bMaxSeasonGrade <= 0) ? 1 : data.bMaxSeasonGrade); component.text = Singleton <CLadderSystem> .GetInstance().GetRewardDesc((byte)num); GameObject widget = form.GetWidget(12); CUseable skinRewardUseable = Singleton <CLadderSystem> .GetInstance().GetSkinRewardUseable(); CUICommonSystem.SetItemCell(form, widget, skinRewardUseable, true, false, false, false); GameObject widget2 = form.GetWidget(14); widget2.CustomSetActive(Singleton <CLadderSystem> .GetInstance().IsGotSkinReward()); CLadderView.ShowSeasonEndRewardPanel(form); }
public static void RefreshGodHeroForm(ListView <ResHeroCfgInfo> heroList) { if (heroList == null) { return; } CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(RankingView.s_ChooseHeroPath); if (form == null) { return; } GameObject widget = form.GetWidget(2); if (widget != null) { CUIListScript component = widget.GetComponent <CUIListScript>(); component.SetElementAmount(heroList.get_Count()); } }
private void OnOpenFormTimeUpHandler(int timerSequence) { Singleton <CTimerManager> .get_instance().PauseTimer(timerSequence); if (!this.IsCareCondition()) { return; } this.m_form = Singleton <CUIManager> .GetInstance().OpenForm(PVEReviveHeros.PATH_REVIVEHERO, false, true); if (this.m_form != null) { this.InitFromView(this.m_form); this.PauseGame(true); } else { this.ReviveHerosFailed(); } }
private void OnOpenBreakDetailForm(CUIEvent uiEvent) { CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_symbolBreakDetailPath, false, true); if (null != script) { int tag = uiEvent.m_eventParams.tag; Transform transform = script.transform.Find("Panel_SymbolBreak/Panel_Content/List"); if (transform != null) { CUIListScript component = transform.GetComponent <CUIListScript>(); if (((tag >= 0) && (tag < this.m_breakSymbolList.Length)) && (this.m_breakSymbolList[tag] != null)) { this.m_breakDetailIndex = tag; this.m_breakSymbolList[tag].Sort(); component.SetElementAmount(this.m_breakSymbolList[tag].Count); } } } }
public void OpenGuideForm() { if (this.m_formWeakGuide == null) { this.m_formWeakGuide = Singleton <CUIManager> .GetInstance().OpenForm("UGUI/Form/System/Dialog/Form_WeakGuide", true, true); if (this.m_formWeakGuide != null) { Transform transform = this.m_formWeakGuide.transform.FindChild("GuideTextStatic"); if (transform != null) { this.m_guideTextStatic = transform.gameObject; if (this.m_guideTextStatic != null) { this.m_guideTextStatic.CustomSetActive(false); } } } } }
public static void OnRankGodDetailEquipClick(CEquipInfo equipInfo, string playerName, string heroName) { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(RankingSystem.s_rankingGodDetailForm); if (form != null) { GameObject widget = form.GetWidget(0); if (widget != null) { GameObject p = Utility.FindChild(widget, "Panel_EquipInfo"); Text componetInChild = Utility.GetComponetInChild <Text>(p, "heroEquipText"); Text text2 = Utility.GetComponetInChild <Text>(p, "equipNameText"); Text text3 = Utility.GetComponetInChild <Text>(p, "Panel_euipProperty/equipPropertyDescText"); text2.text = (equipInfo != null) ? equipInfo.m_equipName : string.Empty; text3.text = (equipInfo != null) ? equipInfo.m_equipPropertyDesc : string.Empty; string[] args = new string[] { playerName, heroName }; componetInChild.text = Singleton <CTextManager> .instance.GetText("RankGodHeroEquipDesc", args); } } }
private static void SetPlayerStat(CUIFormScript formScript, GameObject item, PlayerKDA playerKDA, HeroKDA kda) { Text componetInChild = Utility.GetComponetInChild <Text>(item, "Txt_PlayerName"); componetInChild.text = playerKDA.PlayerName; componetInChild.color = (playerKDA.PlayerCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? new Color(0.545f, 0f, 0f, 1f) : new Color(0.031f, 0.961f, 0f, 1f); ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey((uint)kda.HeroId); DebugHelper.Assert(dataByKey != null); item.transform.Find("Txt_HeroName").gameObject.GetComponent <Text>().text = StringHelper.UTF8BytesToString(ref dataByKey.szName); string str = (kda.numKill >= 10) ? kda.numKill.ToString() : string.Format(" {0} ", kda.numKill.ToString()); string str2 = (kda.numDead >= 10) ? kda.numDead.ToString() : string.Format(" {0} ", kda.numDead.ToString()); item.transform.Find("Txt_KDA").gameObject.GetComponent <Text>().text = string.Format("{0} / {1}", str, str2); item.transform.Find("Txt_Hurt").gameObject.GetComponent <Text>().text = kda.hurtToEnemy.ToString(); item.transform.Find("Txt_HurtTaken").gameObject.GetComponent <Text>().text = kda.hurtTakenByEnemy.ToString(); item.transform.Find("Txt_Heal").gameObject.GetComponent <Text>().text = kda.hurtToHero.ToString(); item.transform.Find("KillerImg").gameObject.GetComponent <Image>().SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic((uint)kda.HeroId, 0)), formScript, true, false, false); item.CustomSetActive(true); }
protected override void Update() { if (base.isInitialize) { base.Update(); return; } CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FightForm.s_battleUIForm); if (form != null) { GameObject widget = form.GetWidget(47); DebugHelper.Assert(widget != null, "can't find equip item!"); if (widget.activeInHierarchy && !form.IsHided()) { base.AddHighLightGameObject(widget, true, form, true); base.Initialize(); } } }
public static void DontShowComEnable(bool enable) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CRoomSystem.PATH_ROOM); if (form == null || form.gameObject == null) { return; } Button componetInChild = Utility.GetComponetInChild <Button>(form.gameObject, "Panel_Main/bg1/LeftRobot"); Button componetInChild2 = Utility.GetComponetInChild <Button>(form.gameObject, "Panel_Main/bg2/RightRobot"); if (componetInChild) { componetInChild.gameObject.CustomSetActive(false); } if (componetInChild2) { componetInChild2.gameObject.CustomSetActive(false); } }
public void Play(Type type, CUIFormScript formScript, uint newTaskid = 0) { this.bValid = true; this.type = type; this.formScript = formScript; this.taskid = newTaskid; if (type == Type.Hide_ShowNew) { this.bFinish = false; this.el_0.alpha = 1f; } else if (type == Type.Show) { this.el_0.alpha = 0f; } else if (type == Type.Hide) { this.el_0.alpha = 1f; } }
public static void ReceiveDiscount(CSPkg msg) { Singleton <CUIManager> .GetInstance().CloseSendMsgAlert(); if (msg.stPkgData.stAkaliShopFlagRsp.iResult == 0) { Singleton <MySteryShop> .GetInstance().m_bRequestDiscount = 1; Singleton <MySteryShop> .GetInstance().UpdateUI(); CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(MySteryShop.MYSTERY_ROLL_DISCOUNT_FORM_PATH, false, true); DebugHelper.Assert(cUIFormScript != null, "获得随机折扣form失败"); if (cUIFormScript == null) { return; } CUICommonSystem.PlayAnimator(Utility.FindChild(cUIFormScript.gameObject, "Panel_NewDiscount/Content/Discount"), string.Format("Discount_{0}", Singleton <MySteryShop> .GetInstance().m_AkaliShopDetail.iShowDiscount / 10)); } }
private void OnHeadInfoRefresh() { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(HeadIconSys.s_headImgChgForm); if (form != null) { HeadIconSys.enHeadImgTab curTab = this.GetCurTab(); ListView <ResHeadImage> curHeadImgList = this.GetCurHeadImgList(curTab); int count = curHeadImgList.Count; CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "pnlBg/Panel_Main/List"); for (int i = 0; i < count; i++) { CUIListElementScript elemenet = componetInChild.GetElemenet(i); if (elemenet != null && elemenet.gameObject != null) { this.OnUpdateElement(elemenet.gameObject, i, curTab); } } } }
private void RefreshRcmdSymbolListPanel() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath); if (null != form) { this.GetHeroRcmdSymbolList(); GameObject widget = form.GetWidget(10); if ((widget != null) && (this.m_rcmdSymbolList[this.m_symbolRcmdLevel - 1] != null)) { widget.GetComponent <CUIListScript>().SetElementAmount(this.m_rcmdSymbolList[this.m_symbolRcmdLevel - 1].Count); Transform transform = widget.transform.Find("Text"); if (transform != null) { ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(this.m_curHeroId); transform.GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("SymbolRcmd_HeroLvlText"), dataByKey.szName, this.m_symbolRcmdLevel); } } } }
protected override void Update() { if (base.isInitialize) { base.Update(); } else { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CBattleEquipSystem.s_equipFormPath); if (form != null) { CUIListScript component = form.GetWidget(0).GetComponent <CUIListScript>(); component.MoveElementInScrollArea(5, true); GameObject gameObject = component.GetElemenet(5).gameObject; base.AddHighLightGameObject(gameObject, true, form, true, new GameObject[0]); base.Initialize(); } } }
private static GameObject GetMemberItem(uint ObjId) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CUILoadingSystem.PVP_PATH_LOADING); if (form == null) { return(null); } List <Player> .Enumerator enumerator = Singleton <GamePlayerCenter> .GetInstance().GetAllPlayers().GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.get_Current().PlayerId == ObjId) { int num = enumerator.get_Current().CampPos + 1; return((enumerator.get_Current().PlayerCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? form.gameObject.transform.FindChild("UpPanel").FindChild(string.Format("Up_Player{0}", num)).gameObject : form.gameObject.transform.FindChild("DownPanel").FindChild(string.Format("Down_Player{0}", num)).gameObject); } } return(null); }
protected override void Update() { if (base.isInitialize) { base.Update(); } else { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CArenaSystem.s_arenaFormPath); if (form != null) { int num = base.currentConf.Param[0]; string name = string.Format("Root/panelCenter/List/ScrollRect/Content/ListElement_{0}/btnFight", num); GameObject gameObject = form.transform.FindChild(name).gameObject; base.AddHighLightGameObject(gameObject, true, form, true); base.Initialize(); } } }
public void UpdateUI() { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath); if (form == null) { return; } GameObject widget = form.GetWidget(0); CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "SubMenuList/List"); CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/MenuList"); CUIListScript componetInChild3 = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/List"); Text componetInChild4 = Utility.GetComponetInChild <Text>(widget, "SubMenuList/Button_Down/Text"); int selectedIndex = componetInChild.GetSelectedIndex(); int selectedIndex2 = componetInChild2.GetSelectedIndex(); componetInChild.gameObject.CustomSetActive(false); componetInChild4.text = CPlayerCommonHeroInfoController.sSubTitles[selectedIndex]; componetInChild3.SetElementAmount(this.m_commonHeroList.get_Count()); }
private void OnAnimEnd(CUIEvent uiEvent) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(PATH_STAR); if (form != null) { if (uiEvent.m_eventParams.tagStr == "Win_Show") { PVESettleView.OnStarWinAnimEnd(form, ref this.m_WinConditions); } else if (!uiEvent.m_eventParams.tagStr.Contains("Done")) { Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(enUIEventID.Settle_EscapeAnim); } } if ((Singleton <CUIManager> .GetInstance().GetForm(PATH_ITEM) != null) && (uiEvent.m_eventParams.tagStr == "Box_Show_2")) { Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(enUIEventID.Settle_EscapeAnim); } }
public static void SetPveHeroItemData(CUIFormScript formScript, GameObject listItem, IHeroData data) { if ((listItem != null) && (data != null)) { bool bPlayerOwn = data.bPlayerOwn; Transform transform = listItem.transform; Transform transform2 = transform.Find("heroProficiencyImg"); Transform transform3 = transform.Find("heroProficiencyBgImg"); CUICommonSystem.SetHeroProficiencyIconImage(formScript, transform2.gameObject, data.proficiencyLV); CUICommonSystem.SetHeroProficiencyBgImage(formScript, transform3.gameObject, data.proficiencyLV, false); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { transform3.GetComponent <Image>().color = !masterRoleInfo.IsHaveHero(data.cfgID, true) ? CUIUtility.s_Color_GrayShader : Color.white; transform2.GetComponent <Image>().color = !masterRoleInfo.IsHaveHero(data.cfgID, true) ? CUIUtility.s_Color_GrayShader : Color.white; } bool bActive = false; bool flag3 = false; if (masterRoleInfo != null) { bActive = masterRoleInfo.IsFreeHero(data.cfgID); flag3 = masterRoleInfo.IsValidExperienceHero(data.cfgID); CUICommonSystem.SetHeroItemImage(formScript, listItem, masterRoleInfo.GetHeroSkinPic(data.cfgID), enHeroHeadType.enBust, (!bPlayerOwn && !bActive) && !flag3); } GameObject gameObject = transform.Find("profession").gameObject; CUICommonSystem.SetHeroJob(formScript, gameObject, (enHeroJobType)data.heroType); transform.Find("heroNameText").GetComponent <Text>().text = data.heroName; Transform transform4 = transform.Find("TxtFree"); if (transform4 != null) { transform4.gameObject.CustomSetActive(bActive); } transform.Find("imgExperienceMark").gameObject.CustomSetActive(data.IsValidExperienceHero()); CUIEventScript component = listItem.GetComponent <CUIEventScript>(); stUIEventParams eventParams = new stUIEventParams(); eventParams.openHeroFormPar.heroId = data.cfgID; eventParams.openHeroFormPar.openSrc = enHeroFormOpenSrc.HeroListClick; component.SetUIEvent(enUIEventType.Click, enUIEventID.HeroInfo_OpenForm, eventParams); } }
public void Draw(CUIFormScript form) { if (form == null) { return; } GameObject gameObject = form.transform.Find("pnlBodyBg/pnlBuyHero").gameObject; if (gameObject != null) { gameObject.CustomSetActive(true); this.m_heroJobType = enHeroJobType.All; string text = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_All"); string text2 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Tank"); string text3 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Soldier"); string text4 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Assassin"); string text5 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Master"); string text6 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Archer"); string text7 = Singleton <CTextManager> .GetInstance().GetText("Hero_Job_Aid"); string[] titleList = new string[] { text, text2, text3, text4, text5, text6, text7 }; Transform transform = gameObject.transform.Find("MenuList"); this.RefreshHeroOwnFlag(); CUICommonSystem.InitMenuPanel(transform.gameObject, titleList, (int)this.m_heroJobType, true); } }
private void OnMenuSelect(CUIEvent uiEvent) { CUIFormScript srcFormScript = uiEvent.m_srcFormScript; if ((srcFormScript != null) && (srcFormScript.transform.Find(s_symbolEquipPanel) != null)) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); if (null != component) { int selectedIndex = component.GetSelectedIndex(); this.m_selectMenuType = (enSymbolMenuType)selectedIndex; Transform transform = srcFormScript.transform; if (this.m_selectMenuType == enSymbolMenuType.SymbolEquip) { transform.Find(s_symbolEquipPanel).gameObject.CustomSetActive(true); transform.Find(s_symbolMakePanel).gameObject.CustomSetActive(false); srcFormScript.GetWidget(9).CustomSetActive(false); this.m_symbolWearCtrl.SwitchToSymbolWearPanel(uiEvent); } else if (this.m_selectMenuType == enSymbolMenuType.SymbolMake) { transform.Find(s_symbolEquipPanel).gameObject.CustomSetActive(false); transform.Find(s_symbolMakePanel).gameObject.CustomSetActive(true); srcFormScript.GetWidget(9).CustomSetActive(false); this.m_symbolMakeCtrl.SwitchToSymbolMakePanel(uiEvent); } else if (this.m_selectMenuType == enSymbolMenuType.SymbolRecommend) { transform.Find(s_symbolEquipPanel).gameObject.CustomSetActive(false); transform.Find(s_symbolMakePanel).gameObject.CustomSetActive(false); srcFormScript.GetWidget(9).CustomSetActive(true); this.m_symbolRcmdCtrl.SwitchToSymbolRcmdPanel(uiEvent); Singleton <CMiShuSystem> .GetInstance().HideNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1); Singleton <CBattleGuideManager> .GetInstance().OpenBannerDlgByBannerGuideId(7, null); } uiEvent.m_srcFormScript.GetWidget(1).CustomSetActive(this.m_selectMenuType == enSymbolMenuType.SymbolEquip); uiEvent.m_srcFormScript.GetWidget(8).CustomSetActive(this.m_selectMenuType != enSymbolMenuType.SymbolEquip); } } }
private void OnDefaultItem(CUIEvent uiEvent) { CUIFormScript srcFormScript = uiEvent.m_srcFormScript; GameObject srcWidget = uiEvent.m_srcWidget; if (srcFormScript == null || srcWidget == null) { return; } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "master roleInfo is null"); if (masterRoleInfo == null) { return; } GameObject gameObject = Utility.FindChild(srcWidget, "defualtItem"); if (gameObject != null) { gameObject.CustomSetActive(true); } GameObject gameObject2 = Utility.FindChild(srcWidget, "heroItem"); if (gameObject2 != null) { gameObject2.CustomSetActive(false); } GameObject gameObject3 = Utility.FindChild(srcWidget, "imgExperienceMark"); if (gameObject3) { gameObject3.CustomSetActive(false); } GameObject gameObject4 = Utility.FindChild(srcWidget, "ButtonGroup/BuyBtn/Text"); if (gameObject4) { gameObject4.GetComponent <Text>().set_text("敬请期待"); } }
private void OnShowGiveFriendSkin(uint heroId, uint skinId, uint price) { ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin(heroId, skinId); if (heroSkin != null) { CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(string.Format("{0}{1}", "UGUI/Form/System/", "Mall/Form_GiveHeroSkin_3D.prefab"), false, true); script.transform.Find("Panel/skinNameText").GetComponent <Text>().text = heroSkin.szSkinName; GameObject gameObject = script.transform.Find("Panel/Panel_Prop/List_Prop").gameObject; CSkinInfo.GetHeroSkinProp(heroId, skinId, ref CHeroInfoSystem2.s_propArr, ref CHeroInfoSystem2.s_propPctArr); CUICommonSystem.SetListProp(gameObject, ref CHeroInfoSystem2.s_propArr, ref CHeroInfoSystem2.s_propPctArr); script.transform.Find("Panel/pricePanel/priceText").GetComponent <Text>().text = price.ToString(); CUIEventScript component = script.transform.Find("Panel/BtnGroup/buyButton").gameObject.GetComponent <CUIEventScript>(); stUIEventParams eventParams = new stUIEventParams(); eventParams.heroSkinParam.heroId = heroId; eventParams.heroSkinParam.skinId = skinId; eventParams.heroSkinParam.isCanCharge = true; eventParams.commonUInt64Param1 = this._curFriendUid; eventParams.commonBool = this._curFriendIsSns; eventParams.commonUInt32Param1 = this._curWorldId; component.SetUIEvent(enUIEventType.Click, enUIEventID.HeroSkin_OpenBuyHeroSkinForFriend, eventParams); CUI3DImageScript script3 = script.transform.Find("Panel/3DImage").gameObject.GetComponent <CUI3DImageScript>(); ObjNameData data = CUICommonSystem.GetHeroPrefabPath(heroId, (int)skinId, true); GameObject model = script3.AddGameObject(data.ObjectName, false, false); if (model != null) { if (data.ActorInfo != null) { model.transform.localScale = new Vector3(data.ActorInfo.LobbyScale, data.ActorInfo.LobbyScale, data.ActorInfo.LobbyScale); } DynamicShadow.EnableDynamicShow(script3.gameObject, true); CHeroAnimaSystem instance = Singleton <CHeroAnimaSystem> .GetInstance(); instance.Set3DModel(model); instance.InitAnimatList(); instance.InitAnimatSoundList(heroId, skinId); instance.OnModePlayAnima("Come"); } } }