public void Remove(Entity entity)
{
if (!entities.Contains(entity))
return;
entities.Remove(entity);
if (entity is WallModelEntity)
{
WallModelEntity wallentity = entity as WallModelEntity;
physics.Remove(wallentity.body);
}
if (entity is Bubble)
{
Bubble bubble = entity as Bubble;
physics.Remove(bubble.body);
}
if (entity is Enemy)
{
Enemy enemy = entity as Enemy;
physics.Remove(enemy.body);
}
}