public override void BuildUI() { Life.Environment = LifeEnvironment.View; StageDC.JoinCompaignBattle(); if (StageDC.GetPveMode() == PVEMode.Attack) { BattleEnvironmentM.BuildViewStageScene(); } ViewStageWnd wnd = WndManager.GetDialog <ViewStageWnd>(); if (wnd != null) { wnd.SetStageid(StageDC.GetCompaignStageType(), StageDC.GetCompaignStageID()); } FindGoldBuilding(); }
void BtnClick_OnClickEventHandler(UIButton sender) { m_iTipIndex++; if (m_iTipIndex >= m_lStrTalks.Count) { WndManager.DestoryDialog <NpcTalksWnd>(); if (m_iWndType == 1) //开启进入战斗按钮 { ViewStageWnd wnd = WndManager.FindDialog <ViewStageWnd>(); if (wnd != null) { wnd.MyHead.btnCombat.enabled = true; CmCarbon.StartTalkOver = true; } if (m_finishCallBack != null) { m_finishCallBack(); } } } else { if (m_iWndType == 1) { SetWndDirection(m_lWndDirs[m_iTipIndex]); NGUIUtil.Set2DSprite(MyHead.Spr2dNpcHead, "Textures/npc/", m_lNpcID[m_iTipIndex]); } NGUIUtil.SetLableText(MyHead.LblTalkDesc, m_lStrTalks[m_iTipIndex]); TypewriterEffect twe = MyHead.LblTalkDesc.gameObject.GetComponent <TypewriterEffect>(); if (twe == null) { MyHead.LblTalkDesc.gameObject.AddComponent <TypewriterEffect>(); } else //修复第二次打字效果不触发的问题 { DestroyImmediate(twe); MyHead.LblTalkDesc.gameObject.AddComponent <TypewriterEffect>(); } } }