public void SetRankData(GameCmd.stAnswerOrderListRelationUserCmd_S.Data info) { uint t = (uint)DataManager.Manager <RankManager>().OrderType; rank.text = this.info.rank.ToString(); palyerID = this.info.thisid; name.text = this.info.name.ToString(); if (t >= 11 && t <= 15) { line3.text = this.info.clan.ToString(); line4.text = this.info.type.ToString(); line5.text = this.info.yiju.ToString(); } else { uint job = 0; if (uint.TryParse(info.type, out job)) { SelectRoleDataBase data = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex) 1); if (data != null) { line3.text = data.professionName; } } else { line3.text = info.type; } line4.text = this.info.clan.ToString(); line5.text = this.info.yiju.ToString(); } }
string GetSpriteName(GameCmd.enumProfession type) { IPlayer player = MainPlayerHelper.GetMainPlayer(); string headIcon = ""; if (player != null) { uint job = (uint)type; int sex = player.GetProp((int)PlayerProp.Sex); if (headIconDic.ContainsKey((uint)type)) { headIcon = headIconDic[job]; } else { SelectRoleDataBase sdb = table.SelectRoleDataBase.Where(type, (GameCmd.enmCharSex)sex); if (sdb != null) { headIcon = sdb.mainUIHeadIcon; headIconDic.Add(job, headIcon); } } } return(headIcon); }
public void SetIcon(uint job) { if (m_spIcon != null) { SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex) 1); if (sdb != null) { UIManager.GetTextureAsyn(sdb.strprofessionIcon, ref iuiIconAtlas, () => { if (m_spIcon != null) { m_spIcon.mainTexture = null; } }, m_spIcon, false); } } }
public void SetIcon(uint profession) { if (icon != null) { SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)profession, (GameCmd.enmCharSex) 1); if (sdb != null) { //DataManager.Manager<UIManager>().SetSpriteDynamicIcon(icon, sdb.strprofessionIcon, false); UIManager.GetTextureAsyn(sdb.strprofessionIcon, ref iuiIconAtlas, () => { if (icon != null) { icon.mainTexture = null; } }, icon, false); } } }
void PlayCreateAudio(int profession) { Engine.IAudio audio = Engine.RareEngine.Instance().GetAudio(); if (audio == null) { return; } audio.StopEffect(m_uAudioID); float originVol = 1; SelectRoleDataBase sdb = SelectRoleDataBase.Where((enumProfession)profession, (enmCharSex)1); if (sdb != null) { uint audioID = sdb.createAudioID; table.ResourceDataBase resDB = GameTableManager.Instance.GetTableItem <table.ResourceDataBase>(audioID); if (audio != null && resDB != null) { if (m_audioSource != null) { m_audioSource.volume = 0.2f; } if (m_Avater != null) { if (m_Avater.RenderObj != null) { if (m_Avater.RenderObj.GetNode() != null) { if (m_Avater.RenderObj.GetNode().GetTransForm() != null) { m_uAudioID = audio.PlayEffect(m_Avater.RenderObj.GetNode().GetTransForm().gameObject, resDB.strPath, endCallback: () => { if (m_audioSource != null) { m_audioSource.volume = originVol; } }); } } } } } } }
public void SetIcon(uint job) { if (icon != null) { // icon.ChangeSprite(job); SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex) 1); if (sdb != null) { UIManager.GetTextureAsyn(sdb.jobBigIcon, ref m_iconSeedData, () => { if (icon != null) { icon.mainTexture = null; } }, icon); } } }
void AddEffectOnEntity(IEntity en, bool bBorn) { if (en == null) { return; } if (en.GetEntityType() == EntityType.EntityType_Player) { int job = en.GetProp((int)PlayerProp.Job); int sex = en.GetProp((int)PlayerProp.Sex); SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex)sex); if (sdb != null) { if (bBorn) { AddEffect(en, sdb.borneffect); } else { AddEffect(en, sdb.deadeffect); } } } else if (en.GetEntityType() == EntityType.EntityType_NPC || en.GetEntityType() == EntityType.EntityType_Monster) { int modelID = en.GetProp((int)EntityProp.BaseID); table.NpcDataBase ndb = GameTableManager.Instance.GetTableItem <table.NpcDataBase>((uint)modelID); if (ndb != null) { uint effectID = ndb.strBirthMagic; if (bBorn) { AddEffect(en, ndb.strBirthMagic); } else { AddEffect(en, ndb.strDeathMagic); } } } }
public override void SetGridData(object data) { base.SetGridData(data); if (data == null) { return; } BaseUserInfo info = (BaseUserInfo)data; palyerID = info.uid; NameLabel.text = info.name; LevelLabel.text = info.lv.ToString(); SelectRoleDataBase tab = table.SelectRoleDataBase.Where((GameCmd.enumProfession)info.profession, (GameCmd.enmCharSex) 1); if (tab != null) { ProfessionLabel.text = tab.professionName; SetIcon(tab.mainUIHeadIcon); } RechargeNum.text = info.recharge.ToString(); }
public void SetIcon(uint job) { if (m_spIcon != null) { m_spIcon.gameObject.SetActive(true); //m_spIcon.ChangeSprite(job); SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex) 1); if (sdb != null) { //DataManager.Manager<UIManager>().SetSpriteDynamicIcon(m_spIcon, sdb.strprofessionIcon, false); UIManager.GetTextureAsyn(sdb.strprofessionIcon, ref iuiIconAtlas, () => { if (m_spIcon != null) { m_spIcon.mainTexture = null; } }, m_spIcon); } } }
//----------------------------------------------------------------------------------------------- public void AddTransmitMsg(GameCmd.stInviteGoMapRequestUserCmd_CS cmd) { PushMsg msg = new PushMsg(); if (cmd.type == (int)GameCmd.FeiLeiType.FeiLeiType_Clan) { msg.msgType = PushMsg.MsgType.ClanTransmit; msg.cd = (float)GameTableManager.Instance.GetGlobalConfig <int>("ClanTransmitMsgCD"); } else if (cmd.type == (int)GameCmd.FeiLeiType.FeiLeiType_Couple) { msg.msgType = PushMsg.MsgType.CoupleTransmit; msg.cd = (float)GameTableManager.Instance.GetGlobalConfig <int>("CoupleTransmitMsgCD"); } else if (cmd.type == (int)GameCmd.FeiLeiType.FeiLeiType_Team) { msg.msgType = PushMsg.MsgType.TeamTransmit; msg.cd = (float)GameTableManager.Instance.GetGlobalConfig <int>("TeamTransmitMsgCD"); } else if (cmd.type == (int)GameCmd.FeiLeiType.CallUp_CityWarClan) { msg.msgType = PushMsg.MsgType.CityWarClan; msg.cd = (float)GameTableManager.Instance.GetGlobalConfig <int>("ClanTransmitMsgCD"); } else if (cmd.type == (int)GameCmd.FeiLeiType.CallUp_CityWarTeam) { msg.msgType = PushMsg.MsgType.CityWarTeam; msg.cd = (float)GameTableManager.Instance.GetGlobalConfig <int>("ClanTransmitMsgCD"); } msg.senderId = cmd.userid; msg.sendName = cmd.username; msg.sendTime = UnityEngine.Time.realtimeSinceStartup; msg.vector = cmd.pos; table.MapDataBase mdb = GameTableManager.Instance.GetTableItem <table.MapDataBase>(cmd.mapid); if (mdb != null) { msg.map = mdb.strName; msg.mapId = cmd.mapid; } if (DataManager.Manager <ClanManger>().ClanInfo != null) { GameCmd.stClanMemberInfo clanInfo = DataManager.Manager <ClanManger>().ClanInfo.GetMemberInfo(cmd.userid); if (clanInfo != null) { msg.level = (int)clanInfo.level; SelectRoleDataBase data = table.SelectRoleDataBase.Where((GameCmd.enumProfession)clanInfo.job, (GameCmd.enmCharSex) 1); if (data != null) { msg.profession = data.professionName; } } } TeamMemberInfo info = DataManager.Manager <TeamDataManager>().GetTeamMember(cmd.userid); if (info != null) { msg.level = (int)info.lv; SelectRoleDataBase data = table.SelectRoleDataBase.Where((GameCmd.enumProfession)info.job, (GameCmd.enmCharSex) 1); if (data != null) { msg.profession = data.professionName; } } AddSysMsg(msg); if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MessagePushPanel) == false) { if (!DataManager.Manager <ComBatCopyDataManager>().IsEnterCopy) { DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.MessagePushPanel); } } Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.REFRESHTRANSMITPUSHMSGSTATUS, null); }
protected override void OnJump(UIPanelBase.PanelJumpData jumpData) { base.OnJump(jumpData); if (jumpData != null) { if (jumpData.Param != null) { stRedPacketInfoChatUserCmd_S cmd = jumpData.Param as stRedPacketInfoChatUserCmd_S; if (cmd != null) { m_uRedID = cmd.id; m_peopleInfoList.Clear(); m_moneyType = cmd.money_type; RedPacket rp = m_dataManager.GetRedPacketByID(cmd.id); if (rp != null) { m_label_text_label.text = rp.title; } int job = (int)cmd.job; SelectRoleDataBase roledata = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex) 1); if (roledata != null && null != m__icon) { UIManager.GetTextureAsyn(roledata.strprofessionIcon, ref m_playerCASD, () => { if (m__icon != null) { m__icon.mainTexture = null; } }, m__icon, false); } if (MainPlayerHelper.GetMainPlayer() != null) { string playerName = MainPlayerHelper.GetMainPlayer().GetName(); m_label_playername_label.text = rp.name; if (rp.name == playerName) { m_sprite_btn_take.gameObject.SetActive(false); } else { m_sprite_btn_take.gameObject.SetActive(true); } } m_sprite_goldicon.spriteName = MainPlayerHelper.GetMoneyIconByType((int)cmd.money_type); m_sprite_goldicon2.spriteName = MainPlayerHelper.GetMoneyIconByType((int)cmd.money_type); m_label_procureNum_label.text = cmd.gold.ToString(); m_label_takeNum_label.text = (cmd.num_max - cmd.num).ToString() + "/" + cmd.num_max.ToString(); m_label_totalNum_label.text = cmd.gold_max.ToString(); for (int i = 0; i < cmd.name.Count; i++) { PepoleRedPacketInfo info = new PepoleRedPacketInfo(); info.palyerName = cmd.name[i]; info.goldNum = cmd.recv[i]; m_peopleInfoList.Add(info); } m_peopleInfoList.Sort((x1, x2) => { if (x1.goldNum > x2.goldNum) { return(-1); } else if (x1.goldNum < x2.goldNum) { return(1); } else { return(0); } }); m_ctor_redEnvelopeDetailScrowView.CreateGrids(cmd.name.Count); } } } }
void InitTargetChangeUI() { IEntity ie = Client.ClientGlobal.Instance().GetControllerSystem().GetActiveCtrl().GetCurTarget(); if (ie == null) { m_trans_target.gameObject.SetActive(false); } else { m_trans_target.gameObject.SetActive(true); IEntity entity = ie; string name = entity.GetName(); string lvstr = entity.GetProp((int)CreatureProp.Level).ToString(); m_label_MonsterLevel_Label.text = lvstr; bool showPackage = false; //怪 if (entity.GetEntityType() == EntityType.EntityType_NPC) { INPC npc = entity as INPC; NpcDataBase ndb = GameTableManager.Instance.GetTableItem <NpcDataBase>((uint)npc.GetProp((int)EntityProp.BaseID)); if (ndb == null) { return; } showPackage = npc.IsBoss(); if (ndb.dwMonsterType == 1) { InitTargetUIInMonster(); m_widget_player.gameObject.SetActive(false); m_widget_monster.gameObject.SetActive(true); m_lableTargetLevel.text = entity.GetProp((int)CreatureProp.Level).ToString(); } else { InitTargetUI(); string iconName = UIManager.GetIconName(ndb.npcIcon, npc.IsPet()); UIManager.GetTextureAsyn(iconName, ref m_curTargetIconAsynSeed, () => { if (null != m_spriteTargetIcon) { m_spriteTargetIcon.mainTexture = null; } }, m_spriteTargetIcon, false); m_widget_player.gameObject.SetActive(true); m_widget_monster.gameObject.SetActive(false); } } // 玩家 else { InitTargetUI(); m_widget_player.gameObject.SetActive(true); m_widget_monster.gameObject.SetActive(false); IPlayer player = entity as IPlayer; if (player != null) { int job = player.GetProp((int)PlayerProp.Job); int sex = player.GetProp((int)PlayerProp.Sex); SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex)sex); if (sdb != null) { UIManager.GetTextureAsyn(sdb.strprofessionIcon, ref m_curTargetIconAsynSeed, () => { if (null != m_spriteTargetIcon) { m_spriteTargetIcon.mainTexture = null; } }, m_spriteTargetIcon, false); } m_transHateList.gameObject.SetActive(false); } } m_toggle_packageState.gameObject.SetActive(showPackage); m_lableTargetName.text = name; UpdateTargetHp(entity); } }
//StringBuilder targetName = new StringBuilder(20); private void OnTargetChange(object param) { stTargetChange tc = (stTargetChange)param; if (tc.target == null) { m_trans_target.gameObject.SetActive(false); } else { IEntity entity = tc.target; string name = entity.GetName(); string lvstr = entity.GetProp((int)CreatureProp.Level).ToString(); m_label_MonsterLevel_Label.text = lvstr; bool showPackeage = false; if (entity.GetEntityType() == EntityType.EntityType_NPC) { INPC npc = entity as INPC; showPackeage = npc.IsBoss(); NpcDataBase ndb = GameTableManager.Instance.GetTableItem <NpcDataBase>((uint)npc.GetProp((int)EntityProp.BaseID)); if (ndb != null) { if (ndb.dwMonsterType == 1) { InitTargetUIInMonster(); m_widget_player.gameObject.SetActive(false); m_widget_monster.gameObject.SetActive(true); m_lableTargetLevel.text = entity.GetProp((int)CreatureProp.Level).ToString(); } else { InitTargetUI(); string iconName = UIManager.GetIconName(ndb.npcIcon, npc.IsPet()); UIManager.GetTextureAsyn(iconName, ref m_curTargetIconAsynSeed, () => { if (null != m_spriteTargetIcon) { m_spriteTargetIcon.mainTexture = null; } }, m_spriteTargetIcon, false); m_widget_player.gameObject.SetActive(true); m_widget_monster.gameObject.SetActive(false); } } if (npc.IsMonster() == false) { bool bVisit = true; if (npc.IsSummon() || npc.IsPet()) { bVisit = false; } CopyTypeTable ct = DataManager.Manager <ComBatCopyDataManager>().GetCurCopyType(); if (ct != CopyTypeTable.Arena) { if (bVisit) { Client.ClientGlobal.Instance().GetControllerSystem().GetActiveCtrl().VisiteNPC(npc.GetUID()); } } } else { //请 if (m_nLastNpcId != entity.GetUID()) { BShowEnemyList = false; m_transHateList.gameObject.SetActive(false); } } m_nLastNpcId = entity.GetUID(); if (m_nLastNpcId != 0) { stRefreshNPCBelongParam npcbelongdata = NpcAscription.Instance.GetNpcBelongByNpcID(m_nLastNpcId); UpdateTargetStatus(npcbelongdata.npcid, npcbelongdata.teamid, npcbelongdata.ownerid, npcbelongdata.clanid, npcbelongdata.ownerName); } } else { InitTargetUI(); m_widget_player.gameObject.SetActive(true); m_widget_monster.gameObject.SetActive(false); IPlayer player = entity as IPlayer; if (player != null) { int job = player.GetProp((int)PlayerProp.Job); int sex = player.GetProp((int)PlayerProp.Sex); SelectRoleDataBase sdb = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex)sex); if (sdb != null) { UIManager.GetTextureAsyn(sdb.strprofessionIcon, ref m_curTargetIconAsynSeed, () => { if (null != m_spriteTargetIcon) { m_spriteTargetIcon.mainTexture = null; } }, m_spriteTargetIcon, false); } m_transHateList.gameObject.SetActive(false); //目标选择 OnSetSelectTargetGrid(player.GetID()); } } m_toggle_packageState.gameObject.SetActive(showPackeage); m_lableTargetName.text = name; //m_lableTargetLevel.text = entity.GetProp((int)CreatureProp.Level).ToString(); UpdateTargetHp(entity); BuffManager.TargetBuffList.Clear(); if (entity != null) { List <Client.stAddBuff> lstBuff; IBuffPart part = entity.GetPart(EntityPart.Buff) as IBuffPart; if (part != null) { part.GetBuffList(out lstBuff); for (int i = 0; i < lstBuff.Count; ++i) { stAddBuff buff = lstBuff[i]; table.BuffDataBase db = GameTableManager.Instance.GetTableItem <table.BuffDataBase>(buff.buffid); if (db != null) { if (db.dwShield == 1) {//不显示的直接跳过 continue; } } BuffManager.TargetBuffList.Add(lstBuff[i]); } } else { Engine.Utility.Log.Error("获取{0}Buff部件失败!", entity.GetName()); } } m_trans_target.gameObject.SetActive(true); RefreshBuffIcon(m_trans_TargetBUffContainer, BuffManager.TargetBuffList); } }
/// <summary> /// 第五 /// </summary> /// <param name="id"></param> void ShowByPlayer(IPlayer player) { m_label_Name.text = player.GetName(); m_label_Level.text = player.GetProp((int)CreatureProp.Level).ToString(); //PK值显示 m_label_PKzhi.text = player.GetProp((int)PlayerProp.PKValue).ToString();; m_label_hp_percent.text = player.GetProp((int)CreatureProp.Hp).ToString() + "/" + player.GetProp((int)CreatureProp.MaxHp).ToString(); m_slider_Hpslider.value = (player.GetProp((int)CreatureProp.Hp) + 0.0f) / (player.GetProp((int)CreatureProp.MaxHp)); //魔法值mp显示 m_label_mp_percent.text = player.GetProp((int)CreatureProp.Mp).ToString() + "/" + player.GetProp((int)CreatureProp.MaxMp).ToString(); m_slider_Mpslider.value = (player.GetProp((int)CreatureProp.Mp) + 0.0f) / (player.GetProp((int)CreatureProp.MaxMp)); //经验值exp显示 table.UpgradeDataBase data = GameTableManager.Instance.GetTableItem <table.UpgradeDataBase>((uint)player.GetProp((int)CreatureProp.Level)); ulong maxExp = 0; if (data != null) { maxExp = data.qwExp; } m_label_exp_percent.text = player.GetProp((int)PlayerProp.Exp).ToString() + "/" + maxExp.ToString(); m_slider_Expslider.value = (player.GetProp((int)PlayerProp.Exp) + 0.0f) / (int)maxExp; if (DataManager.Manager <ClanManger>().IsJoinClan) { m_label_clanName.text = DataManager.Manager <ClanManger>().ClanInfo.Name; } else { m_label_clanName.text = "未加入"; } int job = player.GetProp((int)PlayerProp.Job); SelectRoleDataBase roledata = table.SelectRoleDataBase.Where((GameCmd.enumProfession)job, (GameCmd.enmCharSex) 1); if (roledata != null && null != m__headicon) { UIManager.GetTextureAsyn(roledata.strprofessionIcon, ref m_playerCASD, () => { if (m__headicon != null) { m__headicon.mainTexture = null; } }, m__headicon, false); } //神魔经验 // uint shenmoLevel = (uint)player.GetProp((int)PlayerProp.GodLevel) + 1; // GodDemonDataBase god = GameTableManager.Instance.GetTableItem<GodDemonDataBase>(shenmoLevel); // string godExp = ""; // float godSliderValue = 0.0f; // if (god == null) // { // godExp = "--/--"; // godSliderValue = 0.0f; // } // else // { // godExp = string.Format("{0}/{1}", DataManager.Manager<HeartSkillManager>().GhostExp, god.up_exp); // godSliderValue = (DataManager.Manager<HeartSkillManager>().GhostExp + 0.0f) / god.up_exp; // } // m_label_godexp_percent.text = godExp; // m_slider_GodExpslider.value = godSliderValue; #region 基础属性label赋值 //基础属性面板获取数据 m_label_liliang.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.Strength).ToString()); m_label_minjie.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.Agility).ToString()); m_label_zhili.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.Intelligence).ToString()); m_label_tili.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.Corporeity).ToString()); m_label_jingli.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.Spirit).ToString()); m_label_wuligongji.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.PhysicsAttack).ToString() + "-" + player.GetProp((int)FightCreatureProp.MaxPhysicsAttack).ToString()); m_label_fashugongji.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.MagicAttack).ToString() + "-" + player.GetProp((int)FightCreatureProp.MaxMagicAttack).ToString()); m_label_wulifangyu.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.PhysicsDefend).ToString() + "-" + player.GetProp((int)FightCreatureProp.MaxPhysicsDefend).ToString()); m_label_fashufangyu.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.MagicDefend).ToString() + "-" + player.GetProp((int)FightCreatureProp.MaxMagicDefend).ToString()); m_label_zhiliao.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.Cure).ToString()); m_label_mingzhong.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.Hit) / 100.0)).ToString("g0") + "%"); m_label_shanbi.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.Dodge) / 100.0)).ToString("g0") + "%"); m_label_wulibaoji.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.PhysicsCrit) / 100.0)).ToString("g0") + "%"); m_label_fashubaoji.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.MagicCrit) / 100.0)).ToString("g0") + "%"); m_label_baojishanghai.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.CritiRatio) / 100.0)).ToString("g0") + "%"); m_label_huogong.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.FireAttack).ToString()); m_label_binggong.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.IceAttack).ToString()); m_label_diangong.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.EleAttack).ToString()); m_label_angong.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.WitchAttack).ToString()); m_label_huofang.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.FireDefend).ToString()); m_label_bingfang.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.IceDefend).ToString()); m_label_dianfang.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.EleDefend).ToString()); m_label_anfang.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.WitchDefend).ToString()); m_label_shanghaijiashen.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.HarmDeepen) / 100.0)).ToString("g0") + "%"); m_label_wushangxishou.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.PhysicsAbsorb).ToString()); m_label_fashangxishou.text = string.Format("[00ff00]{0}", player.GetProp((int)FightCreatureProp.MagicAbsorb).ToString()); m_label_shanghaixishou.text = string.Format("[00ff00]{0:N2}", ((player.GetProp((int)FightCreatureProp.HarmAbsorb) / 100.0)).ToString("g0") + "%"); #endregion #region 详情赋值 // m_label_dengji.text = player.GetProp((int)CreatureProp.Level).ToString(); // m_label_shenmodengji.text = player.GetProp((int)PlayerProp.GodLevel).ToString(); // m_label_hongmingzhi.text = player.GetProp((int)PlayerProp.PKValue).ToString(); // if (DataManager.Manager<ClanManger>().IsJoinClan) // { // m_label_shizu.text = DataManager.Manager<ClanManger>().ClanInfo.Name; // } // else // { // m_label_shizu.text = "未加入"; // } m_label_bianhao.text = player.GetID().ToString(); m_label_PKNum.text = player.GetProp((int)PlayerProp.PKValue).ToString(); m_label_shengmingzhi.text = player.GetProp((int)CreatureProp.MaxHp).ToString(); m_label_fashuzhi.text = player.GetProp((int)CreatureProp.MaxMp).ToString(); m_label_liliang2.text = m_label_liliang.text; m_label_minjie2.text = m_label_minjie.text; m_label_zhili2.text = m_label_zhili.text; m_label_tili2.text = m_label_tili.text; m_label_jingli2.text = m_label_jingli.text; m_label_wuligongji2.text = m_label_wuligongji.text; m_label_wulifangyu2.text = m_label_wulifangyu.text; m_label_zhiliao2.text = m_label_zhiliao.text; m_label_fashugongji2.text = m_label_fashugongji.text; m_label_fashufangyu2.text = m_label_fashufangyu.text; #endregion RefreshWorldLevel(m_uintWorldLevel); }
public void Refresh(TeamMemberInfo info) { Transform nameTrans = this.transform.Find("name"); if (nameTrans == null) { return; } Transform iconTrans = this.transform.Find("icon"); if (iconTrans == null) { return; } Transform statusConf = this.transform.Find("status_Confirm"); if (statusConf == null) { return; } Transform statusRefuse = this.transform.Find("status_Refuse"); if (statusRefuse == null) { return; } Transform Label = this.transform.Find("Label"); if (Label == null) { return; } bool bShow = false; if (info != null) { bShow = true; } nameTrans.gameObject.SetActive(bShow); iconTrans.gameObject.SetActive(bShow); statusConf.gameObject.SetActive(bShow); statusRefuse.gameObject.SetActive(bShow); if (info == null) { Label.gameObject.SetActive(true); return; } UILabel label = nameTrans.GetComponent <UILabel>(); if (label != null) { label.text = info.name; } UITexture iconSpr = iconTrans.GetComponent <UITexture>(); if (iconSpr != null) { List <SelectRoleDataBase> list = GameTableManager.Instance.GetTableList <SelectRoleDataBase>(); SelectRoleDataBase db = list.Find((x) => { return(x.sexID == 1 && x.professionID == info.job); }); UIManager.GetTextureAsyn(db.strprofessionIcon, ref m_iconCASD, () => { if (null != iconSpr) { iconSpr.mainTexture = null; } }, iconSpr); } bool bConfirm = false; if (CopyDataManager.m_dicTeammateStatus.ContainsKey(info.id)) { bConfirm = CopyDataManager.m_dicTeammateStatus[info.id]; } Label.gameObject.SetActive(false); statusConf.gameObject.SetActive(false); statusRefuse.gameObject.SetActive(!bConfirm); }