From f44f8c5171fd284add73d45889ed7588ea2662af Mon Sep 17 00:00:00 2001 From: AlexanderT Date: Mon, 10 Nov 2025 13:13:32 +0100 Subject: [PATCH] Made intro VO play in diving minigame --- Assets/Scenes/MiniGames/DivingForPictures.unity | 14 +++++++++++++- Assets/Scripts/UI/Tutorial/DivingTutorial.cs | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Assets/Scenes/MiniGames/DivingForPictures.unity b/Assets/Scenes/MiniGames/DivingForPictures.unity index 442e01fa..22349a68 100644 --- a/Assets/Scenes/MiniGames/DivingForPictures.unity +++ b/Assets/Scenes/MiniGames/DivingForPictures.unity @@ -1562,7 +1562,7 @@ AudioSource: OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2} m_audioClip: {fileID: 0} m_Resource: {fileID: 0} - m_PlayOnAwake: 1 + m_PlayOnAwake: 0 m_Volume: 1 m_Pitch: 1 Loop: 0 @@ -3633,6 +3633,18 @@ PrefabInstance: propertyPath: m_Name value: Tutorial objectReference: {fileID: 0} + - target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3} + propertyPath: introVO + value: + objectReference: {fileID: 8300000, guid: fca641cdc8dcd074483fad3db1cbe24c, type: 3} + - target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3} + propertyPath: playTutorial + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3} + propertyPath: bottleAudioPlayer + value: + objectReference: {fileID: 747976408} - target: {fileID: 8452897808363562605, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3} propertyPath: m_Sprite value: diff --git a/Assets/Scripts/UI/Tutorial/DivingTutorial.cs b/Assets/Scripts/UI/Tutorial/DivingTutorial.cs index 31ae59aa..806fa893 100644 --- a/Assets/Scripts/UI/Tutorial/DivingTutorial.cs +++ b/Assets/Scripts/UI/Tutorial/DivingTutorial.cs @@ -6,6 +6,7 @@ using Input; using Pixelplacement; using UI.Core; using UnityEngine; +using UnityEngine.Audio; namespace UI.Tutorial { @@ -19,6 +20,8 @@ namespace UI.Tutorial private StateMachine _stateMachine; public bool playTutorial; + public AudioSource bottleAudioPlayer; + public AudioResource introVO; [SerializeField] private ProgressType progressType = ProgressType.Auto; // gating for input until current state's animation finishes first loop @@ -76,6 +79,8 @@ namespace UI.Tutorial tapPrompt.SetActive(false); Destroy(gameObject); + bottleAudioPlayer.resource = introVO; + bottleAudioPlayer.Play(); } public void OnTap(Vector2 position)