public static void DrawPrimitives() { if (ShowGrid) { DbgPrim_Grid.Draw(); } foreach (var p in Primitives) { p.Draw(); } GFX.SpriteBatch.Begin(); if (ShowGrid) { DbgPrim_Grid.LabelDraw(); } foreach (var p in Primitives) { if (ShowPrimitiveNametags) { if (p.Name != null) { DrawTextOn3DLocation(p.Transform.Position, p.Name, p.NameColor, PrimitiveNametagSize, startAndEndSpriteBatchForMe: false); } p.LabelDraw(); } } GFX.SpriteBatch.End(); }
public static void DrawPrimitives() { if (ShowGrid) { DbgPrim_Grid.Draw(); } lock (_lock_primitives) { foreach (var p in GetPrimitivesByDistance()) { p.Draw(); } } GFX.SpriteBatch.Begin(); if (ShowGrid) { DbgPrim_Grid.LabelDraw(); } lock (_lock_primitives) { foreach (var p in GetPrimitivesByDistance()) { if (ShowPrimitiveNametags) { if (p.Name != null && p.EnableNameDraw && DBG.CategoryEnableNameDraw[p.Category] && (p.EnableDraw && DBG.CategoryEnableDraw[p.Category])) { DrawTextOn3DLocation(p.Transform.Position, p.Name.Trim(), p.NameColor, PrimitiveNametagSize, startAndEndSpriteBatchForMe: false); } p.LabelDraw(); } } } GFX.SpriteBatch.End(); }