An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

using UnityEngine;
using System.Collections;
using Fungus.Utils;
namespace Fungus
{
/// <summary>
/// Writer event signalling system.
/// </summary>
public static class WriterSignals
{
#region Public members
/// <summary>
/// TextTagToken signal. Sent for each unique token when writing text.
/// </summary>
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); }
/// <summary>
/// WriterState signal. Sent when the writer changes state.
/// </summary>
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
}
}