private void DrawGameObject(GameObject g, SpriteBatchHolder spriteBatches)
        {
            //Draw the game object
            g.Draw(spriteBatches);

            //Draw the IXDrawable
            if (g is IXDrawable)
            {
                IXDrawable gd = (IXDrawable)g;
                if (gd.Sprite != null)
                {
                    spriteBatches[gd.DrawMode].Draw(gd.Sprite, gd.Position, gd.SourceRectangle, gd.DrawColor, gd.Rotation, gd.Origin, gd.Scale, gd.Effects, gd.Depth);
                }
            }

            //Draw each child
            foreach (GameObject child in g)
            {
                DrawGameObject(child, spriteBatches);
            }
        }
 //Drawing
 public static void Draw(this SpriteBatch s, IXDrawable d)
 {
     //Draw an IXDrawable
     s.Draw(d.Sprite, d.Position, d.SourceRectangle, d.DrawColor, d.Rotation, d.Origin, d.Scale, d.Effects, d.Depth);
 }