Made intro VO play in diving minigame

This commit is contained in:
2025-11-10 13:13:32 +01:00
parent c99aad49f3
commit f44f8c5171
2 changed files with 18 additions and 1 deletions

View File

@@ -1562,7 +1562,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2} OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0} m_audioClip: {fileID: 0}
m_Resource: {fileID: 0} m_Resource: {fileID: 0}
m_PlayOnAwake: 1 m_PlayOnAwake: 0
m_Volume: 1 m_Volume: 1
m_Pitch: 1 m_Pitch: 1
Loop: 0 Loop: 0
@@ -3633,6 +3633,18 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Tutorial value: Tutorial
objectReference: {fileID: 0} 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} - target: {fileID: 8452897808363562605, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
propertyPath: m_Sprite propertyPath: m_Sprite
value: value:

View File

@@ -6,6 +6,7 @@ using Input;
using Pixelplacement; using Pixelplacement;
using UI.Core; using UI.Core;
using UnityEngine; using UnityEngine;
using UnityEngine.Audio;
namespace UI.Tutorial namespace UI.Tutorial
{ {
@@ -19,6 +20,8 @@ namespace UI.Tutorial
private StateMachine _stateMachine; private StateMachine _stateMachine;
public bool playTutorial; public bool playTutorial;
public AudioSource bottleAudioPlayer;
public AudioResource introVO;
[SerializeField] private ProgressType progressType = ProgressType.Auto; [SerializeField] private ProgressType progressType = ProgressType.Auto;
// gating for input until current state's animation finishes first loop // gating for input until current state's animation finishes first loop
@@ -76,6 +79,8 @@ namespace UI.Tutorial
tapPrompt.SetActive(false); tapPrompt.SetActive(false);
Destroy(gameObject); Destroy(gameObject);
bottleAudioPlayer.resource = introVO;
bottleAudioPlayer.Play();
} }
public void OnTap(Vector2 position) public void OnTap(Vector2 position)