Esempio n. 1
0
        public void RemoveShape(object shape)
        {
            // Below it is important to start with the classes
            // that are of lowest decendants since they will trigger
            // in the base classes otherwise

            if (shape is LfSpriteBox)
            {
                SpriteBoxes.Remove((LfSpriteBox)shape);
            }
            else if (shape is LfSpritePolygon)
            {
                SpritePolygons.Remove((LfSpritePolygon)shape);
            }
            else if (shape is LfDynamicBox)
            {
                DynamicBoxes.Remove((LfDynamicBox)shape);
            }
            else if (shape is LfDynamicCircle)
            {
                DynamicCircles.Remove((LfDynamicCircle)shape);
            }
            else if (shape is LfDynamicPolygon)
            {
                DynamicPolygons.Remove((LfDynamicPolygon)shape);
            }
            else if (shape is LfDynamicBoxedSpritePolygon)
            {
                DynamicBoxedSpritePolygons.Remove((LfDynamicBoxedSpritePolygon)shape);
            }
            else if (shape is LfStaticBox)
            {
                StaticBoxes.Remove((LfStaticBox)shape);
            }
            else if (shape is LfStaticCircle)
            {
                StaticCircles.Remove((LfStaticCircle)shape);
            }
            else if (shape is LfStaticPolygon)
            {
                StaticPolygons.Remove((LfStaticPolygon)shape);
            }
            else if (shape is LfStaticBoxedSpritePolygon)
            {
                StaticBoxedSpritePolygons.Remove((LfStaticBoxedSpritePolygon)shape);
            }
        }
Esempio n. 2
0
 public void RemoveShape(object shape)
 {
     if (shape is LfSpriteBox)
     {
         SpriteBoxes.Remove((LfSpriteBox)shape);
     }
     else if (shape is LfSpritePolygon)
     {
         SpritePolygons.Remove((LfSpritePolygon)shape);
     }
     else if (shape is LfStaticBox)
     {
         StaticBoxes.Remove((LfStaticBox)shape);
     }
     else if (shape is LfStaticCircle)
     {
         StaticCircles.Remove((LfStaticCircle)shape);
     }
     else if (shape is LfStaticPolygon)
     {
         StaticPolygons.Remove((LfStaticPolygon)shape);
     }
     else if (shape is LfDynamicBox)
     {
         DynamicBoxes.Remove((LfDynamicBox)shape);
     }
     else if (shape is LfDynamicCircle)
     {
         DynamicCircles.Remove((LfDynamicCircle)shape);
     }
     else if (shape is LfDynamicPolygon)
     {
         DynamicPolygons.Remove((LfDynamicPolygon)shape);
     }
     else if (shape is LfStaticBoxedSpritePolygon)
     {
         StaticBoxedSpritePolygons.Remove((LfStaticBoxedSpritePolygon)shape);
     }
     else if (shape is LfDynamicBoxedSpritePolygon)
     {
         DynamicBoxedSpritePolygons.Remove((LfDynamicBoxedSpritePolygon)shape);
     }
 }