public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        ushort lenactivity_list = (ushort)activity_list.Count;

        writer.write_short(lenactivity_list);
        for (int i_activity_list = 0; i_activity_list < lenactivity_list; i_activity_list++)
        {
            st.net.NetBase.activity_list listData = activity_list[i_activity_list];
            listData.toBinary(writer);
        }
        return(writer.data);
    }
    public override void fromBinary(byte[] binary)
    {
        reader = new st.net.NetBase.ByteReader(binary);
        ushort lenactivity_list = reader.Read_ushort();

        activity_list = new List <st.net.NetBase.activity_list>();
        for (int i_activity_list = 0; i_activity_list < lenactivity_list; i_activity_list++)
        {
            st.net.NetBase.activity_list listData = new st.net.NetBase.activity_list();
            listData.fromBinary(reader);
            activity_list.Add(listData);
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 更新
    /// </summary>
    public void Update(st.net.NetBase.activity_list _data)
    {
        id  = _data.id;
        num = _data.challenge_num;
//		Debug.Log("name   =  "+RefData.name +"   次数    =" + num);
    }
Ejemplo n.º 4
0
 /// <summary>
 /// 构造
 /// </summary>
 public ActivityDataInfo(st.net.NetBase.activity_list _data)
 {
     Update(_data);
     StateUpdateTime();
 }