fixed void circle entity and debug screen stuff
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
@ -129,7 +129,7 @@ public class Polyjet extends Game {
|
|||||||
assetManager.load("bar.png", Texture.class);
|
assetManager.load("bar.png", Texture.class);
|
||||||
assetManager.load("flake.png", Texture.class);
|
assetManager.load("flake.png", Texture.class);
|
||||||
assetManager.load("star_bg.png", Texture.class);
|
assetManager.load("star_bg.png", Texture.class);
|
||||||
// assetManager.load("");
|
assetManager.load("void_circle.png", Texture.class);
|
||||||
}
|
}
|
||||||
public void generateFonts() {
|
public void generateFonts() {
|
||||||
initComplete = true;
|
initComplete = true;
|
||||||
|
@ -56,7 +56,6 @@ public class AudioAnalyzer {
|
|||||||
public AudioAnalyzer() {
|
public AudioAnalyzer() {
|
||||||
sender = new MiniSender();
|
sender = new MiniSender();
|
||||||
|
|
||||||
|
|
||||||
analysisAlgorithm = new Runnable() {
|
analysisAlgorithm = new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -359,4 +358,12 @@ public class AudioAnalyzer {
|
|||||||
public float getsecondsPerWindow() {
|
public float getsecondsPerWindow() {
|
||||||
return secondsPerWindow;
|
return secondsPerWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getBassAvg() {
|
||||||
|
return bassAvg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getUmAvg() {
|
||||||
|
return umAvg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package zero1hd.polyjet.entity.ally;
|
package zero1hd.polyjet.entity.ally;
|
||||||
|
|
||||||
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.Texture;
|
||||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||||
import com.badlogic.gdx.graphics.g2d.ParticleEffect;
|
import com.badlogic.gdx.graphics.g2d.ParticleEffect;
|
||||||
|
@ -41,8 +41,13 @@ public VoidCircle(Texture voidTexture) {
|
|||||||
@Override
|
@Override
|
||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
toFront();
|
toFront();
|
||||||
voidCircleTexture.setCenter(getX()+center.x, getY()+center.y);
|
if (begin) {
|
||||||
hitBox.setCenter(getX()+center.x, getY()+center.y);
|
voidCircleTexture.setSize(2*currentRadius, 2*currentRadius);
|
||||||
|
voidCircleTexture.setColor(0f,0f,0f,1f);
|
||||||
|
} else {
|
||||||
|
voidCircleTexture.setSize(2*endRadius, 2*endRadius);
|
||||||
|
voidCircleTexture.setColor(1f,1f,1f,0.1f);
|
||||||
|
} hitBox.setCenter(getX()+center.x, getY()+center.y);
|
||||||
|
|
||||||
if (timer > 0) {
|
if (timer > 0) {
|
||||||
timer -= delta;
|
timer -= delta;
|
||||||
@ -59,21 +64,14 @@ public VoidCircle(Texture voidTexture) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
voidCircleTexture.setCenter(getX()+center.x, getY()+center.y);
|
||||||
super.act(delta);
|
super.act(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Batch batch, float parentAlpha) {
|
public void draw(Batch batch, float parentAlpha) {
|
||||||
if (begin) {
|
|
||||||
voidCircleTexture.setSize(2*currentRadius, 2*currentRadius);
|
|
||||||
voidCircleTexture.setCenter(getX()+center.x, getY()+center.y);
|
|
||||||
} else {
|
|
||||||
voidCircleTexture.setSize(2*endRadius, 2*endRadius);
|
|
||||||
voidCircleTexture.setColor(1f,0f,0f,0.5f);
|
|
||||||
voidCircleTexture.draw(batch);
|
voidCircleTexture.draw(batch);
|
||||||
}
|
|
||||||
|
|
||||||
batch.setColor(Color.WHITE);
|
batch.setColor(Color.WHITE);
|
||||||
super.draw(batch, parentAlpha);
|
super.draw(batch, parentAlpha);
|
||||||
}
|
}
|
||||||
@ -90,6 +88,7 @@ public VoidCircle(Texture voidTexture) {
|
|||||||
center.set(0, 0);
|
center.set(0, 0);
|
||||||
voidCircleTexture.setPosition(0, 0);
|
voidCircleTexture.setPosition(0, 0);
|
||||||
setSize(0, 0);
|
setSize(0, 0);
|
||||||
|
setPosition(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void growCurrentRadius(float radius) {
|
public void growCurrentRadius(float radius) {
|
||||||
|
@ -63,7 +63,7 @@ public class CreativeStage extends Stage implements MiniListener {
|
|||||||
addActor(backButton);
|
addActor(backButton);
|
||||||
|
|
||||||
|
|
||||||
toolbox = new Window("Tools", core.getDefaultSkin());
|
toolbox = new Window("Tools", core.getDefaultSkin(), "tinted");
|
||||||
toolbox.defaults().pad(5f);
|
toolbox.defaults().pad(5f);
|
||||||
|
|
||||||
Table toolboxToolSet = new Table(core.getDefaultSkin());
|
Table toolboxToolSet = new Table(core.getDefaultSkin());
|
||||||
|
@ -54,7 +54,7 @@ public class GamePlayArea extends Stage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* needs to be called right after set (should be called in show method).
|
* needs to be called right after set as screen (should be called in show method).
|
||||||
* @param prefs
|
* @param prefs
|
||||||
*/
|
*/
|
||||||
public void loadShaders(Preferences prefs) {
|
public void loadShaders(Preferences prefs) {
|
||||||
@ -106,6 +106,8 @@ public class GamePlayArea extends Stage {
|
|||||||
getBatch().draw(background, 0f, 0f, Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT);
|
getBatch().draw(background, 0f, 0f, Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT);
|
||||||
getBatch().end();
|
getBatch().end();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getBatch().setShader(null);
|
getBatch().setShader(null);
|
||||||
super.draw();
|
super.draw();
|
||||||
}
|
}
|
||||||
|
67
core/src/zero1hd/polyjet/ui/windows/DifficultyWindow.java
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
package zero1hd.polyjet.ui.windows;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.Label;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.Slider;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
|
public class DifficultyWindow extends Window {
|
||||||
|
private Slider sensitivityRating;
|
||||||
|
private Label sensitivityRatingTitle;
|
||||||
|
private Slider speedModifier;
|
||||||
|
private Label speedModifierTitle;
|
||||||
|
private Slider healthModifier;
|
||||||
|
private Label healthModifierTitle;
|
||||||
|
|
||||||
|
public DifficultyWindow(String title, Skin skin) {
|
||||||
|
super(title, skin, "tinted");
|
||||||
|
sensitivityRating = new Slider(-5f, 5f, 1f, false, skin);
|
||||||
|
sensitivityRating.setValue(0f);
|
||||||
|
sensitivityRating.addListener(new ChangeListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
sensitivityRatingTitle.setText("Base Difficulty: " + sensitivityRating.getValue());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
sensitivityRatingTitle = new Label("Base Difficulty: " + sensitivityRating.getValue(), skin, "sub-font", skin.getColor("default"));
|
||||||
|
add(sensitivityRatingTitle);
|
||||||
|
row();
|
||||||
|
add(sensitivityRating).fillX();
|
||||||
|
|
||||||
|
row();
|
||||||
|
|
||||||
|
speedModifier = new Slider(1f, 3f, 0.25f, false, skin);
|
||||||
|
speedModifier.setValue(1f);
|
||||||
|
speedModifier.addListener(new ChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
speedModifierTitle.setText("Speed Modifier: " + speedModifier.getValue());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
speedModifierTitle = new Label("Speed Modifier: " + speedModifier.getValue(), skin, "sub-font", skin.getColor("default"));
|
||||||
|
add(speedModifierTitle);
|
||||||
|
row();
|
||||||
|
add(speedModifier).fillX();
|
||||||
|
|
||||||
|
row();
|
||||||
|
|
||||||
|
healthModifier = new Slider(0f, 5f, 1f, false, skin);
|
||||||
|
healthModifier.setValue(0f);
|
||||||
|
healthModifier.addListener(new ChangeListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
healthModifierTitle.setText("Health modifier: " + healthModifier.getValue());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
healthModifierTitle = new Label("Health modifier: " + healthModifier.getValue(), skin, "sub-font", skin.getColor("default"));
|
||||||
|
add(healthModifierTitle);
|
||||||
|
row();
|
||||||
|
add(healthModifier).fillX().spaceBottom(15f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -6,7 +6,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Skin;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
||||||
|
|
||||||
public class FPSWindow extends Window {
|
public class FPSWindow extends Window {
|
||||||
|
|
||||||
public FPSWindow(String title, Skin skin) {
|
public FPSWindow(String title, Skin skin) {
|
||||||
super(title, skin, "tinted");
|
super(title, skin, "tinted");
|
||||||
Label FPS = new Label("FPS: ", skin, "window-font", skin.getColor("default")) {
|
Label FPS = new Label("FPS: ", skin, "window-font", skin.getColor("default")) {
|
||||||
|