CannonShooter/core/src/de/samdev/cannonshooter/CannonGame.java

35 lines
1.1 KiB
Java
Raw Normal View History

2015-04-10 13:57:40 +02:00
package de.samdev.cannonshooter;
2015-08-29 12:18:10 +02:00
import com.badlogic.gdx.Gdx;
2015-09-14 16:40:30 +02:00
import com.badlogic.gdx.Input.Keys;
2015-08-29 12:18:10 +02:00
import com.badlogic.gdx.graphics.g2d.BitmapFont;
2015-04-10 14:10:32 +02:00
import de.samdev.absgdx.framework.AgdxGame;
2015-08-29 12:18:10 +02:00
import de.samdev.cannonshooter.level.StandardLevel;
2015-04-10 14:10:32 +02:00
public class CannonGame extends AgdxGame {
2015-04-10 13:57:40 +02:00
@Override
2015-04-10 14:10:32 +02:00
public void onCreate() {
2015-08-29 12:18:10 +02:00
Textures.init();
2015-09-14 16:40:30 +02:00
setLayer(new StandardLevel(this));
2015-04-10 14:10:32 +02:00
2015-08-29 12:18:10 +02:00
setDebugFont(new BitmapFont(Gdx.files.internal("consolefont.fnt")));
2015-09-14 16:40:30 +02:00
settings.debugVisualMenu.set(false);
settings.debugMenuLayerTextInfos.set(false);
settings.debugEnabled.set(true);
2015-04-10 13:57:40 +02:00
}
@Override
2015-09-14 16:40:30 +02:00
public void onUpdate(float delta) {
if (Gdx.input.isKeyJustPressed(Keys.F1)) settings.debugEnabled.doSwitch();
if (Gdx.input.isKeyJustPressed(Keys.F2)) settings.debugVisualEntities.doSwitch();
if (Gdx.input.isKeyJustPressed(Keys.F3)) settings.debugVisualMap.doSwitch();
if (Gdx.input.isKeyJustPressed(Keys.F4)) settings.debugVisualMenu.doSwitch();
if (Gdx.input.isKeyJustPressed(Keys.F5)) settings.debugTextInfos.doSwitch();
if (Gdx.input.isKeyJustPressed(Keys.F6)) settings.debugEntitiesPhysicVectors.doSwitch();
2015-04-10 13:57:40 +02:00
}
}