Add subtitle UI for voice playback
This commit is contained in:
@@ -92,15 +92,9 @@ namespace BriarQueen.Game.Items.Environment.General.Book
|
||||
_bookInterface.CanvasGroup.blocksRaycasts = true;
|
||||
_bookInterface.CanvasGroup.interactable = true;
|
||||
|
||||
ShowTutorialIfNeeded();
|
||||
UnlockCodexEntry();
|
||||
}
|
||||
|
||||
private void ShowTutorialIfNeeded()
|
||||
{
|
||||
TutorialService.DisplayTutorial(TutorialPopupID.ExitItems);
|
||||
}
|
||||
|
||||
private void UnlockCodexEntry()
|
||||
{
|
||||
PlayerManager.UnlockCodexEntry(CodexEntryIDs.Get(_documentEntryID));
|
||||
|
||||
@@ -16,6 +16,13 @@ namespace BriarQueen.Game.Items.Environment.General
|
||||
|
||||
[SerializeField]
|
||||
private bool _removeTrigger;
|
||||
|
||||
[Header("Events")]
|
||||
[SerializeField]
|
||||
private SFXKey _soundEffect;
|
||||
[SerializeField]
|
||||
private VoiceKey _voiceLine;
|
||||
|
||||
|
||||
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
|
||||
public override string InteractableName => InteractableTooltip;
|
||||
@@ -29,6 +36,16 @@ namespace BriarQueen.Game.Items.Environment.General
|
||||
|
||||
if (_removeTrigger)
|
||||
await Remove();
|
||||
|
||||
if (_soundEffect != SFXKey.None)
|
||||
{
|
||||
AudioManager.Play(AudioNameIdentifiers.Get(_soundEffect));
|
||||
}
|
||||
|
||||
if (_voiceLine != VoiceKey.None)
|
||||
{
|
||||
AudioManager.Play(AudioNameIdentifiers.Get(_voiceLine));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user