fixed void circle entity and debug screen stuff

This commit is contained in:
Harrison Deng 2017-07-11 19:19:24 -05:00
parent f1b0a2b20e
commit 27757f0024
16 changed files with 90 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -129,7 +129,7 @@ public class Polyjet extends Game {
assetManager.load("bar.png", Texture.class);
assetManager.load("flake.png", Texture.class);
assetManager.load("star_bg.png", Texture.class);
// assetManager.load("");
assetManager.load("void_circle.png", Texture.class);
}
public void generateFonts() {
initComplete = true;

View File

@ -56,7 +56,6 @@ public class AudioAnalyzer {
public AudioAnalyzer() {
sender = new MiniSender();
analysisAlgorithm = new Runnable() {
@Override
@ -359,4 +358,12 @@ public class AudioAnalyzer {
public float getsecondsPerWindow() {
return secondsPerWindow;
}
public float getBassAvg() {
return bassAvg;
}
public float getUmAvg() {
return umAvg;
}
}

View File

@ -1,7 +1,6 @@
package zero1hd.polyjet.entity.ally;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.ParticleEffect;

View File

@ -41,8 +41,13 @@ public VoidCircle(Texture voidTexture) {
@Override
public void act(float delta) {
toFront();
voidCircleTexture.setCenter(getX()+center.x, getY()+center.y);
hitBox.setCenter(getX()+center.x, getY()+center.y);
if (begin) {
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) {
timer -= delta;
@ -59,21 +64,14 @@ public VoidCircle(Texture voidTexture) {
}
}
}
voidCircleTexture.setCenter(getX()+center.x, getY()+center.y);
super.act(delta);
}
@Override
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);
}
batch.setColor(Color.WHITE);
super.draw(batch, parentAlpha);
}
@ -90,6 +88,7 @@ public VoidCircle(Texture voidTexture) {
center.set(0, 0);
voidCircleTexture.setPosition(0, 0);
setSize(0, 0);
setPosition(0, 0);
}
public void growCurrentRadius(float radius) {

View File

@ -63,7 +63,7 @@ public class CreativeStage extends Stage implements MiniListener {
addActor(backButton);
toolbox = new Window("Tools", core.getDefaultSkin());
toolbox = new Window("Tools", core.getDefaultSkin(), "tinted");
toolbox.defaults().pad(5f);
Table toolboxToolSet = new Table(core.getDefaultSkin());

View File

@ -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
*/
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().end();
getBatch().setShader(null);
super.draw();
}

View 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);
}
}

View File

@ -6,7 +6,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
public class FPSWindow extends Window {
public FPSWindow(String title, Skin skin) {
super(title, skin, "tinted");
Label FPS = new Label("FPS: ", skin, "window-font", skin.getColor("default")) {