/// <summary> /// 战前/后 对白 /// </summary> /// <param name="npcid">NPC ID</param> /// <param name="talkStrs">聊天数据串</param> /// <param name="direction">npc左右位置</param> public void SetData(List <int> npcIDs, List <string> talkStrs, List <NpcDirection> wndDirections, CallBack callBack = null) { m_iWndType = 1; m_lWndDirs = wndDirections; m_lStrTalks = talkStrs; m_lNpcID = npcIDs; m_finishCallBack = callBack; SetWndDirection(wndDirections[0]); if (MainCameraM.s_Instance) { MainCameraM.s_Instance.EnableDrag(false); } //设置首位NPC头像 NGUIUtil.Set2DSprite(MyHead.Spr2dNpcHead, "Textures/npc/", m_lNpcID[0]); //设置首句对白 string str = NGUIUtil.GetNewLineStr(m_lStrTalks[0]); NGUIUtil.SetLableText(MyHead.LblTalkDesc, str); }
public void SetData(string str1, string str2, GameObject go) { MyHead.LblDesc1.text = NGUIUtil.GetNewLineStr(str1); MyHead.LblDesc2.text = NGUIUtil.GetNewLineStr(str2); FixDepth(go); }