Sound Effects.

This commit is contained in:
2024-01-08 04:13:27 -06:00
parent ac8bca2396
commit 6539bbdb50
45 changed files with 163 additions and 3 deletions
@@ -94,6 +94,6 @@ void EnvironmentalAudio::Update(){
float distRatio=1-distanceFromPlayer/ACTIVATION_RANGE; //0-1 where 1 is full volume.
float xDistRatio=(pos.x-game->GetPlayer()->GetX())/ACTIVATION_RANGE; //0-1 where 1 is full volume.
Audio::Engine().SetVolume(soundInstance,distRatio);
Audio::Engine().SetVolume(soundInstance,distRatio*SOUND_DATA[audioName].volume);
Audio::Engine().SetPan(soundInstance,xDistRatio);
}