diff --git a/android/assets/1280x720/star_bg.png b/android/assets/1280x720/star_bg.png new file mode 100755 index 0000000..901c47f Binary files /dev/null and b/android/assets/1280x720/star_bg.png differ diff --git a/android/assets/1280x720/void_circle.png b/android/assets/1280x720/void_circle.png new file mode 100755 index 0000000..7a8ab60 Binary files /dev/null and b/android/assets/1280x720/void_circle.png differ diff --git a/android/assets/1280x800/star_bg.png b/android/assets/1280x800/star_bg.png new file mode 100755 index 0000000..f15b61b Binary files /dev/null and b/android/assets/1280x800/star_bg.png differ diff --git a/android/assets/1280x800/void_circle.png b/android/assets/1280x800/void_circle.png new file mode 100755 index 0000000..735a329 Binary files /dev/null and b/android/assets/1280x800/void_circle.png differ diff --git a/android/assets/1366x768/star_bg.png b/android/assets/1366x768/star_bg.png new file mode 100755 index 0000000..d4a8e1d Binary files /dev/null and b/android/assets/1366x768/star_bg.png differ diff --git a/android/assets/1366x768/void_circle.png b/android/assets/1366x768/void_circle.png new file mode 100755 index 0000000..c7b589c Binary files /dev/null and b/android/assets/1366x768/void_circle.png differ diff --git a/android/assets/1920x1080/star_bg.png b/android/assets/1920x1080/star_bg.png new file mode 100755 index 0000000..8696bc9 Binary files /dev/null and b/android/assets/1920x1080/star_bg.png differ diff --git a/android/assets/1920x1080/void_circle.png b/android/assets/1920x1080/void_circle.png new file mode 100755 index 0000000..54d2100 Binary files /dev/null and b/android/assets/1920x1080/void_circle.png differ diff --git a/android/assets/1920x1200/star_bg.png b/android/assets/1920x1200/star_bg.png new file mode 100755 index 0000000..3642b35 Binary files /dev/null and b/android/assets/1920x1200/star_bg.png differ diff --git a/android/assets/1920x1200/void_circle.png b/android/assets/1920x1200/void_circle.png new file mode 100755 index 0000000..dfdff1f Binary files /dev/null and b/android/assets/1920x1200/void_circle.png differ diff --git a/android/assets/2560x1440/star_bg.png b/android/assets/2560x1440/star_bg.png new file mode 100755 index 0000000..aa3a1e0 Binary files /dev/null and b/android/assets/2560x1440/star_bg.png differ diff --git a/android/assets/2560x1440/void_circle.png b/android/assets/2560x1440/void_circle.png new file mode 100755 index 0000000..b8f1a7b Binary files /dev/null and b/android/assets/2560x1440/void_circle.png differ diff --git a/android/assets/3840x2160/star_bg.png b/android/assets/3840x2160/star_bg.png new file mode 100755 index 0000000..4f90819 Binary files /dev/null and b/android/assets/3840x2160/star_bg.png differ diff --git a/android/assets/3840x2160/void_circle.png b/android/assets/3840x2160/void_circle.png new file mode 100755 index 0000000..90fb880 Binary files /dev/null and b/android/assets/3840x2160/void_circle.png differ diff --git a/android/assets/800x480/star_bg.png b/android/assets/800x480/star_bg.png new file mode 100755 index 0000000..cc01f4c Binary files /dev/null and b/android/assets/800x480/star_bg.png differ diff --git a/android/assets/800x480/void_circle.png b/android/assets/800x480/void_circle.png new file mode 100755 index 0000000..92c26db Binary files /dev/null and b/android/assets/800x480/void_circle.png differ diff --git a/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java b/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java index 626a767..b3f4dab 100755 --- a/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java +++ b/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java @@ -3,10 +3,8 @@ package zero1hd.polyjet.ui.stages; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; import com.badlogic.gdx.assets.AssetManager; -import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.glutils.ShaderProgram; -import com.badlogic.gdx.graphics.glutils.ShapeRenderer; -import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.utils.viewport.FitViewport; @@ -37,10 +35,15 @@ public class GamePlayArea extends Stage { private Vector2 resolution; private float timePassed; + + private Texture background; + public GamePlayArea(AssetManager assetManager, Preferences prefs) { super(new FitViewport(Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT)); Gdx.app.debug("Game Area", "new area created"); + background = assetManager.get("star_bg.png"); + polyjet = new PolyJetEntity(assetManager, 25f, 25f, "standard"); ec = new EntityController(assetManager); collisionDetector = new CollisionDetector(ec.activeAllies, ec.activeEnemies); @@ -91,6 +94,14 @@ public class GamePlayArea extends Stage { @Override public void draw() { //TODO batch draw background + if (bgShader != null) { + getBatch().setShader(bgShader); + } + getBatch().begin(); + getBatch().draw(background, 0f, 0f, Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT); + getBatch().end(); + + getBatch().setShader(null); super.draw(); }