Beispiel #1
0
        public void AddConstraint(DistanceConstraint distanceConstraint)
        {
            AddConstraintToPoint(distanceConstraint.point1);
            AddConstraintToPoint(distanceConstraint.point2);
            var e = EntityManager.CreateEntity();

            EntityManager.AddComponentData(e, distanceConstraint);
        }
Beispiel #2
0
 public void RemoveConstraint(Entity constraintEntity, DistanceConstraint constraint)
 {
     RemoveConstraintFromPoint(constraint.point1);
     RemoveConstraintFromPoint(constraint.point2);
     EntityManager.DestroyEntity(constraintEntity);
 }