From 6636f4b1d59b6aa1c1c1b25be58fdff6cc33ad0c Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Fri, 27 Feb 2015 13:17:34 +0000 Subject: [PATCH] Added continue sound to say dialogs #84 --- Assets/Fungus/Dialog/Scripts/SayDialog.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Fungus/Dialog/Scripts/SayDialog.cs b/Assets/Fungus/Dialog/Scripts/SayDialog.cs index 23f4d95e..0ef95f6e 100644 --- a/Assets/Fungus/Dialog/Scripts/SayDialog.cs +++ b/Assets/Fungus/Dialog/Scripts/SayDialog.cs @@ -13,6 +13,7 @@ namespace Fungus public static SayDialog activeSayDialog; public Image continueImage; + public AudioClip continueSound; public static SayDialog GetSayDialog() { @@ -51,12 +52,18 @@ namespace Fungus { ShowContinueImage(true); StartCoroutine(WaitForInput(delegate { + + if (continueSound != null) + { + AudioSource.PlayClipAtPoint(continueSound, Vector3.zero); + } Clear(); StopVoiceOver(); if (onComplete != null) { onComplete(); } + })); } else