RepeatingBackground and added Entities
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user