changed way void circle spawns

This commit is contained in:
Harrison Deng 2017-07-13 01:00:10 -05:00
parent 05cf360e71
commit c3e72ef86b

View File

@ -19,6 +19,9 @@ public class RhythmMapAlgorithm implements Runnable {
private FloatArray overlappedPeaks;
private MersenneTwister rand;
private GamePlayMap map;
private float avgBass;
private float avgUM;
private float avgBPS;
private float speedMod, healthMod;
@ -39,6 +42,9 @@ public class RhythmMapAlgorithm implements Runnable {
this.speedMod = speedMod;
this.healthMod = healthMod;
avgBass = analyzer.getBassAvg();
avgUM = analyzer.getUmAvg();
}
@Override
@ -47,9 +53,9 @@ public class RhythmMapAlgorithm implements Runnable {
for (int index = 0; index < bassPeaks.size; index++) {
if (bassPeaks.get(index) != 0 || UMPeaks.get(index) != 0) {
int warningTime = (int) ((3/speedMod)*windowPerSecond);
if ((index+warningTime <= bassPeaks.size) && overlappedPeaks.get(index + warningTime) != 0) {
if ((index+warningTime <= bassPeaks.size) && bassPeaks.get(index + warningTime) >= avgBass) {
//TODO basic void circle spawning
float endRadius = overlappedPeaks.get(index+3)*Polyjet.GAME_AREA_WIDTH;
float endRadius = overlappedPeaks.get(index + warningTime)*Polyjet.GAME_AREA_WIDTH;
map.addToMap(Entities.VOID_CIRCLE,
endRadius,