// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)
using UnityEngine;
using System.Collections;
namespace Fungus
{
///
/// Display story text in a visual novel style dialog box.
///
public interface ISayDialog
{
///
/// Sets the active state of the Say Dialog gameobject.
///
void SetActive(bool state);
///
/// Sets the active speaking character.
///
/// The active speaking character.
/// An optional Flowchart to use for variable substitution in the character name string.
void SetCharacter(ICharacter character, IFlowchart flowchart = null);
///
/// Sets the character image to display on the Say Dialog.
///
void SetCharacterImage(Sprite image);
///
/// Sets the character name to display on the Say Dialog.
///
void SetCharacterName(string name, Color color);
///
/// Write a line of story text to the Say Dialog. Starts coroutine automatically.
///
/// The text to display.
/// Clear any previous text in the Say Dialog.
/// Wait for player input before continuing once text is written.
/// Fade out the Say Dialog when writing and player input has finished.
/// Stop any existing voiceover audio before writing starts.
/// Voice over audio clip to play.
/// Callback to execute when writing and player input have finished.
void Say(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, System.Action onComplete);
///
/// Write a line of story text to the Say Dialog. Must be started as a coroutine.
///
/// The text to display.
/// Clear any previous text in the Say Dialog.
/// Wait for player input before continuing once text is written.
/// Fade out the Say Dialog when writing and player input has finished.
/// Stop any existing voiceover audio before writing starts.
/// Voice over audio clip to play.
/// Callback to execute when writing and player input have finished.
IEnumerator DoSay(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, System.Action onComplete);
///
/// Tell the Say Dialog to fade out once writing and player input have finished.
///
bool FadeWhenDone { set; }
///
/// Stop the Say Dialog while its writing text.
///
void Stop();
///
/// Stops writing text and clears the Say Dialog.
///
void Clear();
}
}