Christopher
8 years ago
3 changed files with 122 additions and 28 deletions
@ -0,0 +1,66 @@
|
||||
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); |
||||
} |
||||
} |
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 07a9457a850c147049f1fb7ea4b860cf |
||||
timeCreated: 1473676955 |
||||
licenseType: Free |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Loading…
Reference in new issue