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.

66 lines
2.1 KiB

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace Fungus
{
/// <summary>
/// A Character that can be used in dialogue via the Say, Conversation and Portrait commands.
/// </summary>
public interface ICharacter
{
/// <summary>
/// Character name as displayed in Say Dialog.
/// </summary>
string NameText { get; }
/// <summary>
/// Color to display the character name in Say Dialog.
/// </summary>
Color NameColor { get; }
/// <summary>
/// Sound effect to play when this character is speaking.
/// </summary>
/// <value>The sound effect.</value>
AudioClip SoundEffect { get; }
/// <summary>
/// List of portrait images that can be displayed for this character.
/// </summary>
List<Sprite> Portraits { get; }
/// <summary>
/// Direction that portrait sprites face.
/// </summary>
FacingDirection PortraitsFace { get; }
/// <summary>
/// Currently display profile sprite for this character.
/// </summary>
/// <value>The profile sprite.</value>
Sprite ProfileSprite { get; set; }
/// <summary>
/// Current display state of this character's portrait.
/// </summary>
/// <value>The state.</value>
PortraitState State { get; }
/// <summary>
/// Sets the active Say dialog with a reference to a Say Dialog object in the scene. This Say Dialog will be used whenever the character speaks.
/// </summary>
ISayDialog SetSayDialog { get; }
/// <summary>
/// Returns true if the character name starts with the specified string. Case insensitive.
/// </summary>
bool NameStartsWith(string matchString);
/// <summary>
/// Looks for a portrait by name on a character
/// If none is found, give a warning and return a blank sprite
/// </summary>
Sprite GetPortrait(string portraitString);
}
}