using UnityEngine;
using System.Collections;
using Fungus.Utils;
namespace Fungus
{
///
/// Writer event signalling system.
///
public static class WriterSignals
{
#region Public members
///
/// TextTagToken signal. Sent for each unique token when writing text.
///
public delegate void TextTagTokenHandler(Writer writer, TextTagToken token, int index, int maxIndex);
public static event TextTagTokenHandler OnTextTagToken;
public static void DoTextTagToken(Writer writer, TextTagToken token, int index, int maxIndex) { if(OnTextTagToken != null) OnTextTagToken(writer, token, index, maxIndex); }
///
/// WriterState signal. Sent when the writer changes state.
///
public delegate void WriterStateHandler(Writer writer, WriterState writerState);
public static event WriterStateHandler OnWriterState;
public static void DoWriterState(Writer writer, WriterState writerState) { if (OnWriterState != null) OnWriterState(writer, writerState); }
#endregion
}
}