Debug overlay always rendered regardless of debug status.

This commit is contained in:
2014-06-18 12:04:18 -04:30
parent 8bd799f146
commit a247d24770
3 changed files with 20 additions and 31 deletions

View File

@@ -255,7 +255,6 @@ public class NxtARCore extends Game implements ApplicationEventsListener{
ShaderProgram.pedantic = false; ShaderProgram.pedantic = false;
// Set up the overlay font. // Set up the overlay font.
if(ProjectConstants.DEBUG){
overlayX = -((Gdx.graphics.getWidth() * ProjectConstants.OVERSCAN) / 2) + 10; overlayX = -((Gdx.graphics.getWidth() * ProjectConstants.OVERSCAN) / 2) + 10;
overlayY = ((Gdx.graphics.getHeight() * ProjectConstants.OVERSCAN) / 2) - 10; overlayY = ((Gdx.graphics.getHeight() * ProjectConstants.OVERSCAN) / 2) - 10;
@@ -266,7 +265,6 @@ public class NxtARCore extends Game implements ApplicationEventsListener{
}else{ }else{
font.setScale(2.5f); font.setScale(2.5f);
} }
}
// Start networking. // Start networking.
actionResolver.enableMulticast(); actionResolver.enableMulticast();
@@ -386,7 +384,6 @@ public class NxtARCore extends Game implements ApplicationEventsListener{
} }
// Render the debug overlay. // Render the debug overlay.
if(ProjectConstants.DEBUG){
batch.setProjectionMatrix(pixelPerfectCamera.combined); batch.setProjectionMatrix(pixelPerfectCamera.combined);
batch.begin();{ batch.begin();{
// Draw the FPS overlay. // Draw the FPS overlay.
@@ -397,7 +394,6 @@ public class NxtARCore extends Game implements ApplicationEventsListener{
font.draw(batch, String.format("Device roll: %f", Gdx.input.getRoll()), overlayX, overlayY - (4 * font.getCapHeight()) - 20); font.draw(batch, String.format("Device roll: %f", Gdx.input.getRoll()), overlayX, overlayY - (4 * font.getCapHeight()) - 20);
}batch.end(); }batch.end();
} }
}
/** /**
* <p>Pause a currently running thread. Pausing an already paused thread is a * <p>Pause a currently running thread. Pausing an already paused thread is a
@@ -437,9 +433,7 @@ public class NxtARCore extends Game implements ApplicationEventsListener{
// Dispose graphic objects. // Dispose graphic objects.
fadeTexture.dispose(); fadeTexture.dispose();
batch.dispose(); batch.dispose();
if(ProjectConstants.DEBUG){
font.dispose(); font.dispose();
}
// Dispose screens. // Dispose screens.
for(int i = 0; i < states.length; i++){ for(int i = 0; i < states.length; i++){
@@ -484,8 +478,7 @@ public class NxtARCore extends Game implements ApplicationEventsListener{
;;;;;;;;;;;;;;;;;;*/ ;;;;;;;;;;;;;;;;;;*/
/** /**
* <p>Show a toast message on screen using the O.S. functionality * <p>Show a toast message on screen using the {@link ActionResolver}.</p>
* provider.</p>
* @param msg The message to show. * @param msg The message to show.
* @param longToast True for a lasting toast. False for a short toast. * @param longToast True for a lasting toast. False for a short toast.
*/ */

View File

@@ -111,8 +111,6 @@ public class OuyaMainMenuState extends MainMenuStateBase{
@Override @Override
public boolean buttonDown(Controller controller, int buttonCode){ public boolean buttonDown(Controller controller, int buttonCode){
// TODO: Test this.
if(stateActive){ if(stateActive){
if(buttonCode == Ouya.BUTTON_O){ if(buttonCode == Ouya.BUTTON_O){
Gdx.app.log(TAG, CLASS_NAME + ".buttonDown(): O button pressed."); Gdx.app.log(TAG, CLASS_NAME + ".buttonDown(): O button pressed.");
@@ -148,8 +146,6 @@ public class OuyaMainMenuState extends MainMenuStateBase{
@Override @Override
public boolean buttonUp(Controller controller, int buttonCode){ public boolean buttonUp(Controller controller, int buttonCode){
// TODO: Test this.
if(stateActive){ if(stateActive){
if(buttonCode == Ouya.BUTTON_O){ if(buttonCode == Ouya.BUTTON_O){
Gdx.app.log(TAG, CLASS_NAME + ".buttonDown(): O button released."); Gdx.app.log(TAG, CLASS_NAME + ".buttonDown(): O button released.");

View File

@@ -40,7 +40,7 @@ public abstract class GameSettings{
if(getEntityCreator() == null){ if(getEntityCreator() == null){
entityCreator = new BombGameEntityCreator(); entityCreator = new BombGameEntityCreator();
entityCreator.setWorld(GameSettings.getGameWorld()); entityCreator.setWorld(gameWorld);
entityCreator.setCore(core); entityCreator.setCore(core);
} }