public static void renderAll(GTA.Graphics g) { foreach (var view in ViewsPool) { if (view.currentInterpolatorX != null && view.currentInterpolatorX.HasStarted) // those conditonals actually make sense { if (view.currentInterpolatorX.HasEnded && !view.currentInterpolatorX.HasStarted) { view.currentInterpolatorX = null; } else { view.position.X = view.currentInterpolatorX.Current; } } if (view.currentInterpolatorY != null && view.currentInterpolatorY.HasStarted) { if (view.currentInterpolatorY.HasEnded && !view.currentInterpolatorY.HasStarted) { view.currentInterpolatorY = null; } else { view.position.Y = view.currentInterpolatorY.Current; } } view.render(g); } }
protected override void render(GTA.Graphics g) { g.DrawRectangle(Box, color); }
protected abstract void render(GTA.Graphics g);
protected override void render(GTA.Graphics g) { g.DrawLine(start, end, width, color); }