public bool SetData(ConfSkyEye skyeye, int index, SkyeyePersonDetailComponent detailUI) { this.m_detailUI = detailUI; m_confSkyeye = skyeye; this.SkyEyeID = skyeye.id; int num = 0; this.m_hasReward = GlobalInfo.MY_PLAYER_INFO.IsSkyEyeRewardContainId(skyeye.id); //this.m_alphaTweener.Delay = Mathf.Sqrt(index * 0.9f);// index * SkyeyeUILogic.PERSONTIME; this.m_scaleTweener.Delay = Mathf.Sqrt(index * 0.9f);; // index * SkyeyeUILogic.PERSONTIME; this.m_alphaText.Delay = this.m_scaleTweener.Delay + this.m_scaleTweener.Duration; this.m_posText.Delay = this.m_scaleTweener.Delay + this.m_scaleTweener.Duration; isLock = true; for (int i = 0; i < m_confSkyeye.collectorIds.Length; i++) { PlayerPropMsg playerProp = GlobalInfo.MY_PLAYER_INFO.GetBagInfosByID(m_confSkyeye.collectorIds[i]); if (playerProp != null && playerProp.Count > 0) { num++; if (m_confSkyeye.collectorIds[i] == m_confSkyeye.keyCollectorId) { isLock = false; } } } this.m_personName.Visible = !isLock; this.m_lockCom.Visible = isLock; this.m_personCom.Visible = !isLock; m_progress = num / (float)m_confSkyeye.collectorIds.Length; this.m_tipsLab.Visible = false; if (m_progress == 1 && !m_hasReward) { this.m_tipsLab.Text = "(" + LocalizeModule.Instance.GetString("theeye_tips") + ")"; this.m_tipsLab.Visible = true; } if (m_hasReward) { this.m_progressFillImg.Color = m_targetColor; this.m_personName.color = m_targetColor; } else { this.m_progressFillImg.Color = m_srcColor; this.m_personName.color = m_srcColor; } //this.m_progressBar.Value = m_progress; if (!isLock) { ConfNpc npc = ConfNpc.Get(m_confSkyeye.npcId); this.m_personName.Text = LocalizeModule.Instance.GetString(npc.name); this.m_personImg.TextureName = npc.icon; } return(m_hasReward); }
protected override void OnInit() { base.OnInit(); this.m_personItem = new SkyeyePersonItem[10]; for (int i = 0; i < 10; i++) { this.m_personItem[i] = Make <SkyeyePersonItem>("Panel_down:Panel_head:head_" + (i + 1)); } this.m_totalProgress = Make <GameProgressBar>("Panel_down:totalProgress"); this.m_lockCom = Make <GameUIComponent>("Panel_down:Text_lock"); this.m_startUpBtn = Make <GameButton>("Panel_down:Button"); this.m_quitBtn = Make <GameButton>("RawImage:Button_close"); this.m_bgImg = Make <GameImage>("Panel_down:Panel:bg"); this.m_detailUI = Make <SkyEyePropDetail>("Panel_icondetail"); this.m_personDetail = Make <SkyeyePersonDetailComponent>("Panel_detail"); this.m_totalProgressLab = Make <GameLabel>("Panel_down:num"); }