From 0da61332391cf1dc9a073241a5a13e2d3bde8c4e Mon Sep 17 00:00:00 2001 From: Marcus Gosselin Date: Sun, 16 Nov 2014 06:35:43 -0800 Subject: [PATCH] debug level --- src/MAndEngine/Engine.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/MAndEngine/Engine.java b/src/MAndEngine/Engine.java index 416ad01..9e5c917 100644 --- a/src/MAndEngine/Engine.java +++ b/src/MAndEngine/Engine.java @@ -122,6 +122,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener, /** * SOMETHING NEW I JUST DID NOW GUISE! + * TODO properly document this? */ private static BufferedImage buffer; private static Graphics2D g2; @@ -132,8 +133,14 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener, */ private static Engine staticMain; + /** + * debug level. + */ + public static int debug = 0; + /** * SRSLY CALL DYS ONCE. DAS IT. ALL YOU GET. ONE SHOT. + * because this is a static engine, yeah */ public Engine(String[] classes, boolean showLoading) { @@ -340,7 +347,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener, g.setColor(Color.WHITE); // show fps if debug level high enough - g.drawString("FPS: " + FPS, 20, 20); + if(debug > 0) g.drawString("FPS: " + FPS, 20, 20); if (overclock) g.drawString("Overclocking!", 20, 35); g.setColor(Color.RED);