RepeatingBackground and added Entities

This commit is contained in:
2015-09-14 16:40:30 +02:00
parent 9dc0b6c617
commit 34fe132efa
8 changed files with 165 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
package de.samdev.cannonshooter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import de.samdev.absgdx.framework.AgdxGame;
@@ -12,14 +13,22 @@ public class CannonGame extends AgdxGame {
public void onCreate() {
Textures.init();
pushLayer(new StandardLevel(this));
setLayer(new StandardLevel(this));
setDebugFont(new BitmapFont(Gdx.files.internal("consolefont.fnt")));
settings.debugVisualMenu.set(false);
settings.debugMenuLayerTextInfos.set(false);
settings.debugEnabled.set(true);
}
@Override
public void onUpdate(float arg0) {
// TODO Auto-generated method stub
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();
}
}