Corvus shoot SFX
This commit is contained in:
@@ -491,6 +491,9 @@ public class UnitTypes implements ContentList{
|
||||
drawShields = false;
|
||||
|
||||
weapons.add(new Weapon("corvus-weapon"){{
|
||||
shootSound = Sounds.laserblast;
|
||||
chargeSound = Sounds.lasercharge;
|
||||
soundPitchMin = 1f;
|
||||
top = false;
|
||||
mirror = false;
|
||||
shake = 14f;
|
||||
@@ -498,7 +501,6 @@ public class UnitTypes implements ContentList{
|
||||
x = y = 0;
|
||||
reload = 350f;
|
||||
recoil = 0f;
|
||||
shootSound = Sounds.laser;
|
||||
|
||||
cooldownTime = 350f;
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{
|
||||
float baseX = this.x, baseY = this.y;
|
||||
boolean delay = weapon.firstShotDelay + weapon.shotDelay > 0f;
|
||||
|
||||
(delay ? weapon.chargeSound : weapon.shootSound).at(x, y, Mathf.random(0.8f, 1.0f));
|
||||
(delay ? weapon.chargeSound : weapon.shootSound).at(x, y, Mathf.random(weapon.soundPitchMin, weapon.soundPitchMax));
|
||||
|
||||
BulletType ammo = weapon.bullet;
|
||||
float lifeScl = ammo.scaleVelocity ? Mathf.clamp(Mathf.dst(x, y, aimX, aimY) / ammo.range()) : 1f;
|
||||
@@ -195,7 +195,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{
|
||||
vel.add(Tmp.v1.trns(rotation + 180f, ammo.recoil));
|
||||
Effect.shake(weapon.shake, weapon.shake, x, y);
|
||||
mount.heat = 1f;
|
||||
weapon.shootSound.at(x, y, Mathf.random(0.8f, 1.0f));
|
||||
weapon.shootSound.at(x, y, Mathf.random(weapon.soundPitchMin, weapon.soundPitchMax));
|
||||
});
|
||||
}else{
|
||||
vel.add(Tmp.v1.trns(rotation + 180f, ammo.recoil));
|
||||
|
||||
@@ -62,6 +62,8 @@ public class Weapon{
|
||||
public float shootCone = 5f;
|
||||
/** ticks to cool down the heat region */
|
||||
public float cooldownTime = 20f;
|
||||
/** random sound pitch range */
|
||||
public float soundPitchMin = 0.8f, soundPitchMax = 1f;
|
||||
/** whether shooter rotation is ignored when shooting. */
|
||||
public boolean ignoreRotation = false;
|
||||
/** min velocity required for this weapon to shoot */
|
||||
|
||||
Reference in New Issue
Block a user