public void AddConstraint(DistanceConstraint distanceConstraint) { AddConstraintToPoint(distanceConstraint.point1); AddConstraintToPoint(distanceConstraint.point2); var e = EntityManager.CreateEntity(); EntityManager.AddComponentData(e, distanceConstraint); }
public void RemoveConstraint(Entity constraintEntity, DistanceConstraint constraint) { RemoveConstraintFromPoint(constraint.point1); RemoveConstraintFromPoint(constraint.point2); EntityManager.DestroyEntity(constraintEntity); }