fix(arrow): reduced TTL + removed pitch
This commit is contained in:
parent
e34894ab47
commit
b0d3f0b930
BIN
core/assets/sounds/effects/arrow_landed_trim.mp3
Normal file
BIN
core/assets/sounds/effects/arrow_landed_trim.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/effects/arrow_shot_trim.mp3
Normal file
BIN
core/assets/sounds/effects/arrow_shot_trim.mp3
Normal file
Binary file not shown.
|
@ -25,7 +25,7 @@ public class Arrow extends EntityQuad {
|
|||
private Vector2 acceleration;
|
||||
private Vector2 force;
|
||||
|
||||
private float TTL = 20;
|
||||
private float TTL = 7;
|
||||
private boolean landed;
|
||||
|
||||
private Planet crash;
|
||||
|
@ -56,9 +56,9 @@ public class Arrow extends EntityQuad {
|
|||
if (!preview) {
|
||||
|
||||
arrowLandedSound =
|
||||
Gdx.audio.newSound(Gdx.files.internal("sounds/effects/arrow_landed.mp3"));
|
||||
Gdx.audio.newSound(Gdx.files.internal("sounds/effects/arrow_landed_trim.mp3"));
|
||||
arrowHitSound =
|
||||
Gdx.audio.newSound(Gdx.files.internal("sounds/effects/player_death.wav"));
|
||||
Gdx.audio.newSound(Gdx.files.internal("sounds/effects/player_death_trim.mp3"));
|
||||
|
||||
texture = new ArrayList<>();
|
||||
String path = "arrow" + MathUtils.random(2);
|
||||
|
@ -187,8 +187,7 @@ public class Arrow extends EntityQuad {
|
|||
|
||||
// Make a sound when an arrow lands
|
||||
if (!SagittariusGame.disableSounds) {
|
||||
long shotid = arrowLandedSound.play(SagittariusGame.soundsVolume);
|
||||
arrowLandedSound.setPitch(shotid, 1.5f);
|
||||
arrowLandedSound.play(SagittariusGame.soundsVolume);
|
||||
}
|
||||
|
||||
this.crash = planet;
|
||||
|
@ -216,7 +215,7 @@ public class Arrow extends EntityQuad {
|
|||
private void verifyHitting() {
|
||||
for (Actor actor : GameScreen.players.getChildren()) {
|
||||
Player player = (Player) actor;
|
||||
if (player == GameScreen.playerCurrent && TTL > 19.5)
|
||||
if (player == GameScreen.playerCurrent && TTL > 6.5)
|
||||
continue;
|
||||
if (Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue