Пример #1
0
 public void MergeFrom(TankSync other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.position_ != null)
     {
         if (position_ == null)
         {
             position_ = new global::Pb.Vector();
         }
         Position.MergeFrom(other.Position);
     }
     if (other.rotation_ != null)
     {
         if (rotation_ == null)
         {
             rotation_ = new global::Pb.Vector();
         }
         Rotation.MergeFrom(other.Rotation);
     }
     if (other.turretRotation_ != null)
     {
         if (turretRotation_ == null)
         {
             turretRotation_ = new global::Pb.Vector();
         }
         TurretRotation.MergeFrom(other.TurretRotation);
     }
 }
Пример #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    Id = input.ReadInt32();
                    break;
                }

                case 18: {
                    if (turretRotation_ == null)
                    {
                        turretRotation_ = new global::Pb.Vector();
                    }
                    input.ReadMessage(turretRotation_);
                    break;
                }
                }
            }
        }
Пример #3
0
 public void MergeFrom(ShootSync other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.turretRotation_ != null)
     {
         if (turretRotation_ == null)
         {
             turretRotation_ = new global::Pb.Vector();
         }
         TurretRotation.MergeFrom(other.TurretRotation);
     }
 }