示例#1
0
        /// <summary>
        /// Deserialize the MmMessageTransform
        /// </summary>
        /// <param name="data">Object array representation of a MmMessageTransform</param>
        /// <returns>The index of the next element to be read from data</returns>
        public override int Deserialize(object[] data)
        {
            int index = base.Deserialize(data);

            MmTransform    = new MmTransform();
            index          = MmTransform.Deserialize(data, index);
            LocalTransform = (bool)data[index++];
            return(index);
        }
示例#2
0
        /// <summary>
        /// Deserialize the MmMessageTransformList
        /// </summary>
        /// <param name="data">Object array representation of a MmMessageTransformList</param>
        /// <returns>The index of the next element to be read from data</returns>
        public override int Deserialize(object[] data)
        {
            int index         = base.Deserialize(data);
            int numTransforms = (int)data[index++];

            transforms = new List <MmTransform>();
            for (int i = 0; i < numTransforms; i++)
            {
                MmTransform transform = new MmTransform();
                index = transform.Deserialize(data, index);
                transforms.Add(transform);
            }
            return(index);
        }
示例#3
0
        /// <summary>
        /// Deserialize the message
        /// </summary>
        /// <param name="reader">UNET based deserializer object</param>
        public override void Deserialize(NetworkReader reader)
        {
            base.Deserialize(reader);
            transforms.Clear();

            int transformsCount = reader.ReadInt32();

            for (int i = 0; i < transformsCount; i++)
            {
                MmTransform tempTrans = new MmTransform();
                tempTrans.Deserialize(reader);
                transforms.Add(tempTrans);
            }
        }
示例#4
0
 /// <summary>
 /// Deserialize the message
 /// </summary>
 /// <param name="reader">UNET based deserializer object</param>
 public override void Deserialize(NetworkReader reader)
 {
     base.Deserialize(reader);
     MmTransform.Deserialize(reader);
     LocalTransform = reader.ReadBoolean();
 }
 /// <summary>
 /// Deserialize the message
 /// </summary>
 /// <param name="reader">UNET based deserializer object</param>
 public override void Deserialize(NetworkReader reader)
 {
     base.Deserialize(reader);
     MmTransform.Deserialize(reader);
 }