Various tweaks

This commit is contained in:
Anuken
2019-08-16 09:58:25 -04:00
parent cc6ed88878
commit 625a0125cb
3 changed files with 8 additions and 6 deletions

View File

@@ -70,7 +70,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
private Tile mining;
private Vector2 movement = new Vector2();
private boolean moved;
private SoundLoop boostSound = new SoundLoop(Sounds.thruster, 2f), buildSound = new SoundLoop(Sounds.build, 0.75f);
private SoundLoop buildSound = new SoundLoop(Sounds.build, 0.75f);
//endregion
@@ -133,7 +133,6 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
@Override
public void removed(){
boostSound.stop();
buildSound.stop();
}
@@ -514,7 +513,10 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
destructTime = 0f;
}
boostSound.update(x, y, isBoosting && !isDead() && !mech.flying);
if(!isDead() && isFlying()){
loops.play(Sounds.thruster, this, Mathf.clamp(velocity.len() * 2f) * 0.4f);
}
BuildRequest request = buildRequest();
buildSound.update(request == null ? x : request.x * tilesize, request == null ? y : request.y * tilesize, isBuilding() && (Mathf.within(request.x * tilesize, request.y * tilesize, x, y, placeDistance) || state.isEditor()));

View File

@@ -67,7 +67,7 @@ public class Drill extends Block{
hasItems = true;
idleSound = Sounds.drill;
idleSoundVolume = 0.004f;
idleSoundVolume = 0.002f;
}
@Override