Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 5
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);
 }