tuning
This commit is contained in:
parent
8bcea5cfff
commit
a02e5565ff
@ -29,6 +29,10 @@ public class GamePlayMap {
|
|||||||
return musicData.getPlaybackMusic();
|
return musicData.getPlaybackMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AudioData getMusicData() {
|
||||||
|
return musicData;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the runtime time of the overall song
|
* returns the runtime time of the overall song
|
||||||
* @return
|
* @return
|
||||||
|
@ -22,7 +22,7 @@ public class VoidCircle extends Actor implements Entity, Poolable {
|
|||||||
private boolean done;
|
private boolean done;
|
||||||
private boolean begin;
|
private boolean begin;
|
||||||
private Vector2 center;
|
private Vector2 center;
|
||||||
|
private float maxTime;
|
||||||
public VoidCircle(Texture voidTexture) {
|
public VoidCircle(Texture voidTexture) {
|
||||||
hitBox = new Rectangle();
|
hitBox = new Rectangle();
|
||||||
center = new Vector2();
|
center = new Vector2();
|
||||||
@ -31,6 +31,7 @@ public VoidCircle(Texture voidTexture) {
|
|||||||
|
|
||||||
public void init(float endRadius, float x, float y, float growthRate, float warningTime) {
|
public void init(float endRadius, float x, float y, float growthRate, float warningTime) {
|
||||||
timer = warningTime;
|
timer = warningTime;
|
||||||
|
maxTime = warningTime;
|
||||||
this.endRadius = endRadius;
|
this.endRadius = endRadius;
|
||||||
setSize(2f*endRadius, 2f*endRadius);
|
setSize(2f*endRadius, 2f*endRadius);
|
||||||
center.set(getWidth()/2f, getHeight()/2f);
|
center.set(getWidth()/2f, getHeight()/2f);
|
||||||
@ -46,7 +47,7 @@ public VoidCircle(Texture voidTexture) {
|
|||||||
voidCircleTexture.setColor(0f,0f,0f,1f);
|
voidCircleTexture.setColor(0f,0f,0f,1f);
|
||||||
} else {
|
} else {
|
||||||
voidCircleTexture.setSize(2*endRadius, 2*endRadius);
|
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);
|
hitBox.setCenter(getX()+center.x, getY()+center.y);
|
||||||
|
|
||||||
@ -83,6 +84,7 @@ public VoidCircle(Texture voidTexture) {
|
|||||||
currentRadius = 0;
|
currentRadius = 0;
|
||||||
growthRate = 0;
|
growthRate = 0;
|
||||||
timer = 0;
|
timer = 0;
|
||||||
|
maxTime = 0;
|
||||||
endRadius = 0;
|
endRadius = 0;
|
||||||
done = false;
|
done = false;
|
||||||
begin = false;
|
begin = false;
|
||||||
|
@ -130,7 +130,6 @@ public class GameScreen extends ScreenAdapter implements InputProcessor {
|
|||||||
overlay.getViewport().apply();
|
overlay.getViewport().apply();
|
||||||
overlay.draw();
|
overlay.draw();
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
music.readIndexUpdate();
|
|
||||||
scoreLabel.setText("Score: " + gameArea.getScore());
|
scoreLabel.setText("Score: " + gameArea.getScore());
|
||||||
gameArea.act(delta);
|
gameArea.act(delta);
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ public class AudioGraph extends Actor {
|
|||||||
scale -= 0.25f;
|
scale -= 0.25f;
|
||||||
}
|
}
|
||||||
} else if (Gdx.input.isKeyPressed(Keys.PERIOD)) {
|
} else if (Gdx.input.isKeyPressed(Keys.PERIOD)) {
|
||||||
if (scale < audioGraph.getHeight()+30f) {
|
if (scale < audioGraph.getHeight()*2f) {
|
||||||
scale += 0.25f;
|
scale += 0.4f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Gdx.input.isKeyJustPressed(Keys.M)) {
|
if (Gdx.input.isKeyJustPressed(Keys.M)) {
|
||||||
|
@ -212,9 +212,6 @@ public class CreativeStage extends Stage implements MiniListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
if (musicPlayBackControls.getAudiofile() != null) {
|
|
||||||
musicPlayBackControls.getAudiofile().readIndexUpdate();
|
|
||||||
}
|
|
||||||
super.act(delta);
|
super.act(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,14 +117,19 @@ public class GamePlayArea extends Stage {
|
|||||||
@Override
|
@Override
|
||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
MapWindowData mwd;
|
MapWindowData mwd;
|
||||||
if (audioMap != null && audioMap.getPlayableClip().isPlaying() && (mwd = audioMap.nextWindowData()) != null) {
|
if (audioMap != null && audioMap.getPlayableClip().isPlaying()) {
|
||||||
EntitySpawnInfo[] currentSpawnInfo = mwd.getArray();
|
audioMap.getMusicData().readIndexUpdate();
|
||||||
if (currentSpawnInfo != null) {
|
time = audioMap.getPlayableClip().getPosition();
|
||||||
for (int i = 0; i < currentSpawnInfo.length; i++) {
|
if ((mwd = audioMap.nextWindowData()) != null) {
|
||||||
ec.spawnEntity(this, currentSpawnInfo[i]);
|
EntitySpawnInfo[] currentSpawnInfo = mwd.getArray();
|
||||||
|
if (currentSpawnInfo != null) {
|
||||||
|
for (int i = 0; i < currentSpawnInfo.length; i++) {
|
||||||
|
ec.spawnEntity(this, currentSpawnInfo[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
collisionDetector.collisionCheck();
|
collisionDetector.collisionCheck();
|
||||||
ec.deathClean();
|
ec.deathClean();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user