コード例 #1
0
ファイル: MCollider.cs プロジェクト: dr-iskandar/MOSIM_Core
        public override string ToString()
        {
            StringBuilder __sb = new StringBuilder("MCollider(");

            __sb.Append(", ID: ");
            __sb.Append(ID);
            __sb.Append(", Type: ");
            __sb.Append(Type);
            if (BoxColliderProperties != null && __isset.BoxColliderProperties)
            {
                __sb.Append(", BoxColliderProperties: ");
                __sb.Append(BoxColliderProperties == null ? "<null>" : BoxColliderProperties.ToString());
            }
            if (SphereColliderProperties != null && __isset.SphereColliderProperties)
            {
                __sb.Append(", SphereColliderProperties: ");
                __sb.Append(SphereColliderProperties == null ? "<null>" : SphereColliderProperties.ToString());
            }
            if (CapsuleColliderProperties != null && __isset.CapsuleColliderProperties)
            {
                __sb.Append(", CapsuleColliderProperties: ");
                __sb.Append(CapsuleColliderProperties == null ? "<null>" : CapsuleColliderProperties.ToString());
            }
            if (ConeColliderProperties != null && __isset.ConeColliderProperties)
            {
                __sb.Append(", ConeColliderProperties: ");
                __sb.Append(ConeColliderProperties == null ? "<null>" : ConeColliderProperties.ToString());
            }
            if (CylinderColliderProperties != null && __isset.CylinderColliderProperties)
            {
                __sb.Append(", CylinderColliderProperties: ");
                __sb.Append(CylinderColliderProperties == null ? "<null>" : CylinderColliderProperties.ToString());
            }
            if (MeshColliderProperties != null && __isset.MeshColliderProperties)
            {
                __sb.Append(", MeshColliderProperties: ");
                __sb.Append(MeshColliderProperties == null ? "<null>" : MeshColliderProperties.ToString());
            }
            if (PositionOffset != null && __isset.PositionOffset)
            {
                __sb.Append(", PositionOffset: ");
                __sb.Append(PositionOffset == null ? "<null>" : PositionOffset.ToString());
            }
            if (RotationOffset != null && __isset.RotationOffset)
            {
                __sb.Append(", RotationOffset: ");
                __sb.Append(RotationOffset == null ? "<null>" : RotationOffset.ToString());
            }
            if (Colliders != null && __isset.Colliders)
            {
                __sb.Append(", Colliders: ");
                __sb.Append(Colliders);
            }
            if (Properties != null && __isset.Properties)
            {
                __sb.Append(", Properties: ");
                __sb.Append(Properties);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
コード例 #2
0
ファイル: MCollider.cs プロジェクト: dr-iskandar/MOSIM_Core
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("MCollider");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (ID == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field ID not set");
         }
         field.Name = "ID";
         field.Type = TType.String;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         oprot.WriteString(ID);
         oprot.WriteFieldEnd();
         field.Name = "Type";
         field.Type = TType.I32;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         oprot.WriteI32((int)Type);
         oprot.WriteFieldEnd();
         if (BoxColliderProperties != null && __isset.BoxColliderProperties)
         {
             field.Name = "BoxColliderProperties";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             BoxColliderProperties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (SphereColliderProperties != null && __isset.SphereColliderProperties)
         {
             field.Name = "SphereColliderProperties";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             SphereColliderProperties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (CapsuleColliderProperties != null && __isset.CapsuleColliderProperties)
         {
             field.Name = "CapsuleColliderProperties";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             CapsuleColliderProperties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ConeColliderProperties != null && __isset.ConeColliderProperties)
         {
             field.Name = "ConeColliderProperties";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             ConeColliderProperties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (CylinderColliderProperties != null && __isset.CylinderColliderProperties)
         {
             field.Name = "CylinderColliderProperties";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             CylinderColliderProperties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (MeshColliderProperties != null && __isset.MeshColliderProperties)
         {
             field.Name = "MeshColliderProperties";
             field.Type = TType.Struct;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             MeshColliderProperties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (PositionOffset != null && __isset.PositionOffset)
         {
             field.Name = "PositionOffset";
             field.Type = TType.Struct;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             PositionOffset.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (RotationOffset != null && __isset.RotationOffset)
         {
             field.Name = "RotationOffset";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             RotationOffset.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Colliders != null && __isset.Colliders)
         {
             field.Name = "Colliders";
             field.Type = TType.List;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, Colliders.Count));
                 foreach (MCollider _iter111 in Colliders)
                 {
                     _iter111.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (Properties != null && __isset.Properties)
         {
             field.Name = "Properties";
             field.Type = TType.Map;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteMapBegin(new TMap(TType.String, TType.String, Properties.Count));
                 foreach (string _iter112 in Properties.Keys)
                 {
                     oprot.WriteString(_iter112);
                     oprot.WriteString(Properties[_iter112]);
                 }
                 oprot.WriteMapEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }