diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-09-13 18:55:07 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-09-13 18:55:07 +0200 |
commit | 7eb1beae9fd79a07783bd850a5d739a9813797dc (patch) | |
tree | 0cac63174a7d3b4e8de54b2ec457957918c0608e /core | |
parent | f3eed35487ae3049bde27d3a20fd36a34cef9469 (diff) | |
download | gdx-boardgame-7eb1beae9fd79a07783bd850a5d739a9813797dc.zip gdx-boardgame-7eb1beae9fd79a07783bd850a5d739a9813797dc.tar.gz |
ZProject -> GdxBoardTest
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/zproject/Assets.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/zproject/GameBoard.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/zproject/GameHud.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/zproject/GameScreen.java | 22 | ||||
-rw-r--r-- | core/src/ch/asynk/zproject/GdxBoardTest.java (renamed from core/src/ch/asynk/zproject/ZProject.java) | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/zproject/LoadingScreen.java | 26 |
6 files changed, 30 insertions, 30 deletions
diff --git a/core/src/ch/asynk/zproject/Assets.java b/core/src/ch/asynk/zproject/Assets.java index 2cff430..3673bf4 100644 --- a/core/src/ch/asynk/zproject/Assets.java +++ b/core/src/ch/asynk/zproject/Assets.java @@ -41,7 +41,7 @@ public class Assets extends ch.asynk.gdx.board.engine.Assets @Override public void dispose() { - ZProject.debug("diagnostics:\n" + getDiagnostics() ); + GdxBoardTest.debug("diagnostics:\n" + getDiagnostics() ); clear(); super.dispose(); } diff --git a/core/src/ch/asynk/zproject/GameBoard.java b/core/src/ch/asynk/zproject/GameBoard.java index 489e00d..b6f2331 100644 --- a/core/src/ch/asynk/zproject/GameBoard.java +++ b/core/src/ch/asynk/zproject/GameBoard.java @@ -38,9 +38,9 @@ public class GameBoard implements Disposable, Touchable @Override public boolean touch(float x, float y) { board.toBoard(x, y, v); - ZProject.debug("BoardGame", String.format("touchDown [%d;%d] => [%d;%d]", (int)x, (int)y, (int)v.x, (int)v.y)); + GdxBoardTest.debug("BoardGame", String.format("touchDown [%d;%d] => [%d;%d]", (int)x, (int)y, (int)v.x, (int)v.y)); board.centerOf((int)v.x, (int)v.y, v); - ZProject.debug("BoardGame", String.format(" => [%d;%d]", (int)v.x, (int)v.y)); + GdxBoardTest.debug("BoardGame", String.format(" => [%d;%d]", (int)v.x, (int)v.y)); return true; } diff --git a/core/src/ch/asynk/zproject/GameHud.java b/core/src/ch/asynk/zproject/GameHud.java index a28f4ea..62a1046 100644 --- a/core/src/ch/asynk/zproject/GameHud.java +++ b/core/src/ch/asynk/zproject/GameHud.java @@ -50,7 +50,7 @@ public class GameHud implements Disposable, Touchable @Override public boolean touch(float x, float y) { if (root.touch(x, y)) { - ZProject.debug("GameHud", String.format("touchDown : %f %f", x, y)); + GdxBoardTest.debug("GameHud", String.format("touchDown : %f %f", x, y)); if (root.touched() == this.next) onNext(); return true; diff --git a/core/src/ch/asynk/zproject/GameScreen.java b/core/src/ch/asynk/zproject/GameScreen.java index e3cc255..4be7fae 100644 --- a/core/src/ch/asynk/zproject/GameScreen.java +++ b/core/src/ch/asynk/zproject/GameScreen.java @@ -23,7 +23,7 @@ public class GameScreen implements Screen private static final boolean DEBUG = true; - private final ZProject zproject; + private final GdxBoardTest app; private final GameHud hud; private final GameBoard board; private final Camera camera; @@ -59,11 +59,11 @@ public class GameScreen implements Screen } private State state; - public GameScreen(final ZProject zproject) + public GameScreen(final GdxBoardTest app) { - this.zproject = zproject; - this.hud = new GameHud(zproject.assets, State.UI, () -> nextState()); - this.board = new GameBoard(zproject.assets); + this.app = app; + this.hud = new GameHud(app.assets, State.UI, () -> nextState()); + this.board = new GameBoard(app.assets); this.batch = new SpriteBatch(); this.camera = new Camera(10, board.getWidth(), board.getHeight(), 1.0f, 0.3f, false); Gdx.input.setInputProcessor(getMultiplexer(this)); @@ -122,14 +122,14 @@ public class GameScreen implements Screen @Override public void resize(int width, int height) { if (paused) return; - ZProject.debug("GameScreen", String.format("resize (%d,%d)",width, height)); + GdxBoardTest.debug("GameScreen", String.format("resize (%d,%d)",width, height)); camera.updateViewport(width, height); hud.resize(camera.getHud().width, camera.getHud().height); } @Override public void dispose() { - ZProject.debug("GameScreen", "dispose()"); + GdxBoardTest.debug("GameScreen", "dispose()"); batch.dispose(); if (debugShapes != null) debugShapes.dispose(); hud.dispose(); @@ -138,23 +138,23 @@ public class GameScreen implements Screen @Override public void show() { - ZProject.debug("GameScreen", "show()"); + GdxBoardTest.debug("GameScreen", "show()"); } @Override public void hide() { - ZProject.debug("GameScreen", "hide()"); + GdxBoardTest.debug("GameScreen", "hide()"); } @Override public void pause() { - ZProject.debug("pause() "); + GdxBoardTest.debug("pause() "); paused = true; } @Override public void resume() { - ZProject.debug("resume() "); + GdxBoardTest.debug("resume() "); paused = false; resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } diff --git a/core/src/ch/asynk/zproject/ZProject.java b/core/src/ch/asynk/zproject/GdxBoardTest.java index 8f1ff0d..43ff6aa 100644 --- a/core/src/ch/asynk/zproject/ZProject.java +++ b/core/src/ch/asynk/zproject/GdxBoardTest.java @@ -4,9 +4,9 @@ import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; -public class ZProject extends Game +public class GdxBoardTest extends Game { - public static final String DOM = "ZProject"; + public static final String DOM = "GdxBoardTest"; private enum State { diff --git a/core/src/ch/asynk/zproject/LoadingScreen.java b/core/src/ch/asynk/zproject/LoadingScreen.java index 6fe3996..00c41c9 100644 --- a/core/src/ch/asynk/zproject/LoadingScreen.java +++ b/core/src/ch/asynk/zproject/LoadingScreen.java @@ -11,7 +11,7 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion; public class LoadingScreen implements Screen { - private final ZProject zproject; + private final GdxBoardTest app; private final SpriteBatch batch; private final Color c; private final OrthographicCamera camera; @@ -38,9 +38,9 @@ public class LoadingScreen implements Screen } private LoadAction onLoaded; - public LoadingScreen(final ZProject zproject, LoadAction startLoading, LoadAction onLoaded) + public LoadingScreen(final GdxBoardTest app, LoadAction startLoading, LoadAction onLoaded) { - this.zproject = zproject; + this.app = app; this.onLoaded = onLoaded; this.batch = new SpriteBatch(); this.c = batch.getColor(); @@ -50,7 +50,7 @@ public class LoadingScreen implements Screen this.camera.setToOrtho(false, w, h); this.camera.update(); this.paused = false; - atlas = zproject.assets.getAtlas(zproject.assets.LOADING); + atlas = app.assets.getAtlas(app.assets.LOADING); bar = atlas.findRegion("bar"); border = atlas.findRegion("border"); loading = atlas.findRegion("loading"); @@ -74,12 +74,12 @@ public class LoadingScreen implements Screen if (paused) return; if (!isLoaded) { - if (zproject.assets.update()) { - ZProject.debug("LoadingScreen", "assets loaded"); + if (app.assets.update()) { + GdxBoardTest.debug("LoadingScreen", "assets loaded"); isLoaded = true; percent = 1f; } else { - percent = zproject.assets.getProgress(); + percent = app.assets.getProgress(); } } @@ -129,7 +129,7 @@ public class LoadingScreen implements Screen @Override public void resize(int width, int height) { if (paused) return; - ZProject.debug("LoadingScreen", String.format("resize (%d,%d)",width, height)); + GdxBoardTest.debug("LoadingScreen", String.format("resize (%d,%d)",width, height)); this.camera.setToOrtho(false, width, height); this.camera.update(); computeCoords(width, height); @@ -137,29 +137,29 @@ public class LoadingScreen implements Screen @Override public void dispose() { - ZProject.debug("LoadingScreen", "dispose()"); + GdxBoardTest.debug("LoadingScreen", "dispose()"); batch.dispose(); } @Override public void show() { - ZProject.debug("LoadingScreen", "show()"); + GdxBoardTest.debug("LoadingScreen", "show()"); } @Override public void hide() { - ZProject.debug("LoadingScreen", "hide()"); + GdxBoardTest.debug("LoadingScreen", "hide()"); } @Override public void pause() { paused = true; - ZProject.debug("pause() "); + GdxBoardTest.debug("pause() "); } @Override public void resume() { - ZProject.debug("resume() "); + GdxBoardTest.debug("resume() "); resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); paused = false; } |