This commit is contained in:
Harrison Deng 2017-07-16 14:25:03 -05:00
parent 8bcea5cfff
commit a02e5565ff
6 changed files with 20 additions and 13 deletions

View File

@ -29,6 +29,10 @@ public class GamePlayMap {
return musicData.getPlaybackMusic();
}
public AudioData getMusicData() {
return musicData;
}
/**
* returns the runtime time of the overall song
* @return

View File

@ -22,7 +22,7 @@ public class VoidCircle extends Actor implements Entity, Poolable {
private boolean done;
private boolean begin;
private Vector2 center;
private float maxTime;
public VoidCircle(Texture voidTexture) {
hitBox = new Rectangle();
center = new Vector2();
@ -31,6 +31,7 @@ public VoidCircle(Texture voidTexture) {
public void init(float endRadius, float x, float y, float growthRate, float warningTime) {
timer = warningTime;
maxTime = warningTime;
this.endRadius = endRadius;
setSize(2f*endRadius, 2f*endRadius);
center.set(getWidth()/2f, getHeight()/2f);
@ -46,7 +47,7 @@ public VoidCircle(Texture voidTexture) {
voidCircleTexture.setColor(0f,0f,0f,1f);
} else {
voidCircleTexture.setSize(2*endRadius, 2*endRadius);
voidCircleTexture.setColor(1f,1f,1f,0.1f);
voidCircleTexture.setColor(1f,1f,1f,0.1f*(timer/maxTime));
}
hitBox.setCenter(getX()+center.x, getY()+center.y);
@ -83,6 +84,7 @@ public VoidCircle(Texture voidTexture) {
currentRadius = 0;
growthRate = 0;
timer = 0;
maxTime = 0;
endRadius = 0;
done = false;
begin = false;

View File

@ -130,7 +130,6 @@ public class GameScreen extends ScreenAdapter implements InputProcessor {
overlay.getViewport().apply();
overlay.draw();
if (!paused) {
music.readIndexUpdate();
scoreLabel.setText("Score: " + gameArea.getScore());
gameArea.act(delta);

View File

@ -46,8 +46,8 @@ public class AudioGraph extends Actor {
scale -= 0.25f;
}
} else if (Gdx.input.isKeyPressed(Keys.PERIOD)) {
if (scale < audioGraph.getHeight()+30f) {
scale += 0.25f;
if (scale < audioGraph.getHeight()*2f) {
scale += 0.4f;
}
}
if (Gdx.input.isKeyJustPressed(Keys.M)) {

View File

@ -212,9 +212,6 @@ public class CreativeStage extends Stage implements MiniListener {
@Override
public void act(float delta) {
if (musicPlayBackControls.getAudiofile() != null) {
musicPlayBackControls.getAudiofile().readIndexUpdate();
}
super.act(delta);
}

View File

@ -117,7 +117,10 @@ public class GamePlayArea extends Stage {
@Override
public void act(float delta) {
MapWindowData mwd;
if (audioMap != null && audioMap.getPlayableClip().isPlaying() && (mwd = audioMap.nextWindowData()) != null) {
if (audioMap != null && audioMap.getPlayableClip().isPlaying()) {
audioMap.getMusicData().readIndexUpdate();
time = audioMap.getPlayableClip().getPosition();
if ((mwd = audioMap.nextWindowData()) != null) {
EntitySpawnInfo[] currentSpawnInfo = mwd.getArray();
if (currentSpawnInfo != null) {
for (int i = 0; i < currentSpawnInfo.length; i++) {
@ -125,6 +128,8 @@ public class GamePlayArea extends Stage {
}
}
}
}
collisionDetector.collisionCheck();
ec.deathClean();