// 更新卡牌属性,这个主要更改卡牌经常改变的属性 public override void updateCardDataChangeBySvr(t_Card svrCard_ = null) { base.updateCardDataChangeBySvr(svrCard_); if (svrCard_ == null) { svrCard_ = m_sceneCardItem.svrCard; } AuxLabel text = new AuxLabel(); if (m_sceneCardItem != null) { if (m_sceneCardItem.cardArea == CardArea.CARDCELLTYPE_HAND) // 手牌不同更新 { text.setSelfGo(m_render.gameObject(), "UIRoot/AttText"); // 攻击 text.text = svrCard_.damage.ToString(); text.setSelfGo(m_render.gameObject(), "UIRoot/MpText"); // Magic text.text = svrCard_.mpcost.ToString(); text.setSelfGo(m_render.gameObject(), "UIRoot/HpText"); // HP text.text = svrCard_.hp.ToString(); } if (m_sceneCardItem.cardArea == CardArea.CARDCELLTYPE_COMMON) // 场牌更新 { text.setSelfGo(m_render.gameObject(), "UIRoot/AttText"); // 攻击 text.text = svrCard_.damage.ToString(); text.setSelfGo(m_render.gameObject(), "UIRoot/HpText"); // HP text.text = svrCard_.hp.ToString(); } } }
override public void updateCardDataChangeBySvr(t_Card svrCard_ = null) { base.updateCardDataChangeBySvr(svrCard_); if (svrCard_ == null) { svrCard_ = m_sceneCardItem.svrCard; } AuxLabel text = new AuxLabel(); text.setSelfGo(m_render.gameObject(), "UIRoot/AttText"); // 攻击 text.text = svrCard_.damage.ToString(); text.setSelfGo(m_render.gameObject(), "UIRoot/HpText"); // HP text.text = svrCard_.hp.ToString(); text.setSelfGo(m_render.gameObject(), "UIRoot/ArmorText"); // Armor 护甲 text.text = svrCard_.armor.ToString(); updateHp(); }
override public void updateCardDataChangeBySvr(t_Card svrCard_ = null) { base.updateCardDataChangeBySvr(); if (svrCard_ == null) { svrCard_ = m_sceneCardItem.svrCard; } AuxLabel text = new AuxLabel(); text.setSelfGo(m_render.gameObject(), "UIRoot/MpText"); // 消耗 text.text = svrCard_.mpcost.ToString(); }