示例#1
0
 AttachmentDirection ReverseDirection(AttachmentDirection direction)
 {
     if (direction == AttachmentDirection.InAttach)
     {
         return(AttachmentDirection.OutAttach);
     }
     return(AttachmentDirection.InAttach);
 }
 // This is mainly used to find the "root" objects we can start with
 public bool HasAttachmentKindAndDirection(AttachmentKind kind, AttachmentDirection direction)
 {
     foreach (StructureAttachmentPoint inAttachPoint in this.GetComponentsInChildren <StructureAttachmentPoint>())
     {
         if (((inAttachPoint.Kind & kind) != 0) && (inAttachPoint.Direction == direction))
         {
             return(true);
         }
     }
     return(false);
 }