private void UpdateShow() { playerInfo info = playerInfo._instance; headSprite.spriteName = info.HeadPortrait; labellevel.text = info.Level.ToString(); labelname.text = info.Name; labelpower.text = info.Power.ToString(); int requireExp = GameManger.GetRequireExpByLevel(info.Level + 1); expslider.value = (float)info.Exp / requireExp; explabel.text = info.Exp + "/" + requireExp; labelDiamondnum.text = info.Diamond.ToString(); labelCoinnum.text = info.Coin.ToString(); }
void UpdateShow() { playerInfo info = playerInfo._instance; //装备的更新; helmEquip.SetInventoryItem(info.helmItem); clothEquip.SetInventoryItem(info.clothItem); weaponEquip.SetInventoryItem(info.weaponItem); shoesEquip.SetInventoryItem(info.shoesItem); necklaceEquip.SetInventoryItem(info.necklaceItem); braceletEquip.SetInventoryItem(info.braceletItem); ringEquip.SetInventoryItem(info.ringItem); wingEquip.SetInventoryItem(info.wingItem); lifeLabel.text = info.HP.ToString(); damageLabel.text = info.Damage.ToString(); int requireExp = GameManger.GetRequireExpByLevel(info.Level + 1); expSlider.value = (float)info.Exp / requireExp; explabel.text = info.Exp + "/" + requireExp; labelName.text = info.Name; }