/** * <summary>Add any subclass of LevelThing to the level.</summary> * <param name="thing">The LevelThing to add to the level</param> */ public void Add( LevelThing thing ) { if( thing is LevelVertex ) { AddVertex( thing as LevelVertex ); } else if( thing is LevelPolygon ) { AddPolygon( thing as LevelPolygon ); } else if( thing is LevelObject ) { AddObject( thing as LevelObject ); } }
/** * <summary>Remove any subclass of LevelThing from the level.</summary> * <param name="thing">The LevelThing to remove from the level</param> */ public void Remove( LevelThing thing ) { if( thing is LevelVertex ) { RemoveVertex( thing as LevelVertex ); } else if( thing is LevelPolygon ) { RemovePolygon( thing as LevelPolygon ); } else if( thing is LevelPolygon ) { RemoveObject( thing as LevelObject ); } }
public MoveThingAction( float x0, float y0, float x1, float y1, LevelThing relevantThing ) { this.x0 = x0; this.y0 = y0; this.x1 = x1; this.y1 = y1; this.relevantThing = relevantThing; }