diff --git a/android/assets/data/jet.png b/android/assets/data/jet.png new file mode 100644 index 0000000..7b261eb Binary files /dev/null and b/android/assets/data/jet.png differ diff --git a/core/src/de/samdev/colorrunner/CRGame.java b/core/src/de/samdev/colorrunner/CRGame.java index 165c432..c650dbb 100644 --- a/core/src/de/samdev/colorrunner/CRGame.java +++ b/core/src/de/samdev/colorrunner/CRGame.java @@ -2,7 +2,7 @@ package de.samdev.colorrunner; import com.badlogic.gdx.Game; -import de.samdev.colorrunner.screens.GameScreen; +import de.samdev.colorrunner.screens.gameScreen.GameScreen; public class CRGame extends Game { diff --git a/core/src/de/samdev/colorrunner/actors/DemoActor.java b/core/src/de/samdev/colorrunner/actors/DemoActor.java index 915a412..e91dfd9 100644 --- a/core/src/de/samdev/colorrunner/actors/DemoActor.java +++ b/core/src/de/samdev/colorrunner/actors/DemoActor.java @@ -17,7 +17,7 @@ public class DemoActor extends Actor { addListener(new InputListener() { @Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { - System.out.println("touch my one more time"); + Gdx.app.log("CRGame", "touch my one more time"); return true; } }); diff --git a/core/src/de/samdev/colorrunner/screens/GameScreen.java b/core/src/de/samdev/colorrunner/screens/gameScreen/GameScreen.java similarity index 53% rename from core/src/de/samdev/colorrunner/screens/GameScreen.java rename to core/src/de/samdev/colorrunner/screens/gameScreen/GameScreen.java index 78095a7..b26ccb2 100644 --- a/core/src/de/samdev/colorrunner/screens/GameScreen.java +++ b/core/src/de/samdev/colorrunner/screens/gameScreen/GameScreen.java @@ -1,18 +1,30 @@ -package de.samdev.colorrunner.screens; +package de.samdev.colorrunner.screens.gameScreen; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.actions.MoveToAction; import com.badlogic.gdx.utils.viewport.ExtendViewport; -public class GameScreen implements Screen { +import de.samdev.colorrunner.actors.DemoActor; +public class GameScreen implements Screen { private Stage stage; public GameScreen() { stage = new Stage(new ExtendViewport(Gdx.graphics.getWidth(),Gdx.graphics.getHeight())); //TODO fix w/h ??? + DemoActor myActor = new DemoActor(); + myActor.setTouchable(Touchable.enabled); + stage.addActor(myActor); + + + MoveToAction moveAction = new MoveToAction(); + moveAction.setPosition(300f, 0f); + moveAction.setDuration(10f); + myActor.addAction(moveAction); } @Override @@ -32,31 +44,27 @@ public class GameScreen implements Screen { @Override public void show() { Gdx.input.setInputProcessor(stage); - + Gdx.app.log("GameScreen", "show called"); } @Override public void hide() { - // TODO Auto-generated method stub - + Gdx.app.log("GameScreen", "hide called"); } @Override public void pause() { - // TODO Auto-generated method stub - + Gdx.app.log("GameScreen", "pause called"); } @Override public void resume() { - // TODO Auto-generated method stub - + Gdx.app.log("GameScreen", "resume called"); } @Override public void dispose() { - // TODO Auto-generated method stub - + Gdx.app.log("GameScreen", "dispose called"); } } diff --git a/desktop/src/de/samdev/colorrunner/desktop/DesktopLauncher.java b/desktop/src/de/samdev/colorrunner/desktop/DesktopLauncher.java index 80705cf..879c233 100644 --- a/desktop/src/de/samdev/colorrunner/desktop/DesktopLauncher.java +++ b/desktop/src/de/samdev/colorrunner/desktop/DesktopLauncher.java @@ -7,6 +7,11 @@ import de.samdev.colorrunner.CRGame; public class DesktopLauncher { public static void main (String[] arg) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); + + config.title = "ColorRunner"; + config.width = 967; + config.height = 544; + new LwjglApplication(new CRGame(), config); } }