Browse Source

Added continue sound to say dialogs #84

master
chrisgregan 10 years ago
parent
commit
6636f4b1d5
  1. 7
      Assets/Fungus/Dialog/Scripts/SayDialog.cs

7
Assets/Fungus/Dialog/Scripts/SayDialog.cs

@ -13,6 +13,7 @@ namespace Fungus
public static SayDialog activeSayDialog; public static SayDialog activeSayDialog;
public Image continueImage; public Image continueImage;
public AudioClip continueSound;
public static SayDialog GetSayDialog() public static SayDialog GetSayDialog()
{ {
@ -51,12 +52,18 @@ namespace Fungus
{ {
ShowContinueImage(true); ShowContinueImage(true);
StartCoroutine(WaitForInput(delegate { StartCoroutine(WaitForInput(delegate {
if (continueSound != null)
{
AudioSource.PlayClipAtPoint(continueSound, Vector3.zero);
}
Clear(); Clear();
StopVoiceOver(); StopVoiceOver();
if (onComplete != null) if (onComplete != null)
{ {
onComplete(); onComplete();
} }
})); }));
} }
else else

Loading…
Cancel
Save