Browse Source

Renamed DialogAudio to WriterAudio

master
chrisgregan 10 years ago
parent
commit
979c77181e
  1. 18
      Assets/Fungus/Narrative/Scripts/SayDialog.cs
  2. 2
      Assets/Fungus/UI/Scripts/Writer.cs
  3. 2
      Assets/Fungus/UI/Scripts/WriterAudio.cs
  4. 0
      Assets/Fungus/UI/Scripts/WriterAudio.cs.meta

18
Assets/Fungus/Narrative/Scripts/SayDialog.cs

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;
@ -23,7 +23,7 @@ namespace Fungus
public Text storyText;
public Image characterImage;
protected DialogAudio dialogAudio;
protected WriterAudio writerAudio;
protected Writer writer;
protected CanvasGroup canvasGroup;
@ -91,20 +91,20 @@ namespace Fungus
return canvasGroup;
}
protected DialogAudio GetDialogAudio()
protected WriterAudio GetWriterAudio()
{
if (dialogAudio != null)
if (writerAudio != null)
{
return dialogAudio;
return writerAudio;
}
dialogAudio = GetComponent<DialogAudio>();
if (dialogAudio == null)
writerAudio = GetComponent<WriterAudio>();
if (writerAudio == null)
{
dialogAudio = gameObject.AddComponent<DialogAudio>();
writerAudio = gameObject.AddComponent<WriterAudio>();
}
return dialogAudio;
return writerAudio;
}
protected void Start()

2
Assets/Fungus/UI/Scripts/Writer.cs

@ -250,7 +250,7 @@ namespace Fungus
return;
}
// If this clip is null then DialogAudio will play the default sound effect (if any)
// If this clip is null then WriterAudio will play the default sound effect (if any)
NotifyStart(audioClip);
string tokenText = content;

2
Assets/Fungus/Narrative/Scripts/DialogAudio.cs → Assets/Fungus/UI/Scripts/WriterAudio.cs

@ -7,7 +7,7 @@ namespace Fungus
/*
* Manages audio effects for Dialogs
*/
public class DialogAudio : MonoBehaviour, IWriterListener
public class WriterAudio : MonoBehaviour, IWriterListener
{
// If none is specifed then we use any AudioSource on the gameobject, and if that doesn't exist we create one.
[Tooltip("AudioSource to use for playing sound effects.")]

0
Assets/Fungus/Narrative/Scripts/DialogAudio.cs.meta → Assets/Fungus/UI/Scripts/WriterAudio.cs.meta

Loading…
Cancel
Save