minor tuning and fixed mistake in uiskin.atlas
This commit is contained in:
parent
053f4fb40e
commit
e30cb93545
@ -235,7 +235,7 @@ pause-down
|
||||
orig: 44, 44
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
bar-empty
|
||||
bar-fill
|
||||
rotate: false
|
||||
xy: 105, 13
|
||||
size: 13, 3
|
||||
@ -243,7 +243,7 @@ bar-empty
|
||||
orig: 13, 3
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
bar-fill
|
||||
bar-empty
|
||||
rotate: false
|
||||
xy: 119, 13
|
||||
size: 13, 3
|
||||
|
@ -65,16 +65,16 @@ public class AudioAnalyzer {
|
||||
int totalTasks = audioData.getSampleCount()/audioData.getReadWindowSize();
|
||||
|
||||
bassThresholdMultiplier = 1.5f;
|
||||
umThresholdMultiplier = 1.5f;
|
||||
umThresholdMultiplier = 1.4f;
|
||||
|
||||
bassBinBegin = 1;
|
||||
bassBinEnd = 14;
|
||||
bassBinEnd = 13;
|
||||
|
||||
UMBinBegin = 15;
|
||||
UMBinEnd = 512;
|
||||
UMBinBegin = 14;
|
||||
UMBinEnd = 513;
|
||||
|
||||
bassThresholdCalcRange = thresholdRangeCalc(0.28f);
|
||||
UMThresholdCalcRange = thresholdRangeCalc(0.3f);
|
||||
UMThresholdCalcRange = thresholdRangeCalc(0.4f);
|
||||
|
||||
Gdx.app.debug("Read freq", String.valueOf(audioData.getFormat().getSampleRate()));
|
||||
Gdx.app.debug("Using following bin ranges", "\nBass freq begin: " + bassBinBegin + "\nBass freq end: " + bassBinEnd + "\nMain freq begin: " + UMBinBegin + "\nMain freq end: " + UMBinEnd);
|
||||
|
@ -86,4 +86,7 @@ public class GamePlayMap {
|
||||
}
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
@ -61,10 +61,10 @@ public class RhythmMapAlgorithm implements Runnable {
|
||||
if (bassPeaks.get(index) != 0 || UMPeaks.get(index) != 0) {
|
||||
if (bassPeaks.get(index) != 0) {
|
||||
//If there is a value of some sorts that is not zero, we generate some beat for the map
|
||||
if (bassPeaks.get(index) >= avgBass) {
|
||||
if (index > 1.5*windowPerSecond && bassPeaks.get(index) >= avgBass) {
|
||||
//If bass peak is greater than the bass peak average, then:
|
||||
int indexMoved = map.setIndex((int) (windowPerSecond*1.5f));
|
||||
float waitTime = indexMoved/windowPerSecond;
|
||||
int normalIndexPos = map.setIndex((int) (map.getIndex() - windowPerSecond*1.5f));
|
||||
float waitTime = 1.5f;
|
||||
float endRadius = (bassPeaks.get(index)/bassMax)*(Main.GAME_AREA_HEIGHT/4f);
|
||||
|
||||
esi = map.addEntity(EntityIndex.VOID_CIRCLE);
|
||||
@ -74,7 +74,7 @@ public class RhythmMapAlgorithm implements Runnable {
|
||||
esi.parameters.put("x", rand.nextFloat()*Main.GAME_AREA_WIDTH);
|
||||
esi.parameters.put("y", rand.nextFloat()*Main.GAME_AREA_HEIGHT);
|
||||
|
||||
map.setIndex(indexMoved);
|
||||
map.setIndex(normalIndexPos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ public class RhythmMapAlgorithm implements Runnable {
|
||||
esi = map.addEntity(EntityIndex.PELLET);
|
||||
esi.parameters.put("x", xSpawnLocation);
|
||||
esi.parameters.put("y", Main.GAME_AREA_HEIGHT-0.25f);
|
||||
esi.parameters.put("angle", 140*rand.nextFloat()+110f);
|
||||
esi.parameters.put("angle", 140*rand.nextFloat()+200f);
|
||||
esi.parameters.put("speed", (Main.GAME_AREA_HEIGHT/4f)/avgSPB);
|
||||
|
||||
}
|
||||
|
@ -37,26 +37,29 @@ public class CollisionDetector {
|
||||
if ((enemies.size != 0) && (allies.size != 0)) {
|
||||
for (int f = 0; f < enemies.size; f++) {
|
||||
Entity enemy = enemies.get(f);
|
||||
for (int s = 0; s < allies.size; s++) {
|
||||
Entity ally = allies.get(s);
|
||||
|
||||
if (enemy.getHitZone().overlaps(ally.getHitZone())) {
|
||||
Gdx.app.debug("Collision Detector", "Collision between entities: " + enemy.getEntityType() + " and " + ally.getEntityType());
|
||||
|
||||
//Play FX;
|
||||
if (ally.playCollideSFX() && enemy.playCollideSFX()) {
|
||||
explosionSFX.play(prefs.getFloat("fx vol"), 1f, (enemy.getX()/Main.GAME_AREA_WIDTH)-0.55f);
|
||||
if (enemy.getHitZone() != null) {
|
||||
for (int s = 0; s < allies.size; s++) {
|
||||
Entity ally = allies.get(s);
|
||||
if (ally.getHitZone() != null) {
|
||||
if (enemy.getHitZone().overlaps(ally.getHitZone())) {
|
||||
Gdx.app.debug("Collision Detector", "Collision between entities: " + enemy.getEntityType() + " and " + ally.getEntityType());
|
||||
|
||||
//Play FX;
|
||||
if (ally.playCollideSFX() && enemy.playCollideSFX()) {
|
||||
explosionSFX.play(prefs.getFloat("fx vol"), 1f, (enemy.getX()/Main.GAME_AREA_WIDTH)-0.55f);
|
||||
}
|
||||
if (ally.playCollidePFX() && enemy.playCollidePFX()) {
|
||||
PooledEffect currentPFX;
|
||||
currentPFX = explosionEffectPool.obtain();
|
||||
currentPFX.setPosition(enemy.getX() + enemy.getWidth()/2f, enemy.getY() + enemy.getHeight()/2f);
|
||||
effects.add(currentPFX);
|
||||
}
|
||||
|
||||
enemy.collided(ally);
|
||||
ally.collided(enemy);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ally.playCollidePFX() && enemy.playCollidePFX()) {
|
||||
PooledEffect currentPFX;
|
||||
currentPFX = explosionEffectPool.obtain();
|
||||
currentPFX.setPosition(enemy.getX() + enemy.getWidth()/2f, enemy.getY() + enemy.getHeight()/2f);
|
||||
effects.add(currentPFX);
|
||||
}
|
||||
|
||||
enemy.collided(ally);
|
||||
ally.collided(enemy);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ public class Pellet extends Entity implements Poolable {
|
||||
@Override
|
||||
public void preInit() {
|
||||
sprite = new Sprite(assets.get("pellet.png", Texture.class));
|
||||
enemy = true;
|
||||
setSize(0.5f, 0.5f);
|
||||
super.preInit();
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ public class HealthBar extends WidgetGroup {
|
||||
addActor(empty);
|
||||
|
||||
|
||||
empty.toFront();
|
||||
this.maxHealth = maxHealth;
|
||||
|
||||
}
|
||||
|
@ -217,8 +217,8 @@ public class CreativeHUD extends Stage implements MiniListener {
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (musicSelector.getSelectedMusic() != null) {
|
||||
musicSelector.getSelectedMusic().dispose();
|
||||
if (analyzer != null) {
|
||||
analyzer.audioData.dispose();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user