public void SetInitData(PersuadeData persuadeData, int total, PresuadeChooseComponent chooseCom, Dictionary <int, PresuadeRecordData> serialIndexDic) { this.m_persuadeData = persuadeData; this.m_chooseCom = chooseCom; this.m_serialIndexDic = serialIndexDic; string npcIcon = ConfNpc.Get(persuadeData.npcId).icon; string npcIconSpine = CommonData.GetSpineHead(npcIcon); npcIcon = string.IsNullOrEmpty(npcIconSpine) ? CommonData.GetBigPortrait(npcIcon) : npcIconSpine; string selfIcon = "juzhang_laonianren_01_SkeletonData.asset";//GlobalInfo.MY_PLAYER_INFO.PlayerIcon; string selfIconSpine = CommonData.GetSpineHead(npcIcon); selfIcon = string.IsNullOrEmpty(selfIconSpine) ? CommonData.GetBigPortrait(selfIcon) : selfIconSpine; this.m_currentNpcIcon = GetCurrentIcon(this.m_npcSpine, this.m_npcTex, npcIcon); this.m_currentSelfIcon = GetCurrentIcon(this.m_selfSpine, this.m_selfTex, selfIcon); this.m_npcTween = this.m_currentNpcIcon.GetComponent <TweenPosition>(); this.m_serialIconGrid.EnsureSize <SerialToggle>(total); for (int i = 0; i < total; i++) { SerialToggle t = this.m_serialIconGrid.GetChild <SerialToggle>(i); t.SetIndex(i); t.Visible = true; } }
protected override void OnInit() { base.OnInit(); this.m_chatCom = Make <PresuadeContentComponent>("Person"); this.m_progressCom = Make <PresuadeProgressComponent>("Panel_topleft"); this.m_chooseCom = Make <PresuadeChooseComponent>("Panel"); this.m_bgBtn = Make <GameUIComponent>("RawImage_bg"); this.m_downCom = Make <GameUIComponent>("RawImage_bg:Down"); this.m_topCom = Make <GameUIComponent>("RawImage_bg:Top"); this.m_describleLab = Make <GameLabel>("RawImage_bg:Text"); this.m_btnQuit = Make <GameButton>("Button_pause"); this.m_describleFader = this.m_describleLab.GetComponent <TextFader>(); }