Add blank pole sounds + volume panning to Bouncy Road
This commit is contained in:
parent
362e4c1c2d
commit
aceef8005e
BIN
Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg
Normal file
BIN
Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/bouncyRoad/leftBlank.ogg.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9b584037609d9084aa8a838607884dcc
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg
Normal file
BIN
Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/bouncyRoad/rightBlank.ogg.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c0997440911c8a543b05babc2e2ed806
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -279,10 +279,12 @@ namespace HeavenStudio.Games
|
|||
if (PlayerInput.GetIsAction(InputAction_Right) && !IsExpectingInputNow(InputAction_Right))
|
||||
{
|
||||
ThingsAnim[12].Play("podium", 0, 0);
|
||||
SoundByte.PlayOneShotGame("bouncyRoad/rightBlank", volume: .5f);
|
||||
}
|
||||
if (PlayerInput.GetIsAction(InputAction_Left) && !IsExpectingInputNow(InputAction_Left))
|
||||
{
|
||||
ThingsAnim[13].Play("podium", 0, 0);
|
||||
SoundByte.PlayOneShotGame("bouncyRoad/leftBlank", volume: .5f);
|
||||
}
|
||||
|
||||
UpdateBalls();
|
||||
|
@ -338,12 +340,14 @@ namespace HeavenStudio.Games
|
|||
public void PlayBounceSound(double beat, double length, float[] pitches, float singlePitch)
|
||||
{
|
||||
var sounds = new List<MultiSound.Sound>();
|
||||
for (int i = 0; i < 12 ; i++)
|
||||
{
|
||||
float volume = .65f;
|
||||
for (int i = 0; i < 12 ; i++) {
|
||||
if (i >= 6) volume += .059f;
|
||||
|
||||
var bounceBeat = beat + i * length;
|
||||
if (!bounceBeats.Contains(bounceBeat)) {
|
||||
float pitch = pitches == null ? singlePitch : pitches[i];
|
||||
sounds.Add(new MultiSound.Sound("bouncyRoad/ballBounce", bounceBeat, pitch));
|
||||
sounds.Add(new MultiSound.Sound("bouncyRoad/ballBounce", bounceBeat, pitch, volume));
|
||||
}
|
||||
bounceBeats.Add(bounceBeat);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue