Erekir turret SFX (of varying quality)
This commit is contained in:
@@ -107,6 +107,8 @@ jalastram (freesound.org)
|
|||||||
newlocknew (freesound.org)
|
newlocknew (freesound.org)
|
||||||
dsmolenaers (freesound.org)
|
dsmolenaers (freesound.org)
|
||||||
Headphaze (freesound.org)
|
Headphaze (freesound.org)
|
||||||
|
Michel Baradari (opengameart.org)
|
||||||
|
Michael Klier (opengameart.org)
|
||||||
Neoqueto (Darktech LDR Font)
|
Neoqueto (Darktech LDR Font)
|
||||||
Nikolass
|
Nikolass
|
||||||
VolasYouKnow
|
VolasYouKnow
|
||||||
|
|||||||
BIN
core/assets/sounds/cannon.ogg
Normal file
BIN
core/assets/sounds/cannon.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/glow.ogg
Normal file
BIN
core/assets/sounds/glow.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/laserbeam.ogg
Normal file
BIN
core/assets/sounds/laserbeam.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/malignShoot.ogg
Normal file
BIN
core/assets/sounds/malignShoot.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/missileLaunch.ogg
Normal file
BIN
core/assets/sounds/missileLaunch.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/missileTrail.ogg
Normal file
BIN
core/assets/sounds/missileTrail.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootAlt.ogg
Normal file
BIN
core/assets/sounds/shootAlt.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootAltLong.ogg
Normal file
BIN
core/assets/sounds/shootAltLong.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/shootSmite.ogg
Normal file
BIN
core/assets/sounds/shootSmite.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/spellLoop.ogg
Normal file
BIN
core/assets/sounds/spellLoop.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/torch.ogg
Normal file
BIN
core/assets/sounds/torch.ogg
Normal file
Binary file not shown.
@@ -19,11 +19,15 @@ public class SoundLoop{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void update(float x, float y, boolean play){
|
public void update(float x, float y, boolean play){
|
||||||
|
update(x, y, play, 1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(float x, float y, boolean play, float volumeScl){
|
||||||
if(baseVolume <= 0) return;
|
if(baseVolume <= 0) return;
|
||||||
|
|
||||||
if(id < 0){
|
if(id < 0){
|
||||||
if(play){
|
if(play){
|
||||||
id = sound.loop(sound.calcVolume(x, y) * volume * baseVolume, 1f, sound.calcPan(x, y));
|
id = sound.loop(sound.calcVolume(x, y) * volume * baseVolume * volumeScl, 1f, sound.calcPan(x, y));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//fade the sound in or out
|
//fade the sound in or out
|
||||||
@@ -38,7 +42,7 @@ public class SoundLoop{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Core.audio.set(id, sound.calcPan(x, y), sound.calcVolume(x, y) * volume * baseVolume);
|
Core.audio.set(id, sound.calcPan(x, y), sound.calcVolume(x, y) * volume * baseVolume * volumeScl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3892,6 +3892,7 @@ public class Blocks{
|
|||||||
);
|
);
|
||||||
|
|
||||||
coolantMultiplier = 6f;
|
coolantMultiplier = 6f;
|
||||||
|
shootSound = Sounds.shootAlt;
|
||||||
|
|
||||||
shake = 1f;
|
shake = 1f;
|
||||||
ammoPerShot = 2;
|
ammoPerShot = 2;
|
||||||
@@ -3944,6 +3945,8 @@ public class Blocks{
|
|||||||
maxAmmo = 30;
|
maxAmmo = 30;
|
||||||
consumeAmmoOnce = true;
|
consumeAmmoOnce = true;
|
||||||
|
|
||||||
|
shootSound = Sounds.shootAltLong;
|
||||||
|
|
||||||
drawer = new DrawTurret("reinforced-"){{
|
drawer = new DrawTurret("reinforced-"){{
|
||||||
parts.add(new RegionPart("-front"){{
|
parts.add(new RegionPart("-front"){{
|
||||||
progress = PartProgress.warmup;
|
progress = PartProgress.warmup;
|
||||||
@@ -4012,6 +4015,10 @@ public class Blocks{
|
|||||||
|
|
||||||
float r = range = 130f;
|
float r = range = 130f;
|
||||||
|
|
||||||
|
loopSound = Sounds.torch;
|
||||||
|
shootSound = Sounds.none;
|
||||||
|
loopSoundVolume = 1f;
|
||||||
|
|
||||||
//TODO balance, set up, where is liquid/sec displayed? status effects maybe?
|
//TODO balance, set up, where is liquid/sec displayed? status effects maybe?
|
||||||
ammo(
|
ammo(
|
||||||
Liquids.ozone, new ContinuousFlameBulletType(){{
|
Liquids.ozone, new ContinuousFlameBulletType(){{
|
||||||
@@ -4247,6 +4254,9 @@ public class Blocks{
|
|||||||
waveRad = 40f;
|
waveRad = 40f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
//TODO shoot sound
|
||||||
|
shootSound = Sounds.cannon;
|
||||||
|
|
||||||
fragBullet = intervalBullet = new BasicBulletType(3f, 30){{
|
fragBullet = intervalBullet = new BasicBulletType(3f, 30){{
|
||||||
width = 9f;
|
width = 9f;
|
||||||
hitSize = 5f;
|
hitSize = 5f;
|
||||||
@@ -4368,6 +4378,10 @@ public class Blocks{
|
|||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
shootSound = Sounds.none;
|
||||||
|
loopSoundVolume = 1f;
|
||||||
|
loopSound = Sounds.laserbeam;
|
||||||
|
|
||||||
shootWarmupSpeed = 0.08f;
|
shootWarmupSpeed = 0.08f;
|
||||||
shootCone = 360f;
|
shootCone = 360f;
|
||||||
|
|
||||||
@@ -4410,6 +4424,8 @@ public class Blocks{
|
|||||||
missileAccelTime = 50f;
|
missileAccelTime = 50f;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
//targetAir = false;
|
//targetAir = false;
|
||||||
|
loopSound = Sounds.missileTrail;
|
||||||
|
loopSoundVolume = 0.6f;
|
||||||
|
|
||||||
fogRadius = 6f;
|
fogRadius = 6f;
|
||||||
|
|
||||||
@@ -4517,6 +4533,7 @@ public class Blocks{
|
|||||||
recoil = 0.5f;
|
recoil = 0.5f;
|
||||||
|
|
||||||
coolantMultiplier = 6f;
|
coolantMultiplier = 6f;
|
||||||
|
shootSound = Sounds.missileLaunch;
|
||||||
|
|
||||||
minWarmup = 0.94f;
|
minWarmup = 0.94f;
|
||||||
shootWarmupSpeed = 0.03f;
|
shootWarmupSpeed = 0.03f;
|
||||||
@@ -4614,6 +4631,7 @@ public class Blocks{
|
|||||||
mag = 3f;
|
mag = 3f;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
shootSound = Sounds.shootSmite;
|
||||||
minWarmup = 0.99f;
|
minWarmup = 0.99f;
|
||||||
coolantMultiplier = 6f;
|
coolantMultiplier = 6f;
|
||||||
|
|
||||||
@@ -4803,6 +4821,9 @@ public class Blocks{
|
|||||||
|
|
||||||
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
|
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
|
||||||
limitRange();
|
limitRange();
|
||||||
|
|
||||||
|
loopSound = Sounds.glow;
|
||||||
|
loopSoundVolume = 0.8f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
malign = new PowerTurret("malign"){{
|
malign = new PowerTurret("malign"){{
|
||||||
@@ -4816,6 +4837,10 @@ public class Blocks{
|
|||||||
var circleColor = haloColor;
|
var circleColor = haloColor;
|
||||||
float circleY = 25f, circleRad = 11f, circleRotSpeed = 3.5f, circleStroke = 1.6f;
|
float circleY = 25f, circleRad = 11f, circleRotSpeed = 3.5f, circleStroke = 1.6f;
|
||||||
|
|
||||||
|
shootSound = Sounds.malignShoot;
|
||||||
|
loopSound = Sounds.spellLoop;
|
||||||
|
loopSoundVolume = 1.3f;
|
||||||
|
|
||||||
shootType = new FlakBulletType(8f, 80f){{
|
shootType = new FlakBulletType(8f, 80f){{
|
||||||
sprite = "missile-large";
|
sprite = "missile-large";
|
||||||
|
|
||||||
|
|||||||
@@ -1098,6 +1098,11 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return volume cale of active sound. */
|
||||||
|
public float activeSoundVolume(){
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
/** @return whether this block should play its idle sound.*/
|
/** @return whether this block should play its idle sound.*/
|
||||||
public boolean shouldAmbientSound(){
|
public boolean shouldAmbientSound(){
|
||||||
return shouldConsume();
|
return shouldConsume();
|
||||||
@@ -1954,7 +1959,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
//TODO separate system for sound? AudioSource, etc
|
//TODO separate system for sound? AudioSource, etc
|
||||||
if(!headless){
|
if(!headless){
|
||||||
if(sound != null){
|
if(sound != null){
|
||||||
sound.update(x, y, shouldActiveSound());
|
sound.update(x, y, shouldActiveSound(), activeSoundVolume());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(block.ambientSound != Sounds.none && shouldAmbientSound()){
|
if(block.ambientSound != Sounds.none && shouldAmbientSound()){
|
||||||
|
|||||||
@@ -437,6 +437,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
healTime -= Time.delta / 20f;
|
healTime -= Time.delta / 20f;
|
||||||
wasHealed = false;
|
wasHealed = false;
|
||||||
|
|
||||||
|
if(!headless && type.loopSound != Sounds.none){
|
||||||
|
control.sound.loop(type.loopSound, this, type.loopSoundVolume);
|
||||||
|
}
|
||||||
|
|
||||||
//check if environment is unsupported
|
//check if environment is unsupported
|
||||||
if(!type.supportsEnv(state.rules.env) && !dead){
|
if(!type.supportsEnv(state.rules.env) && !dead){
|
||||||
Call.unitEnvDeath(self());
|
Call.unitEnvDeath(self());
|
||||||
|
|||||||
@@ -246,6 +246,10 @@ public class UnitType extends UnlockableContent{
|
|||||||
public Color lightColor = Pal.powerLight;
|
public Color lightColor = Pal.powerLight;
|
||||||
/** sound played when this unit explodes (*not* when it is shot down) */
|
/** sound played when this unit explodes (*not* when it is shot down) */
|
||||||
public Sound deathSound = Sounds.bang;
|
public Sound deathSound = Sounds.bang;
|
||||||
|
/** sound played on loop when this unit is around. */
|
||||||
|
public Sound loopSound = Sounds.none;
|
||||||
|
/** volume of loop sound */
|
||||||
|
public float loopSoundVolume = 0.5f;
|
||||||
/** effect that this unit emits when falling */
|
/** effect that this unit emits when falling */
|
||||||
public Effect fallEffect = Fx.fallSmoke;
|
public Effect fallEffect = Fx.fallSmoke;
|
||||||
/** effect created at engine when unit falls. */
|
/** effect created at engine when unit falls. */
|
||||||
|
|||||||
@@ -151,6 +151,11 @@ public class ContinuousTurret extends Turret{
|
|||||||
return bullets.any();
|
return bullets.any();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float activeSoundVolume(){
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte version(){
|
public byte version(){
|
||||||
return 3;
|
return 3;
|
||||||
|
|||||||
@@ -581,6 +581,16 @@ public class Turret extends ReloadTurret{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float activeSoundVolume(){
|
||||||
|
return shootWarmup;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldActiveSound(){
|
||||||
|
return shootWarmup > 0.01f && loopSound != Sounds.none;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Writes write){
|
public void write(Writes write){
|
||||||
super.write(write);
|
super.write(write);
|
||||||
|
|||||||
Reference in New Issue
Block a user