public override void OnRefresh() { var pupilData = PupilProxy.instance.getPupilInfo(m_PupilId); var deploy = pupilData.GetDeploy(); m_UI.m_LabelName.SetText(deploy.Name); m_UI.m_LabelLevel.SetValue(pupilData.Level); m_UI.m_LabelCombat.SetValue(pupilData.GetCombat()); m_UI.m_StarLevel.AsStarLevelBig().SetLevel(deploy.StarLevel); m_UI.m_IconBody.icon = UIUtil.GetPupilBodyUrl(deploy.Sex); m_UI.m_Sex.selectedIndex = (int)deploy.Sex; if (m_UI.m_ViewState.selectedIndex == 0) { m_UI.m_ViewState.selectedIndex = 1; } m_UI.m_ProgressExp.max = pupilData.MaxExp; m_UI.m_ProgressExp.value = pupilData.CurExp; var equipingItem = pupilData.GetEquipingWuXue(); if (equipingItem != null) { m_UI.m_JueXueState.selectedIndex = 1; (m_UI.m_IconWuXue as UI_GoodsSmallIcon).m_State.selectedIndex = 1; m_UI.m_IconWuXue.icon = UIUtil.GetGoodsUrl(equipingItem.Type, equipingItem.Id); m_UI.m_LabelWuXueName.SetText(equipingItem.Name); m_UI.m_LabelWuXueCombat.SetValue("9999"); var uniqueSkillData = UniqueSkillProxy.instance.GetData(equipingItem.Id); var xinfaDeploy = XinFaDeploy.GetInfo(uniqueSkillData.SkillId1); var canbenDeploy = CanBenDeploy.GetInfo(uniqueSkillData.SkillId2); string str = (xinfaDeploy.Type == ESkillType.NeiGong) ? "内功" : "外功"; string str1 = (canbenDeploy.Type == ESkillType.JianFa) ? "剑法" : "刀法"; m_UI.m_LabelWuXueType.SetValue(str + str1); var skillEffectDeploy = SkillEffectDeploy.GetInfo(uniqueSkillData.Id); m_UI.m_LabelWuXueDesc.SetValue(skillEffectDeploy.Desc); } else { m_UI.m_JueXueState.selectedIndex = 0; } }
private void OnRefreshEnemyInfo() { var enemyDeploy = EnemyDeploy.GetInfo(m_EnemyId); m_UI.m_RightCharacterInfo.m_LabelName.SetText(enemyDeploy.Name); m_UI.m_RightCharacterInfo.m_LabelLevel.SetValue(enemyDeploy.Level); m_UI.m_RightCharacterInfo.m_LabelCombat.SetText(enemyDeploy.Combat); if (enemyDeploy.SkillEffectId > 0) { m_UI.m_RightSkillInfo.visible = true; var wuxueDeploy = SkillEffectDeploy.GetInfo(enemyDeploy.SkillEffectId); m_UI.m_RightSkillInfo.m_LabelName.SetText(wuxueDeploy.Name); m_UI.m_RightSkillInfo.m_LoaderIcon.url = UIUtil.GetUniqueSkillEffectUrl(enemyDeploy.SkillEffectId); m_UI.m_LabelRightSkillName.SetText(wuxueDeploy.Name); } else { m_UI.m_RightSkillInfo.visible = false; } }
private void OnRefreshPupilInfo() { var pupilId = AdventureProxy.instance.GetData().PupilId; var pupilInfo = PupilProxy.instance.getPupilInfo(pupilId); var pupilDeploy = PupilDeploy.GetInfo(pupilId); var wuxue = pupilInfo.GetEquipingWuXue(); m_UI.m_LeftCharacterInfo.m_LabelName.SetText(pupilDeploy.Name); m_UI.m_LeftCharacterInfo.m_LabelLevel.SetValue(pupilInfo.Level); m_UI.m_LeftCharacterInfo.m_LabelCombat.SetText(pupilInfo.GetCombat()); if (wuxue != null) { m_UI.m_LeftSkillInfo.visible = true; var uniqueSkillInfo = UniqueSkillProxy.instance.GetData(wuxue.Id); var wuxueDeploy = SkillEffectDeploy.GetInfo(uniqueSkillInfo.Id); m_UI.m_LeftSkillInfo.m_LabelName.SetText(uniqueSkillInfo.Name); m_UI.m_LeftSkillInfo.m_LoaderIcon.url = UIUtil.GetUniqueSkillEffectUrl(uniqueSkillInfo.Id); m_UI.m_LabelLeftSkillName.SetText(uniqueSkillInfo.Name); } else { m_UI.m_LeftSkillInfo.visible = false; } }
public override void OnRefresh() { // var deploy = GoodsDeploy.GetInfo(Data.Id); m_UI.m_LabelName.SetText(Data.Name); m_UI.m_LabelValue.SetValue(Data.Value); m_UI.m_LabelQuality.SetValue(Language.GetQuality(Data.Quality)); if (Data.Type == EGoodsType.WuXue) { var uniqueSkillData = UniqueSkillProxy.instance.GetData(Data.Id); var skillEffectDeploy = SkillEffectDeploy.GetInfo(uniqueSkillData.Id); m_UI.m_LabelDesc.SetText(skillEffectDeploy.Desc); } else { m_UI.m_LabelDesc.SetText(Data.Desc); } m_UI.m_LabelCount.SetValue(Data.Count); m_UI.m_LabelType.SetValue(Language.GetGoodsTypeName(Data.Type)); (m_UI.m_IconHead as UI_GoodsSmallIcon).m_State.selectedIndex = 1; m_UI.m_IconHead.icon = UIUtil.GetGoodsUrl(Data.Type, Data.Id); }