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 acceleration;
|
||||||
private Vector2 force;
|
private Vector2 force;
|
||||||
|
|
||||||
private float TTL = 20;
|
private float TTL = 7;
|
||||||
private boolean landed;
|
private boolean landed;
|
||||||
|
|
||||||
private Planet crash;
|
private Planet crash;
|
||||||
|
@ -56,9 +56,9 @@ public class Arrow extends EntityQuad {
|
||||||
if (!preview) {
|
if (!preview) {
|
||||||
|
|
||||||
arrowLandedSound =
|
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 =
|
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<>();
|
texture = new ArrayList<>();
|
||||||
String path = "arrow" + MathUtils.random(2);
|
String path = "arrow" + MathUtils.random(2);
|
||||||
|
@ -187,8 +187,7 @@ public class Arrow extends EntityQuad {
|
||||||
|
|
||||||
// Make a sound when an arrow lands
|
// Make a sound when an arrow lands
|
||||||
if (!SagittariusGame.disableSounds) {
|
if (!SagittariusGame.disableSounds) {
|
||||||
long shotid = arrowLandedSound.play(SagittariusGame.soundsVolume);
|
arrowLandedSound.play(SagittariusGame.soundsVolume);
|
||||||
arrowLandedSound.setPitch(shotid, 1.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.crash = planet;
|
this.crash = planet;
|
||||||
|
@ -216,7 +215,7 @@ public class Arrow extends EntityQuad {
|
||||||
private void verifyHitting() {
|
private void verifyHitting() {
|
||||||
for (Actor actor : GameScreen.players.getChildren()) {
|
for (Actor actor : GameScreen.players.getChildren()) {
|
||||||
Player player = (Player) actor;
|
Player player = (Player) actor;
|
||||||
if (player == GameScreen.playerCurrent && TTL > 19.5)
|
if (player == GameScreen.playerCurrent && TTL > 6.5)
|
||||||
continue;
|
continue;
|
||||||
if (Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) {
|
if (Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue