/// <summary> /// 设置阵营积分 /// </summary> public void SetScore(st.net.NetBase.mountain_amount_score _score) { if (jifenSli != null) { jifenSli.value = (float)_score.amount_score / 100000; } if (scoreLab != null) { scoreLab.text = _score.amount_score.ToString(); } }
public override byte[] toBinary() { writer = new st.net.NetBase.ByteWriter(); ushort lenmountain_amount_score = (ushort)mountain_amount_score.Count; writer.write_short(lenmountain_amount_score); for (int i_mountain_amount_score = 0; i_mountain_amount_score < lenmountain_amount_score; i_mountain_amount_score++) { st.net.NetBase.mountain_amount_score listData = mountain_amount_score[i_mountain_amount_score]; listData.toBinary(writer); } return(writer.data); }
public override void fromBinary(byte[] binary) { reader = new st.net.NetBase.ByteReader(binary); ushort lenmountain_amount_score = reader.Read_ushort(); mountain_amount_score = new List <st.net.NetBase.mountain_amount_score>(); for (int i_mountain_amount_score = 0; i_mountain_amount_score < lenmountain_amount_score; i_mountain_amount_score++) { st.net.NetBase.mountain_amount_score listData = new st.net.NetBase.mountain_amount_score(); listData.fromBinary(reader); mountain_amount_score.Add(listData); } }