public void DisableCmpPart(string part)
 {
     if (RigidModel != null && RigidModel.Parts.TryGetValue(part, out var p))
     {
         p.Active = false;
         PhysicsComponent.DisablePart(p);
     }
 }
Ejemplo n.º 2
0
 public void DisableCmpPart(string part)
 {
     if (CmpParts == null)
     {
         return;
     }
     for (int i = 0; i < CmpParts.Count; i++)
     {
         if (CmpParts[i].ObjectName.Equals(part, StringComparison.OrdinalIgnoreCase))
         {
             PhysicsComponent.DisablePart(CmpParts[i]);
             CmpParts.RemoveAt(i);
             return;
         }
     }
 }