began setup of actual game screen

This commit is contained in:
2017-07-22 18:40:32 -05:00
parent 8a64368b9b
commit 99e6fe9c3f
45 changed files with 359 additions and 263 deletions

View File

@@ -5,7 +5,7 @@ import org.apache.commons.math3.random.MersenneTwister;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.polyjet.Polyjet;
import zero1hd.polyjet.Main;
import zero1hd.polyjet.audio.AudioAnalyzer;
import zero1hd.polyjet.entity.Entities;
import zero1hd.polyjet.util.MiniEvents;
@@ -59,29 +59,29 @@ public class RhythmMapAlgorithm implements Runnable {
if (bassPeaks.get(index) >= avgBass) {
//TODO basic void circle spawning
float warningTime = map.goBack((int) (windowPerSecond*1.5f))/windowPerSecond;
float endRadius = (bassPeaks.get(index)/bassMax)*(Polyjet.GAME_AREA_HEIGHT/4f);
float endRadius = (bassPeaks.get(index)/bassMax)*(Main.GAME_AREA_HEIGHT/4f);
map.addToMap(Entities.VOID_CIRCLE,
endRadius,
rand.nextFloat()*Polyjet.GAME_AREA_WIDTH,
rand.nextFloat()*Polyjet.GAME_AREA_HEIGHT,
rand.nextFloat()*Main.GAME_AREA_WIDTH,
rand.nextFloat()*Main.GAME_AREA_HEIGHT,
endRadius/(avgSPB*0.7f),
warningTime
);
map.resetIndex();
}
if (UMPeaks.get(index) >= avgUM) {
int spawnLocations = (Polyjet.GAME_AREA_WIDTH-8)/8;
int spawnLocations = (Main.GAME_AREA_WIDTH-8)/8;
map.addToMap(Entities.BAR,
MathUtils.round(rand.nextFloat()*spawnLocations)*8,
(8f/avgSPB)*speedMod);
} else {
if (UMPeaks.get(index) != 0) {
float xSpawnLocation = (rand.nextFloat()*(Polyjet.GAME_AREA_WIDTH-2))+1;
float xSpawnLocation = (rand.nextFloat()*(Main.GAME_AREA_WIDTH-2))+1;
map.addToMap(Entities.PELLET,
xSpawnLocation,
Polyjet.GAME_AREA_HEIGHT-0.25f,
Main.GAME_AREA_HEIGHT-0.25f,
140*rand.nextFloat()+110f,
(Polyjet.GAME_AREA_HEIGHT/4f)/avgSPB);
(Main.GAME_AREA_HEIGHT/4f)/avgSPB);
}
}
} else {