diff --git a/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java b/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java index c886865..eaec435 100755 --- a/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java +++ b/core/src/zero1hd/polyjet/audio/map/GamePlayMap.java @@ -29,6 +29,10 @@ public class GamePlayMap { return musicData.getPlaybackMusic(); } + public AudioData getMusicData() { + return musicData; + } + /** * returns the runtime time of the overall song * @return diff --git a/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java b/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java index 47cbec2..b81fb62 100755 --- a/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java +++ b/core/src/zero1hd/polyjet/entity/enemies/VoidCircle.java @@ -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; diff --git a/core/src/zero1hd/polyjet/screens/GameScreen.java b/core/src/zero1hd/polyjet/screens/GameScreen.java index e1d4606..d70ff74 100755 --- a/core/src/zero1hd/polyjet/screens/GameScreen.java +++ b/core/src/zero1hd/polyjet/screens/GameScreen.java @@ -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); diff --git a/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java b/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java index d9371f8..7426b78 100755 --- a/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java +++ b/core/src/zero1hd/polyjet/ui/builders/AudioGraph.java @@ -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)) { diff --git a/core/src/zero1hd/polyjet/ui/stages/CreativeStage.java b/core/src/zero1hd/polyjet/ui/stages/CreativeStage.java index 0875e49..851784b 100755 --- a/core/src/zero1hd/polyjet/ui/stages/CreativeStage.java +++ b/core/src/zero1hd/polyjet/ui/stages/CreativeStage.java @@ -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); } diff --git a/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java b/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java index 5fb4b23..fab8d50 100755 --- a/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java +++ b/core/src/zero1hd/polyjet/ui/stages/GamePlayArea.java @@ -117,14 +117,19 @@ public class GamePlayArea extends Stage { @Override public void act(float delta) { MapWindowData mwd; - if (audioMap != null && audioMap.getPlayableClip().isPlaying() && (mwd = audioMap.nextWindowData()) != null) { - EntitySpawnInfo[] currentSpawnInfo = mwd.getArray(); - if (currentSpawnInfo != null) { - for (int i = 0; i < currentSpawnInfo.length; i++) { - ec.spawnEntity(this, currentSpawnInfo[i]); + 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++) { + ec.spawnEntity(this, currentSpawnInfo[i]); + } } } } + collisionDetector.collisionCheck(); ec.deathClean();