diff --git a/Assets/Resources/Games/tunnel.prefab b/Assets/Resources/Games/tunnel.prefab index a5e93920d..f55fd3392 100644 --- a/Assets/Resources/Games/tunnel.prefab +++ b/Assets/Resources/Games/tunnel.prefab @@ -25,7 +25,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 51355916537813500} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 13.7, y: 0.66, z: 3} + m_LocalPosition: {x: 13.7, y: 0.66, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -422,7 +422,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &1776695555037247447 Transform: m_ObjectHideFlags: 0 @@ -1500,7 +1500,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6725178218746906490} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.31, y: 3.98, z: 4} + m_LocalPosition: {x: -0.31, y: 3.98, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: diff --git a/Assets/Resources/Sfx/games/tunnel/en.meta b/Assets/Resources/Sfx/games/tunnel/en.meta index 151132d49..a9621f95f 100644 --- a/Assets/Resources/Sfx/games/tunnel/en.meta +++ b/Assets/Resources/Sfx/games/tunnel/en.meta @@ -4,5 +4,5 @@ folderAsset: yes DefaultImporter: externalObjects: {} userData: - assetBundleName: - assetBundleVariant: + assetBundleName: ntrtunnel/locale + assetBundleVariant: en diff --git a/Assets/Resources/Sfx/games/tunnel/tunnelLeft.wav b/Assets/Resources/Sfx/games/tunnel/tunnelLeft.wav new file mode 100644 index 000000000..9c819aee9 Binary files /dev/null and b/Assets/Resources/Sfx/games/tunnel/tunnelLeft.wav differ diff --git a/Assets/Resources/Sfx/games/tunnel/tunnelLeft.wav.meta b/Assets/Resources/Sfx/games/tunnel/tunnelLeft.wav.meta new file mode 100644 index 000000000..25f27266b --- /dev/null +++ b/Assets/Resources/Sfx/games/tunnel/tunnelLeft.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 129351fbf9a0224498b2b7d6ad2affad +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: ntrtunnel/common + assetBundleVariant: diff --git a/Assets/Resources/Sfx/games/tunnel/tunnelMiddle.wav b/Assets/Resources/Sfx/games/tunnel/tunnelMiddle.wav new file mode 100644 index 000000000..83bdb9e63 Binary files /dev/null and b/Assets/Resources/Sfx/games/tunnel/tunnelMiddle.wav differ diff --git a/Assets/Resources/Sfx/games/tunnel/tunnelMiddle.wav.meta b/Assets/Resources/Sfx/games/tunnel/tunnelMiddle.wav.meta new file mode 100644 index 000000000..60c025898 --- /dev/null +++ b/Assets/Resources/Sfx/games/tunnel/tunnelMiddle.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4707960e8ca4d3541a5c6721bbbde5cf +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: ntrtunnel/common + assetBundleVariant: diff --git a/Assets/Resources/Sfx/games/tunnel/tunnelRight.wav b/Assets/Resources/Sfx/games/tunnel/tunnelRight.wav new file mode 100644 index 000000000..e92422c8e Binary files /dev/null and b/Assets/Resources/Sfx/games/tunnel/tunnelRight.wav differ diff --git a/Assets/Resources/Sfx/games/tunnel/tunnelRight.wav.meta b/Assets/Resources/Sfx/games/tunnel/tunnelRight.wav.meta new file mode 100644 index 000000000..266b2c41f --- /dev/null +++ b/Assets/Resources/Sfx/games/tunnel/tunnelRight.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a1c2b2ce831ddba439aa571419b1bbc0 +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: ntrtunnel/common + assetBundleVariant: diff --git a/Assets/Scripts/Games/Tunnel/Tunnel.cs b/Assets/Scripts/Games/Tunnel/Tunnel.cs index cdc8c5e88..43a61bb80 100644 --- a/Assets/Scripts/Games/Tunnel/Tunnel.cs +++ b/Assets/Scripts/Games/Tunnel/Tunnel.cs @@ -69,6 +69,7 @@ namespace HeavenStudio.Games Tween bgColorTween; Tween fgColorTween; Vector3 tunnelStartPos; + Sound tunnelSoundRight, tunnelSoundMiddle, tunnelSoundLeft; [Header("References")] @@ -121,6 +122,9 @@ namespace HeavenStudio.Games if (Conductor.instance != null && Conductor.instance.NotStopped()) { Conductor.instance.FadeMinigameVolume(Conductor.instance.songPositionInBeatsAsDouble, 0, 1); + tunnelSoundRight?.Stop(); + tunnelSoundMiddle?.Stop(); + tunnelSoundLeft?.Stop(); } } @@ -163,10 +167,10 @@ namespace HeavenStudio.Games ScheduleInput(lastCowbell, 1, InputAction_BasicPress, CowbellSuccess, CowbellMiss, CowbellEmpty); } - bg.position = new Vector3(bgStartX - (2 * bgStartX * (((float)Time.realtimeSinceStartupAsDouble % bgScrollTime) / bgScrollTime)), 0, 0); + // bg.localPosition = new Vector3(bgStartX - (2 * bgStartX * (((float)Time.realtimeSinceStartupAsDouble % bgScrollTime) / bgScrollTime)), 0, 0); if (tunnelWall.activeSelf) { - tunnelWall.transform.position = tunnelStartPos - new Vector3(tunnelChunksPerSec * tunnelWallChunkSize * (float)(cond.songPositionAsDouble - tunnelStartTime), 0, 0); + tunnelWall.transform.localPosition = tunnelStartPos - new Vector3(tunnelChunksPerSec * tunnelWallChunkSize * (float)(cond.songPositionAsDouble - tunnelStartTime), 0, 0); } if (cond.songPositionAsDouble >= tunnelEndTime + PostTunnelScrnTime) { @@ -275,10 +279,19 @@ namespace HeavenStudio.Games double durationSec = Math.Ceiling((tunnelEndTime - tunnelStartTime) * 4 * tunnelChunksPerSec) * 0.25 / tunnelChunksPerSec; tunnelWallRenderer.size = new Vector2((float)durationSec * tunnelWallChunkSize * tunnelChunksPerSec, 13.7f); - tunnelWall.transform.position = tunnelStartPos; + tunnelWall.transform.localPosition = tunnelStartPos; tunnelWall.SetActive(true); this.fadeDuration = fadeDuration; cond.FadeMinigameVolume(beat, fadeDuration, volume); + + tunnelSoundRight = SoundByte.PlayOneShotGame("tunnel/tunnelRight", beat, looping: true); + tunnelSoundMiddle = SoundByte.PlayOneShotGame("tunnel/tunnelMiddle", beat + (6/48f), looping: true); + tunnelSoundLeft = SoundByte.PlayOneShotGame("tunnel/tunnelLeft" + (12/48f), beat, looping: true); + + double tunnelEnd = cond.GetBeatFromSongPos(tunnelEndTime + PostTunnelScrnTime); + tunnelSoundRight.SetLoopParams(tunnelEnd, 0.1); + tunnelSoundMiddle.SetLoopParams(tunnelEnd + (6/48f), 0.1); + tunnelSoundLeft.SetLoopParams(tunnelEnd + (12/48f), 0.1); } } }