public void Clear() { if (this.m_useSignalButton) { Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_ClickMiniMap, new CUIEventManager.OnUIEventHandler(this.OnClickMiniMap)); Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_Click_Scene, new CUIEventManager.OnUIEventHandler(this.OnClickBattleScene)); Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_OnSignalButtonClicked, new CUIEventManager.OnUIEventHandler(this.OnSignalButtonClicked)); Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_OnSignalTipsListElementEnable, new CUIEventManager.OnUIEventHandler(this.OnSignalListElementEnabled)); this.m_signals = null; this.m_playerSignalCooldowns = null; this.m_signalTipses = null; } Singleton <GameEventSys> .instance.RmvEventHandler <SpawnSoldierParam>(GameEventDef.Event_SpawnSoldier, new RefAction <SpawnSoldierParam>(this.OnSpawnSoldier)); this.m_signalButtons = null; this.m_formScript = null; this.m_miniMap = null; this.m_signalSrcHeroNameContainer = null; this.m_signalTipsList = null; Singleton <CUIManager> .GetInstance().CloseForm(SignalPanel.s_signalTipsFormPath); }
private NewbieBannerIntroDialog(string[] imgPath, int imgNum, CUIEvent uieventPars = null, string title = null, string btnName = null, bool bAutoMove = 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_evtPars = uieventPars; this.m_title = title; this.m_btnName = btnName; this.m_PickIdxList = new int[this.m_totalImgNum]; this.m_bAutoMove = bAutoMove; Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickPrePage, new CUIEventManager.OnUIEventHandler(this.OnMoveToPrePage)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_ClickNextPage, new CUIEventManager.OnUIEventHandler(this.OnMoveToNextPage)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragStart, new CUIEventManager.OnUIEventHandler(this.OnDragStart)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_DragEnd, new CUIEventManager.OnUIEventHandler(this.OnDragEnd)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Newbie_BannerIntroDlg_Close, new CUIEventManager.OnUIEventHandler(this.OnDialogClose)); this.InitForm(); this.InitPickObjElement(this.m_totalImgNum); this.RefreshUI(0); this.m_TimerSeq = Singleton <CTimerManager> .GetInstance().AddTimer(0x1f40, -1, new CTimer.OnTimeUpHandler(this.AutoMoveBannerImg)); s_theDialog = this; } }
private void RefreshUI(int idx) { if (this.m_form == null) { return; } GameObject pickObject = this.m_PickObject; if (pickObject != null) { CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>(); if (component) { for (int i = 0; i < this.m_PickIdxList.Length; i++) { if (i == idx) { GameObject element = component.GetElement(this.m_PickIdxList[i]); if (element) { Transform transform = element.transform.FindChild("Image_Pointer"); if (transform != null) { transform.gameObject.CustomSetActive(true); } } } else { GameObject element2 = component.GetElement(this.m_PickIdxList[i]); if (element2) { Transform transform2 = element2.transform.FindChild("Image_Pointer"); if (transform2 != null) { transform2.gameObject.CustomSetActive(false); } } } } } } bool bActive = idx == this.m_totalImgNum - 1 || this.m_totalImgNum == 0; this.m_BottomBtn.CustomSetActive(bActive); if (this.m_bShowChooseGuideNextTime) { this.m_form.GetWidget(7).CustomSetActive(bActive); } else { this.m_form.GetWidget(7).CustomSetActive(false); } this.m_PickObject.CustomSetActive(idx != this.m_totalImgNum - 1); this.m_BtnLeft.CustomSetActive(idx != 0 && this.m_totalImgNum > 1); this.m_BtnRight.CustomSetActive(idx != this.m_totalImgNum - 1 && this.m_totalImgNum > 1); }
public void Clear() { Singleton <GameEventSys> .instance.RmvEventHandler <SCommonSpawnEventParam>(GameEventDef.Event_SpawnGroupStartCount, new RefAction <SCommonSpawnEventParam>(this.OnSpawnGroupStartCount)); Singleton <GameEventSys> .instance.RmvEventHandler <STailsmanEventParam>(GameEventDef.Event_TailsmanSpawn, new RefAction <STailsmanEventParam>(this.OnTailsmanSpawn)); Singleton <GameEventSys> .instance.RmvEventHandler <STailsmanEventParam>(GameEventDef.Event_TailsmanUsed, new RefAction <STailsmanEventParam>(this.OnTailsmanUsed)); this.m_mapPointerContainer = null; this.m_spawnGroupCounterContainer = null; }
public void Init(CUIFormScript formScript, GameObject minimapGameObject, GameObject signalSrcHeroNameContainer, bool useSignalButton) { if (formScript == null) { return; } this.m_formScript = formScript; this.m_miniMap = minimapGameObject; if (this.m_miniMap != null) { this.m_miniMapScreenPosition = CUIUtility.WorldToScreenPoint(formScript.GetCamera(), this.m_miniMap.transform.position); } this.m_signalSrcHeroNameContainer = ((signalSrcHeroNameContainer == null) ? null : signalSrcHeroNameContainer.GetComponent <CUIContainerScript>()); this.m_signalTipsList = SignalPanel.GetSignalTipsListScript(); if (this.m_signalTipsList != null) { this.m_signalTipsListCanvasGroup = this.m_signalTipsList.gameObject.GetComponent <CanvasGroup>(); if (this.m_signalTipsListCanvasGroup == null) { this.m_signalTipsListCanvasGroup = this.m_signalTipsList.gameObject.AddComponent <CanvasGroup>(); } this.m_signalTipsListCanvasGroup.alpha = 0f; this.m_signalTipsListCanvasGroup.blocksRaycasts = false; } this.m_useSignalButton = useSignalButton; this.m_signalButtons = new CSignalButton[SignalPanel.s_signalButtonInfos.Length]; for (int i = 0; i < this.m_signalButtons.Length; i++) { this.m_signalButtons[i] = new CSignalButton(this.m_formScript.GetWidget(SignalPanel.s_signalButtonInfos[i][1]), SignalPanel.s_signalButtonInfos[i][0]); this.m_signalButtons[i].Initialize(this.m_formScript); if (!useSignalButton) { this.m_signalButtons[i].Disable(); } } if (this.m_useSignalButton) { Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_ClickMiniMap, new CUIEventManager.OnUIEventHandler(this.OnClickMiniMap)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_Click_Scene, new CUIEventManager.OnUIEventHandler(this.OnClickBattleScene)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_OnSignalButtonClicked, new CUIEventManager.OnUIEventHandler(this.OnSignalButtonClicked)); Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Battle_OnSignalTipsListElementEnable, new CUIEventManager.OnUIEventHandler(this.OnSignalListElementEnabled)); this.m_battleSceneGroundPlane = new Plane(new Vector3(0f, 1f, 0f), 0.15f); this.m_signals = new ListView <CSignal>(); this.m_playerSignalCooldowns = new Dictionary <uint, SignalPanel.CPlayerSignalCooldown>(); this.m_signalTipses = new ListView <CSignalTipsElement>(); } Singleton <GameEventSys> .instance.AddEventHandler <SpawnSoldierParam>(GameEventDef.Event_SpawnSoldier, new RefAction <SpawnSoldierParam>(this.OnSpawnSoldier)); }
public CSignal(uint playerID, int signalID, int worldPositionX, int worldPositionY, int worldPositionZ, CUIContainerScript signalInUIContainer, bool bSmall, bool bUseCfgSound) { this.m_signalInUISequence = -1; this.bSmall = true; this.m_playerID = playerID; this.m_signalID = signalID; this.bSmall = bSmall; this.bUseCfgSound = bUseCfgSound; this.m_worldPosition = new Vector3((float)worldPositionX, (float)worldPositionY, (float)worldPositionZ); this.m_signalInUIContainer = signalInUIContainer; this.m_signalInUISequence = -1; this.m_effectInScene = null; this.m_signalInUIEffect = null; }
public CSignal(uint playerID, int signalID, uint heroID, int worldPositionX, int worldPositionY, int worldPositionZ, CUIContainerScript signalInUIContainer, CUIContainerScript heroNameContainer, bool bSmall, bool bFollow, bool bUseCfgSound, MinimapSys.ElementType type) { this.m_playerID = playerID; this.m_signalID = signalID; this.m_heroID = heroID; this.bSmall = bSmall; this.BFollow = bFollow; this.bUseCfgSound = bUseCfgSound; this.m_worldPosition = new Vector3((float)worldPositionX, (float)worldPositionY, (float)worldPositionZ); this.m_signalInUIContainer = signalInUIContainer; this.m_signalInUISequence = -1; this.m_effectInScene = null; this.m_signalInUIEffect = null; this.m_type = type; }
public CSignal(PoolObjHandle <ActorRoot> followActor, int signalID, CUIContainerScript signalInUIContainer, bool bSmall, bool bUseCfgSound) { this.m_signalInUISequence = -1; this.bSmall = true; this.m_playerID = 0; this.m_signalID = signalID; this.m_signalRelatedActor = followActor; this.bSmall = bSmall; this.bUseCfgSound = bUseCfgSound; this.m_worldPosition = Vector3.zero; this.m_signalInUIContainer = signalInUIContainer; this.m_signalInUISequence = -1; this.m_effectInScene = null; this.m_signalInUIEffect = null; }
private void InitPickObjElement(int nImageCount) { GameObject pickObject = this.m_PickObject; if (pickObject != null) { CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>(); if (component != null) { component.RecycleAllElement(); for (int i = 0; i < nImageCount; i++) { this.m_PickIdxList[i] = component.GetElement(); } } } }
public void Dispose() { if (this.m_effectInScene != null) { Singleton <CGameObjectPool> .GetInstance().RecycleGameObject(this.m_effectInScene); this.m_effectInScene = null; } if ((this.m_signalInUISequence >= 0) && (this.m_signalInUIContainer != null)) { this.m_signalInUIContainer.RecycleElement(this.m_signalInUISequence); } this.m_signalInUISequence = -1; this.m_signalInUIContainer = null; this.m_effectInScene = null; this.m_signalInUIEffect = null; }
private void RefreshUI(int idx) { if (this.m_form != null) { GameObject pickObject = this.m_PickObject; if (pickObject != null) { CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>(); if (component != null) { for (int i = 0; i < this.m_PickIdxList.Length; i++) { if (i == idx) { GameObject element = component.GetElement(this.m_PickIdxList[i]); if (element != null) { Transform transform = element.transform.FindChild("Image_Pointer"); if (transform != null) { transform.gameObject.CustomSetActive(true); } } } else { GameObject obj4 = component.GetElement(this.m_PickIdxList[i]); if (obj4 != null) { Transform transform2 = obj4.transform.FindChild("Image_Pointer"); if (transform2 != null) { transform2.gameObject.CustomSetActive(false); } } } } } } this.m_BottomBtn.CustomSetActive((idx == (this.m_totalImgNum - 1)) || (this.m_totalImgNum == 0)); this.m_PickObject.CustomSetActive(idx != (this.m_totalImgNum - 1)); this.m_BtnLeft.CustomSetActive((idx != 0) && (this.m_totalImgNum > 1)); this.m_BtnRight.CustomSetActive((idx != (this.m_totalImgNum - 1)) && (this.m_totalImgNum > 1)); } }
public void Clear() { this.m_tabIndex = -1; if (this.m_container != null) { this.m_container.RecycleAllElement(); } this.m_container = null; this.day_progress_bg = (Image)(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; Singleton <CUIManager> .GetInstance().CloseForm(CTaskSys.TASK_FORM_PATH); }
private void AddCharmIcon(CTailsman inCharm) { if (inCharm == null) { return; } if (this.m_mapPointer.ContainsKey(inCharm)) { return; } this.m_mapPointerContainer = this.GetMapPointerContainer(); if (this.m_mapPointerContainer != null) { int element = this.m_mapPointerContainer.GetElement(); if (element >= 0) { RectTransform rectTransform = null; GameObject element2 = this.m_mapPointerContainer.GetElement(element); if (element2 != null) { rectTransform = (element2.transform as RectTransform); Image component = element2.GetComponent <Image>(); component.SetSprite(string.Format("{0}{1}", "UGUI/Sprite/Battle/", "Img_Map_Base_Green"), Singleton <CBattleSystem> .get_instance().FormScript, true, false, false, false); } if (rectTransform != null) { rectTransform.SetAsFirstSibling(); } Vector3 actorPosition = Vector3.zero; if (inCharm.Presentation != null) { actorPosition = inCharm.Presentation.transform.position; } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext != null && curLvelContext.IsMobaMode()) { this.UpdateUIMap(rectTransform, actorPosition, (float)curLvelContext.m_mapWidth, (float)curLvelContext.m_mapHeight); } this.m_mapPointer.Add(inCharm, element2); } } }
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); } }
public override void Validate() { this._urlaList = UrlAction.ParseFromText(base.view.activity.Content, null); int count = this._urlaList.Count; if (count > 0) { this._stepList.SetElementAmount(count); for (int i = 0; i < count; i++) { UrlAction urlAction = this._urlaList[i]; CUIListElementScript elemenet = this._stepList.GetElemenet(i); if (null != elemenet) { CUIHttpImageScript component = elemenet.GetComponent <CUIHttpImageScript>(); if (null != component) { component.SetImageUrl(urlAction.target); } } } this._pickIdxList = new int[count]; if (this._pickObject != null) { CUIContainerScript component2 = this._pickObject.GetComponent <CUIContainerScript>(); if (component2 != null) { component2.RecycleAllElement(); for (int j = 0; j < this._urlaList.Count; j++) { this._pickIdxList[j] = component2.GetElement(); } } } this._curStepIndex = 0; this._leftToRight = true; this._stepList.MoveElementInScrollArea(this._curStepIndex, true); this.EnablePickObj(this._curStepIndex); this._lastScrollTime = Time.time; this.updateOverTime(); } }
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 EnablePickObj(int idx) { GameObject pickObject = this.m_PickObject; if (pickObject != null) { CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>(); if (component) { for (int i = 0; i < this.m_PickIdxList.Length; i++) { if (i == idx) { GameObject element = component.GetElement(this.m_PickIdxList[i]); if (element) { Transform transform = element.transform.FindChild("Image_Pointer"); if (transform != null) { transform.gameObject.CustomSetActive(true); } } } else { GameObject element2 = component.GetElement(this.m_PickIdxList[i]); if (element2) { Transform transform2 = element2.transform.FindChild("Image_Pointer"); if (transform2 != null) { transform2.gameObject.CustomSetActive(false); } } } } } } }
private void AddSpawnGroupCounter(int inCountdown, int inAlertPreroll, Vector3 inInitPos, SpawnerWrapper.ESpawnObjectType inObjType) { this.m_spawnGroupCounterContainer = this.GetSpawnGroupTextContainer(); if (this.m_spawnGroupCounterContainer != null) { int element = this.m_spawnGroupCounterContainer.GetElement(); if (element >= 0) { SpawnGroupCounter counter; counter = new SpawnGroupCounter { CountdownTime = inCountdown, timer = counter.CountdownTime, AlertTime = counter.timer - inAlertPreroll, bAlertPreroll = inAlertPreroll > 0, bDidAlert = false }; RectTransform mapPointerRectTransform = null; GameObject p = this.m_spawnGroupCounterContainer.GetElement(element); if (p != null) { mapPointerRectTransform = p.transform as RectTransform; counter.TextObj = p; counter.timerText = Utility.FindChild(p, "TimerText").GetComponent <Text>(); } if (mapPointerRectTransform != null) { mapPointerRectTransform.SetAsFirstSibling(); } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if ((curLvelContext != null) && curLvelContext.isPVPMode) { this.UpdateUIMap(mapPointerRectTransform, inInitPos, (float)curLvelContext.mapWidth, (float)curLvelContext.mapHeight); } this.m_spawnGroupCounter.Add(counter); } } }
public void OpenForm(CUIEvent uiEvent) { if (this.m_CUIForm != null) { this.tablistScript.SelectElement(uiEvent.m_eventParams.tag, true); } else { this.m_CUIForm = Singleton <CUIManager> .GetInstance().OpenForm(CTaskSys.TASK_FORM_PATH, true, true); this.tablistScript = this.m_CUIForm.GetWidget(1).GetComponent <CUIListScript>(); this.tasklistScript_main = this.m_CUIForm.GetWidget(2).GetComponent <CUIListScript>(); this.tasklistScript_usual = this.m_CUIForm.GetWidget(3).GetComponent <CUIListScript>(); this.tasklistScript_mishu = this.m_CUIForm.GetWidget(4).GetComponent <CUIListScript>(); string[] strArray = null; CTaskModel model = Singleton <CTaskSys> .instance.model; strArray = new string[] { model.Daily_Quest_Career, model.Daily_Quest_NeedGrowing, model.Daily_Quest_NeedMoney, model.Daily_Quest_NeedSeal, model.Daily_Quest_NeedHero }; this.tablistScript.SetElementAmount(strArray.Length); for (int i = 0; i < this.tablistScript.m_elementAmount; i++) { this.tablistScript.GetElemenet(i).gameObject.transform.FindChild("Text").GetComponent <Text>().text = strArray[i]; } this.tablistScript.m_alwaysDispatchSelectedChangeEvent = true; this.tablistScript.SelectElement(uiEvent.m_eventParams.tag, true); this.tablistScript.m_alwaysDispatchSelectedChangeEvent = false; this.week_huoyue_text = this.m_CUIForm.GetWidget(5).GetComponent <Text>(); this.week_node1 = this.m_CUIForm.GetWidget(6); this.week_node2 = this.m_CUIForm.GetWidget(7); this.m_container = this.m_CUIForm.GetWidget(8).GetComponent <CUIContainerScript>(); this.day_progress_bg = this.m_CUIForm.GetWidget(9).GetComponent <Image>(); this.day_progress = this.m_CUIForm.GetWidget(10).GetComponent <Image>(); this.day_huoyue_txt = this.m_CUIForm.GetWidget(11).GetComponent <Text>(); this.Refresh_Tab_RedPoint(); this._init_day_huoyue(); this.Refresh_Huoyue(); } }
private void AddCharmIcon(CTailsman inCharm) { if ((inCharm != null) && !this.m_mapPointer.ContainsKey(inCharm)) { this.m_mapPointerContainer = this.GetMapPointerContainer(); if (this.m_mapPointerContainer != null) { int element = this.m_mapPointerContainer.GetElement(); if (element >= 0) { RectTransform mapPointerRectTransform = null; GameObject obj2 = this.m_mapPointerContainer.GetElement(element); if (obj2 != null) { mapPointerRectTransform = obj2.transform as RectTransform; obj2.GetComponent <Image>().SetSprite(string.Format("{0}{1}", "UGUI/Sprite/Battle/", "Img_Map_Base_Green"), Singleton <CBattleSystem> .instance.m_FormScript, true, false, false); } if (mapPointerRectTransform != null) { mapPointerRectTransform.SetAsFirstSibling(); } Vector3 zero = Vector3.zero; if (inCharm.Presentation != null) { zero = inCharm.Presentation.transform.position; } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if ((curLvelContext != null) && curLvelContext.isPVPMode) { this.UpdateUIMap(mapPointerRectTransform, zero, (float)curLvelContext.mapWidth, (float)curLvelContext.mapHeight); } this.m_mapPointer.Add(inCharm, obj2); } } } }
public void Clear() { if (this.m_useSignalButton) { Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_ClickMiniMap, new CUIEventManager.OnUIEventHandler(this.OnClickMiniMap)); Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_Click_Scene, new CUIEventManager.OnUIEventHandler(this.OnClickBattleScene)); Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_OnSignalButtonClicked, new CUIEventManager.OnUIEventHandler(this.OnSignalButtonClicked)); Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_OnSignalTipsListElementEnable, new CUIEventManager.OnUIEventHandler(this.OnSignalListElementEnabled)); this.m_signals = null; this.m_playerSignalCooldowns = null; this.m_signalTipses = null; } this.m_signalButtons = null; this.m_formScript = null; this.m_miniMap = null; this.m_signalSrcHeroNameContainer = null; this.m_signalInUIContainer_small = null; this.m_signalInUIContainer_big = null; this.m_signalTipsList = null; }
private void AddSpawnGroupCounter(int inCountdown, int inAlertPreroll, Vector3 inInitPos, SpawnerWrapper.ESpawnObjectType inObjType) { this.m_spawnGroupCounterContainer = this.GetSpawnGroupTextContainer(); if (this.m_spawnGroupCounterContainer != null) { int element = this.m_spawnGroupCounterContainer.GetElement(); if (element >= 0) { MinimapView.SpawnGroupCounter spawnGroupCounter = new MinimapView.SpawnGroupCounter(); spawnGroupCounter.CountdownTime = inCountdown; spawnGroupCounter.timer = spawnGroupCounter.CountdownTime; spawnGroupCounter.AlertTime = spawnGroupCounter.timer - inAlertPreroll; spawnGroupCounter.bAlertPreroll = (inAlertPreroll > 0); spawnGroupCounter.bDidAlert = false; RectTransform rectTransform = null; GameObject element2 = this.m_spawnGroupCounterContainer.GetElement(element); if (element2 != null) { rectTransform = (element2.transform as RectTransform); spawnGroupCounter.TextObj = element2; spawnGroupCounter.timerText = Utility.FindChild(element2, "TimerText").GetComponent <Text>(); } if (rectTransform != null) { rectTransform.SetAsFirstSibling(); } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); if (curLvelContext != null && curLvelContext.IsMobaMode()) { this.UpdateUIMap(rectTransform, inInitPos, (float)curLvelContext.m_mapWidth, (float)curLvelContext.m_mapHeight); } this.m_spawnGroupCounter.Add(spawnGroupCounter); } } }
public void OpenForm(int clientBit, string[] imgPath, int imgNum, CUIEvent uiEventParam = null, string title = null, string btnName = null, bool bAutoMove = true, bool bShowChooseGuideNextTime = false) { this.m_form = Singleton <CUIManager> .GetInstance().OpenForm(NewbieBannerIntroDialog.BANNER_INTRO_DIALOG_PATH, false, true); if (this.m_form == null) { return; } 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_bShowChooseGuideNextTime = bShowChooseGuideNextTime; this.m_curImgIndex = 0; this.m_form.GetWidget(1).GetComponent <CUIEventScript>().m_onClickEventParams.tag = clientBit; this.InitForm(); this.InitPickObjElement(this.m_totalImgNum); this.RefreshUI(0); }
public void OpenForm(CUIEvent uiEvent) { if (this.m_CUIForm != null) { this.tablistScript.SelectElement(uiEvent.m_eventParams.tag, true); } else { this.m_CUIForm = Singleton <CUIManager> .GetInstance().OpenForm(CTaskSys.TASK_FORM_PATH, true, true); this.tablistScript = this.m_CUIForm.GetWidget(1).GetComponent <CUIListScript>(); this.tasklistScript_usual = this.m_CUIForm.GetWidget(3).GetComponent <CUIListScript>(); this.tasklistScript_mishu = this.m_CUIForm.GetWidget(4).GetComponent <CUIListScript>(); this.m_mainTaskNode = this.m_CUIForm.transform.Find("node/list_node_main").gameObject; this.m_unlockNode = this.m_CUIForm.transform.Find("node/list_node_main/unlock_node").gameObject; this.m_levelRewardNode = this.m_CUIForm.transform.Find("node/list_node_main/reward_node").gameObject; this.m_levelRewardList = this.m_CUIForm.transform.Find("node/list_node_main/levelList").GetComponent <CUIListScript>(); this.m_unlockInfoTxt = this.m_CUIForm.transform.Find("node/list_node_main/unlock_node/Text").GetComponent <Text>(); this.m_levelRewardText = this.m_CUIForm.transform.Find("node/list_node_main/reward_node/Text").GetComponent <Text>(); this.m_normalTaskNode = this.m_CUIForm.transform.Find("node/list_node_main/task_node/normal").gameObject; this.m_emptyTaskNode = this.m_CUIForm.transform.Find("node/list_node_main/task_node/noTask").gameObject; this.m_taskNode0 = this.m_CUIForm.transform.Find("node/list_node_main/task_node/normal/task_0").gameObject; this.m_taskNode1 = this.m_CUIForm.transform.Find("node/list_node_main/task_node/normal/task_1").gameObject; this.jumpRewardGameObject = this.m_CUIForm.transform.Find("node/list_node_main/levelList/goto_btn").gameObject; DebugHelper.Assert(this.m_mainTaskNode != null, "ctaskview m_mainTaskNode == null"); DebugHelper.Assert(this.m_unlockNode != null, "ctaskview m_unlockNode == null"); DebugHelper.Assert(this.m_levelRewardNode != null, "ctaskview m_levelRewardNode == null"); DebugHelper.Assert(this.m_levelRewardList != null, "ctaskview m_levelRewardList == null"); DebugHelper.Assert(this.m_unlockInfoTxt != null, "ctaskview m_unlockInfoTxt == null"); DebugHelper.Assert(this.m_levelRewardText != null, "ctaskview m_levelRewardText == null"); DebugHelper.Assert(this.m_normalTaskNode != null, "ctaskview m_normalTaskNode == null"); DebugHelper.Assert(this.m_emptyTaskNode != null, "ctaskview m_emptyTaskNode == null"); DebugHelper.Assert(this.m_taskNode0 != null, "ctaskview m_taskNode0 == null"); DebugHelper.Assert(this.m_taskNode1 != null, "ctaskview m_taskNode1 == null"); DebugHelper.Assert(this.m_taskNode1 != null, "ctaskview jumpRewardGameObject == null"); string[] strArray = null; CTaskModel model = Singleton <CTaskSys> .instance.model; strArray = new string[] { model.Daily_Quest_Career, model.Daily_Quest_NeedGrowing, model.Daily_Quest_NeedMoney, model.Daily_Quest_NeedSeal, model.Daily_Quest_NeedHero }; this.tablistScript.SetElementAmount(strArray.Length); for (int i = 0; i < this.tablistScript.m_elementAmount; i++) { this.tablistScript.GetElemenet(i).gameObject.transform.FindChild("Text").GetComponent <Text>().text = strArray[i]; } this.tablistScript.m_alwaysDispatchSelectedChangeEvent = true; this.tablistScript.SelectElement(uiEvent.m_eventParams.tag, true); this.tablistScript.m_alwaysDispatchSelectedChangeEvent = false; this.week_huoyue_text = this.m_CUIForm.GetWidget(5).GetComponent <Text>(); this.week_node1 = this.m_CUIForm.GetWidget(6); this.week_node2 = this.m_CUIForm.GetWidget(7); this.m_container = this.m_CUIForm.GetWidget(8).GetComponent <CUIContainerScript>(); this.day_progress_bg = this.m_CUIForm.GetWidget(9).GetComponent <Image>(); this.day_progress = this.m_CUIForm.GetWidget(10).GetComponent <Image>(); this.day_huoyue_txt = this.m_CUIForm.GetWidget(11).GetComponent <Text>(); this.Refresh_Tab_RedPoint(); this._init_day_huoyue(); this.Refresh_Huoyue(); CTaskModel model2 = Singleton <CTaskSys> .instance.model; if (model2.curLevelRewardData == null) { uint pvpLevel = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().PvpLevel; model2.curLevelRewardData = model2.GetLevelRewardData((int)pvpLevel); } } }