Erekir turret SFX (of varying quality)
This commit is contained in:
@@ -1098,6 +1098,11 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @return volume cale of active sound. */
|
||||
public float activeSoundVolume(){
|
||||
return 1f;
|
||||
}
|
||||
|
||||
/** @return whether this block should play its idle sound.*/
|
||||
public boolean shouldAmbientSound(){
|
||||
return shouldConsume();
|
||||
@@ -1954,7 +1959,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
//TODO separate system for sound? AudioSource, etc
|
||||
if(!headless){
|
||||
if(sound != null){
|
||||
sound.update(x, y, shouldActiveSound());
|
||||
sound.update(x, y, shouldActiveSound(), activeSoundVolume());
|
||||
}
|
||||
|
||||
if(block.ambientSound != Sounds.none && shouldAmbientSound()){
|
||||
|
||||
@@ -437,6 +437,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
healTime -= Time.delta / 20f;
|
||||
wasHealed = false;
|
||||
|
||||
if(!headless && type.loopSound != Sounds.none){
|
||||
control.sound.loop(type.loopSound, this, type.loopSoundVolume);
|
||||
}
|
||||
|
||||
//check if environment is unsupported
|
||||
if(!type.supportsEnv(state.rules.env) && !dead){
|
||||
Call.unitEnvDeath(self());
|
||||
|
||||
Reference in New Issue
Block a user