private GameObject ShowBackHomeTip(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CSkillButtonManager cSkillButtonManager = (Singleton <CBattleSystem> .GetInstance().FightForm != null) ? Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager : null; if (cSkillButtonManager != null) { SkillButton button = cSkillButtonManager.GetButton(SkillSlotType.SLOT_SKILL_6); return(this.AddBubbleEffectInternal(button.m_button, conf, inControl, Singleton <CBattleSystem> .GetInstance().FightFormScript)); } return(null); }
private GameObject ShowClickTrainWheelDisc(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CMatchingSystem.PATH_MATCHING_ENTRY); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.Find("panelGroup4/btnGroup/Button2").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowClickStartMatch55(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CMatchingSystem.PATH_MATCHING_MULTI); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.FindChild("Panel_Main/Btn_Matching").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowHeroSelConfirmEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CHeroSelectNormalSystem.s_heroSelectFormPath); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.Find("PanelRight/btnConfirm").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowClickVictoryTipsBtn(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(SettlementSystem.SettlementFormName); if (form == null) { return(null); } Transform transform = form.GetWidget(24).transform; GameObject gameObject = transform.FindChild("Btn").gameObject; PlayerKDA playerKDA = null; if (Singleton <BattleLogic> .GetInstance().battleStat != null && Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat != null) { playerKDA = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat.GetHostKDA(); } string text = string.Empty; if (playerKDA != null) { ListView <HeroKDA> .Enumerator enumerator = playerKDA.GetEnumerator(); uint key = 0u; while (enumerator.MoveNext()) { HeroKDA current = enumerator.get_Current(); if (current != null) { key = (uint)current.HeroId; break; } } ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(key); if (dataByKey != null) { text = dataByKey.szName; } else { text = Singleton <CTextManager> .GetInstance().GetText("WinTrick_Tips_DefaultHeroName"); } } else { text = Singleton <CTextManager> .GetInstance().GetText("WinTrick_Tips_DefaultHeroName"); } transform.FindChild("Panel_Guide").gameObject.CustomSetActive(true); transform.FindChild("Panel_Guide/Text").GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("WinTrick_Tips_text", new string[] { text }); return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowClickSaveReplayKit(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(SettlementSystem.SettlementFormName); if (form == null) { return(null); } GameObject gameObject = form.transform.FindChild("Panel/ButtonGrid/BtnSaveReplay").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowPvPEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(LobbyForm.FORM_PATH); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.Find("BtnCon/PvpBtn").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowFullHeroPanelEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CHeroSelectSystem.s_heroSelectFormPath); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.Find("PanelLeft/ListHostHeroInfo/btnOpenFullHeroPanel").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowClickMatchingConfirmBoxConfirm(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CMatchingSystem.PATH_MATCHING_CONFIRMBOX); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.Find("Panel/Panel/btnGroup/Button_Confirm").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowClickRankBtn(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form == null) { return(null); } GameObject gameObject = form.gameObject.transform.FindChild("BtnCon/LadderBtn").gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowBattleHeroSelEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CHeroSelectNormalSystem.s_heroSelectFormPath); if (form == null) { return(null); } uint num = conf.Param[0]; string name = string.Format("PanelLeft/ListHostHeroInfo/ScrollRect/Content/ListElement_{0}/heroItemCell", num); GameObject gameObject = form.gameObject.transform.Find(name).gameObject; return(this.AddEffectInternal(gameObject, conf, inControl, form)); }
private GameObject ShowClickWinShare(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(SettlementSystem.SettlementFormName); if (form == null) { return(null); } Transform transform = form.gameObject.transform.FindChild("Panel/ButtonGrid/ButtonShare"); if (transform == null) { return(null); } return(this.AddEffectInternal(transform.gameObject, conf, inControl, form)); }
private GameObject ShowClickTrainBtn(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CMatchingSystem.PATH_MATCHING_ENTRY); if (form == null) { return(null); } Transform transform = form.gameObject.transform.Find("panelGroupBottom/ButtonTrain"); if (transform == null) { return(null); } return(this.AddEffectInternal(transform.gameObject, conf, inControl, form)); }
private GameObject ShowPvEEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CLobbySystem.LOBBY_FORM_PATH); if (form == null) { return(null); } Transform transform = form.gameObject.transform.Find("BtnCon/PveBtn"); if (transform == null) { return(null); } return(this.AddEffectInternal(transform.gameObject, conf, inControl, form)); }
private GameObject ShowClickCommomEquip(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CEquipSystem.s_CustomRecommendEquipPath); if (form == null) { return(null); } Transform transform = form.transform.FindChild("Panel_Main/Panel_EquipCustom/Panel_EquipCustomContent/godEquipButton"); if (transform == null) { return(null); } return(this.AddBubbleEffectInternal(transform.gameObject, conf, inControl, form)); }
private GameObject ShowClickSymbolDraw(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(Singleton <CMallSystem> .GetInstance().sMallFormPath); if (form == null) { return(null); } Transform transform = form.transform.FindChild("pnlBodyBg/Panel_SymbolMake/Panel_SymbolDraw/btnJump"); if (transform == null) { return(null); } return(this.AddBubbleEffectInternal(transform.gameObject, conf, inControl, form)); }
private void AddBubbleText(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { GameObject gameObject = this.m_formWeakGuide.transform.FindChild("GuideText").gameObject; gameObject.CustomSetActive(true); NewbieGuideSpecialTipConf specialTipConfig = Singleton <NewbieGuideDataManager> .GetInstance().GetSpecialTipConfig((uint)conf.wSpecialTip); CUICommonSystem.SetTextContent(gameObject.transform.FindChild("RightSpecial/Text"), specialTipConfig.szTipText); RectTransform rectTransform = gameObject.transform as RectTransform; rectTransform.anchoredPosition = new Vector2 { x = (float)specialTipConfig.iOffsetX, y = (float)specialTipConfig.iOffsetY }; CUITimerScript componetInChild = Utility.GetComponetInChild <CUITimerScript>(gameObject, "Timer"); if (conf.Param[0] != 0u) { componetInChild.SetTotalTime(conf.Param[0]); } componetInChild.StartTimer(); }
private GameObject AddBubbleEffectInternal(GameObject effectParent, NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl, CUIFormScript inOriginalForm) { if (effectParent == null) { return(null); } if (effectParent.transform.FindChild("WeakGuideBubble(Clone)") != null) { return(null); } GameObject original = Singleton <CResourceManager> .GetInstance().GetResource(NewbieWeakGuideImpl.WEAK_BUBBLE_PATH, typeof(GameObject), 4, false, false).m_content as GameObject; GameObject gameObject = Object.Instantiate(original) as GameObject; gameObject.transform.SetParent(effectParent.transform); RectTransform rectTransform = gameObject.transform.FindChild("Image") as RectTransform; RectTransform rectTransform2 = gameObject.transform as RectTransform; NewbieGuideSpecialTipConf specialTipConfig = Singleton <NewbieGuideDataManager> .GetInstance().GetSpecialTipConfig((uint)conf.wSpecialTip); if (specialTipConfig != null) { CUICommonSystem.SetTextContent(rectTransform2.FindChild("Text"), specialTipConfig.szTipText); } Vector2 anchorMin = default(Vector2); Vector2 anchorMax = default(Vector2); Vector2 pivot = default(Vector2); Vector3 one = Vector3.one; Vector2 anchoredPosition = default(Vector2); switch (specialTipConfig.bSpecialTipPos) { case 0: anchorMin.x = 0f; anchorMin.y = 1f; anchorMax.x = 0f; anchorMax.y = 1f; one.y = -1f; pivot.x = 0f; pivot.y = 0f; anchoredPosition.x = 10f; anchoredPosition.y = 15f; break; case 1: anchorMin.x = 0f; anchorMin.y = 0f; anchorMax.x = 0f; anchorMax.y = 0f; pivot.x = 0f; pivot.y = 0f; anchoredPosition.x = 10f; anchoredPosition.y = -15f; break; case 2: anchorMin.x = 1f; anchorMin.y = 1f; anchorMax.x = 1f; anchorMax.y = 1f; one.y = -1f; pivot.x = 1f; pivot.y = 0f; anchoredPosition.x = -10f; anchoredPosition.y = 15f; break; case 3: anchorMin.x = 1f; anchorMin.y = 0f; anchorMax.x = 1f; anchorMax.y = 0f; pivot.x = 1f; pivot.y = 0f; anchoredPosition.x = -10f; anchoredPosition.y = -15f; break; } rectTransform2.position = effectParent.transform.position; rectTransform2.anchoredPosition = Vector2.zero; Vector2 anchoredPosition2 = rectTransform2.anchoredPosition; anchoredPosition2.x += (float)specialTipConfig.iOffsetX; anchoredPosition2.y += (float)specialTipConfig.iOffsetY; rectTransform2.anchoredPosition = anchoredPosition2; rectTransform2.localScale = Vector3.one; rectTransform.localScale = one; rectTransform.anchorMin = anchorMin; rectTransform.anchorMax = anchorMax; rectTransform.pivot = pivot; rectTransform.anchoredPosition = anchoredPosition; CUITimerScript componetInChild = Utility.GetComponetInChild <CUITimerScript>(gameObject, "Timer"); if (componetInChild != null) { if (conf.Param[0] != 0u) { componetInChild.SetTotalTime(conf.Param[0]); } componetInChild.StartTimer(); } return(gameObject); }
private GameObject AddEffectInternal(GameObject effectParent, NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl, CUIFormScript inOriginalForm) { GameObject original = Singleton <CResourceManager> .GetInstance().GetResource(NewbieWeakGuideImpl.WEAK_EFFECT_PATH, typeof(GameObject), 4, false, false).m_content as GameObject; GameObject gameObject = Object.Instantiate(original) as GameObject; gameObject.transform.SetParent(effectParent.transform); Transform transform = effectParent.transform.FindChild("Panel"); if (transform != null && transform.gameObject.activeInHierarchy) { gameObject.transform.SetParent(transform); } gameObject.transform.localScale = Vector3.one; gameObject.transform.position = effectParent.transform.position; (gameObject.transform as RectTransform).anchoredPosition = new Vector2((float)conf.iOffsetHighLightX, (float)conf.iOffsetHighLightY); if (conf.bNotShowArrow != 0) { gameObject.transform.FindChild("Panel/ImageFinger").gameObject.CustomSetActive(false); } this.AddEffectText(conf, effectParent, inOriginalForm); return(gameObject); }
private GameObject AddEffectInternal(GameObject effectParent, NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl, CUIFormScript inOriginalForm) { GameObject content = Singleton <CResourceManager> .GetInstance().GetResource(WEAK_EFFECT_PATH, typeof(GameObject), enResourceType.UIPrefab, false, false).m_content as GameObject; GameObject obj3 = UnityEngine.Object.Instantiate(content) as GameObject; obj3.transform.SetParent(effectParent.transform); Transform parent = effectParent.transform.FindChild("Panel"); if ((parent != null) && parent.gameObject.activeInHierarchy) { obj3.transform.SetParent(parent); } obj3.transform.localScale = Vector3.one; obj3.transform.position = effectParent.transform.position; (obj3.transform as RectTransform).anchoredPosition = new Vector2((float)conf.iOffsetHighLightX, (float)conf.iOffsetHighLightY); if (conf.bNotShowArrow != 0) { obj3.transform.FindChild("Panel/ImageFinger").gameObject.CustomSetActive(false); } this.AddEffectText(conf, effectParent, inOriginalForm); return(obj3); }
private void ShowBubbleTipText(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl) { this.AddBubbleText(conf, inControl); }
public bool AddEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl, out GameObject highligter) { GameObject obj2; highligter = null; switch (conf.dwType) { case 1: highligter = obj2 = this.ShowPvPEffect(conf, inControl); return(obj2 != null); case 2: highligter = obj2 = this.ShowPvEEffect(conf, inControl); return(obj2 != null); case 3: highligter = obj2 = this.ShowFullHeroPanelEffect(conf, inControl); return(obj2 != null); case 4: highligter = obj2 = this.ShowHeroSelConfirmEffect(conf, inControl); return(obj2 != null); case 5: highligter = obj2 = this.ShowHumanMatch33Effect(conf, inControl); return(obj2 != null); case 6: highligter = obj2 = this.ShowBattleHeroSelEffect(conf, inControl); return(obj2 != null); case 7: highligter = obj2 = this.ShowClickPVPBtnEffect(conf, inControl); return(obj2 != null); case 8: highligter = obj2 = this.ShowClickMatch55(conf, inControl); return(obj2 != null); case 9: highligter = obj2 = this.ShowClickStartMatch55(conf, inControl); return(obj2 != null); case 10: highligter = obj2 = this.ShowClickWinShare(conf, inControl); return(obj2 != null); case 11: { if ((conf.Param[0] != 0) && (conf.Param[1] != 0)) { int index = UnityEngine.Random.Range(0, 2); uint nextStep = conf.Param[index]; inControl.Complete(conf.dwID, nextStep); return(true); } object[] objArray1 = new object[] { conf.dwType }; DebugHelper.Assert(false, "newbieguide Invalide config -- {0}", objArray1); return(false); } case 12: highligter = obj2 = this.ShowClickRankBtn(conf, inControl); return(obj2 != null); case 13: highligter = obj2 = this.ShowClickTrainBtn(conf, inControl); return(obj2 != null); case 14: highligter = obj2 = this.ShowClickTrainWheelDisc(conf, inControl); return(obj2 != null); case 15: highligter = obj2 = this.ShowClickMatch55Melee(conf, inControl); return(obj2 != null); case 0x10: highligter = obj2 = this.ShowClickMatchingConfirmBoxConfirm(conf, inControl); return(obj2 != null); case 0x11: highligter = obj2 = this.ShowClickVictoryTipsBtn(conf, inControl); return(obj2 != null); case 0x12: highligter = obj2 = this.ShowClickSaveReplayKit(conf, inControl); return(obj2 != null); } object[] inParameters = new object[] { conf.dwType }; DebugHelper.Assert(false, "Invalide NewbieGuideWeakGuideType -- {0}", inParameters); return(false); }
public bool AddEffect(NewbieGuideWeakConf conf, NewbieWeakGuideControl inControl, out GameObject highligter) { highligter = null; switch (conf.dwType) { case 1u: { GameObject x; highligter = (x = this.ShowPvPEffect(conf, inControl)); return(!(x == null)); } case 2u: { GameObject x; highligter = (x = this.ShowPvEEffect(conf, inControl)); return(!(x == null)); } case 3u: { GameObject x; highligter = (x = this.ShowFullHeroPanelEffect(conf, inControl)); return(!(x == null)); } case 4u: { GameObject x; highligter = (x = this.ShowHeroSelConfirmEffect(conf, inControl)); return(!(x == null)); } case 5u: { GameObject x; highligter = (x = this.ShowHumanMatch33Effect(conf, inControl)); return(!(x == null)); } case 6u: { GameObject x; highligter = (x = this.ShowBattleHeroSelEffect(conf, inControl)); return(!(x == null)); } case 7u: { GameObject x; highligter = (x = this.ShowClickPVPBtnEffect(conf, inControl)); return(!(x == null)); } case 8u: { GameObject x; highligter = (x = this.ShowClickMatch55(conf, inControl)); return(!(x == null)); } case 9u: { GameObject x; highligter = (x = this.ShowClickStartMatch55(conf, inControl)); return(!(x == null)); } case 10u: { GameObject x; highligter = (x = this.ShowClickWinShare(conf, inControl)); return(!(x == null)); } case 11u: { if (conf.Param[0] == 0u || conf.Param[1] == 0u) { DebugHelper.Assert(false, "newbieguide Invalide config -- {0}", new object[] { conf.dwType }); return(false); } int num = Random.Range(0, 2); uint nextStep = conf.Param[num]; inControl.Complete(conf.dwID, nextStep); return(true); } case 12u: { GameObject x; highligter = (x = this.ShowClickRankBtn(conf, inControl)); return(!(x == null)); } case 13u: { GameObject x; highligter = (x = this.ShowClickTrainBtn(conf, inControl)); return(!(x == null)); } case 14u: { GameObject x; highligter = (x = this.ShowClickTrainWheelDisc(conf, inControl)); return(!(x == null)); } case 15u: { GameObject x; highligter = (x = this.ShowClickMatch55Melee(conf, inControl)); return(!(x == null)); } case 16u: { GameObject x; highligter = (x = this.ShowClickMatchingConfirmBoxConfirm(conf, inControl)); return(!(x == null)); } case 17u: { GameObject x; highligter = (x = this.ShowClickVictoryTipsBtn(conf, inControl)); return(!(x == null)); } case 18u: { GameObject x; highligter = (x = this.ShowClickSaveReplayKit(conf, inControl)); return(!(x == null)); } case 21u: { GameObject x; highligter = (x = this.ShowClickSymbolDraw(conf, inControl)); return(!(x == null)); } case 22u: { GameObject x; highligter = (x = this.ShowClickCommomEquip(conf, inControl)); return(!(x == null)); } case 23u: this.ShowBubbleTipText(conf, inControl); return(true); case 24u: { GameObject x; highligter = (x = this.ShowBackHomeTip(conf, inControl)); return(!(x == null)); } } DebugHelper.Assert(false, "Invalide NewbieGuideWeakGuideType -- {0}", new object[] { conf.dwType }); return(false); }