Exemplo n.º 1
0
 private void TestMovingEntitiesAlsoMovesShapes()
 {
     MoveToLayerEntityInstance.MoveToLayer(Layer2D);
     if (Layer2D.Circles.Contains(MoveToLayerEntityInstance.CircleInstance) == false)
     {
         throw new Exception("Circles on entities are not moved to a layer when calling MoveToLayer");
     }
 }
Exemplo n.º 2
0
        private void TestAddedToLayerInvisibleShapesStayInvisible()
        {
            MoveToLayerEntityInstance.MoveToLayer(Layer3DIndependentOfCamera);

            if (MoveToLayerEntityInstance.InvisibleCircle.Visible)
            {
                throw new Exception("Moving an entity with an invisible circle makes it visible.");
            }
            if (MoveToLayerEntityInstance.InvisibleAxisAlignedRectangleInstance.Visible)
            {
                throw new Exception("Moving an entity with an invisible AxisAlignedRectangle makes it visible.");
            }
            if (MoveToLayerEntityInstance.InvisiblePolygonInstance.Visible)
            {
                throw new Exception("Moving an entity with an invisible Polygon makes it visible.");
            }
        }