Пример #1
0
        public ShapeCollision clone()
        {
            var clone = new ShapeCollision();

            clone.copy_from(this);

            return(clone);
        }
Пример #2
0
 public void copy_from(ShapeCollision other)
 {
     overlap          = other.overlap;
     separationX      = other.separationX;
     separationY      = other.separationY;
     unitVectorX      = other.unitVectorX;
     unitVectorY      = other.unitVectorY;
     otherOverlap     = other.otherOverlap;
     otherSeparationX = other.otherSeparationX;
     otherSeparationY = other.otherSeparationY;
     otherUnitVectorX = other.otherUnitVectorX;
     otherUnitVectorY = other.otherUnitVectorY;
     shape1           = other.shape1;
     shape2           = other.shape2;
 }