added new textures and made progress on shaders
BIN
android/assets/1280x720/star_bg.png
Executable file
After Width: | Height: | Size: 543 KiB |
BIN
android/assets/1280x720/void_circle.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
android/assets/1280x800/star_bg.png
Executable file
After Width: | Height: | Size: 734 KiB |
BIN
android/assets/1280x800/void_circle.png
Executable file
After Width: | Height: | Size: 3.5 KiB |
BIN
android/assets/1366x768/star_bg.png
Executable file
After Width: | Height: | Size: 694 KiB |
BIN
android/assets/1366x768/void_circle.png
Executable file
After Width: | Height: | Size: 3.3 KiB |
BIN
android/assets/1920x1080/star_bg.png
Executable file
After Width: | Height: | Size: 938 KiB |
BIN
android/assets/1920x1080/void_circle.png
Executable file
After Width: | Height: | Size: 4.8 KiB |
BIN
android/assets/1920x1200/star_bg.png
Executable file
After Width: | Height: | Size: 1.2 MiB |
BIN
android/assets/1920x1200/void_circle.png
Executable file
After Width: | Height: | Size: 6.0 KiB |
BIN
android/assets/2560x1440/star_bg.png
Executable file
After Width: | Height: | Size: 1.4 MiB |
BIN
android/assets/2560x1440/void_circle.png
Executable file
After Width: | Height: | Size: 7.1 KiB |
BIN
android/assets/3840x2160/star_bg.png
Executable file
After Width: | Height: | Size: 2.7 MiB |
BIN
android/assets/3840x2160/void_circle.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
android/assets/800x480/star_bg.png
Executable file
After Width: | Height: | Size: 328 KiB |
BIN
android/assets/800x480/void_circle.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
@ -3,10 +3,8 @@ package zero1hd.polyjet.ui.stages;
|
|||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Preferences;
|
import com.badlogic.gdx.Preferences;
|
||||||
import com.badlogic.gdx.assets.AssetManager;
|
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.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.math.Vector2;
|
||||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
@ -37,10 +35,15 @@ public class GamePlayArea extends Stage {
|
|||||||
private Vector2 resolution;
|
private Vector2 resolution;
|
||||||
|
|
||||||
private float timePassed;
|
private float timePassed;
|
||||||
|
|
||||||
|
private Texture background;
|
||||||
|
|
||||||
public GamePlayArea(AssetManager assetManager, Preferences prefs) {
|
public GamePlayArea(AssetManager assetManager, Preferences prefs) {
|
||||||
super(new FitViewport(Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT));
|
super(new FitViewport(Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT));
|
||||||
Gdx.app.debug("Game Area", "new area created");
|
Gdx.app.debug("Game Area", "new area created");
|
||||||
|
|
||||||
|
background = assetManager.get("star_bg.png");
|
||||||
|
|
||||||
polyjet = new PolyJetEntity(assetManager, 25f, 25f, "standard");
|
polyjet = new PolyJetEntity(assetManager, 25f, 25f, "standard");
|
||||||
ec = new EntityController(assetManager);
|
ec = new EntityController(assetManager);
|
||||||
collisionDetector = new CollisionDetector(ec.activeAllies, ec.activeEnemies);
|
collisionDetector = new CollisionDetector(ec.activeAllies, ec.activeEnemies);
|
||||||
@ -91,6 +94,14 @@ public class GamePlayArea extends Stage {
|
|||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
//TODO batch draw background
|
//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();
|
super.draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|