Christopher
8 years ago
9 changed files with 58 additions and 103 deletions
@ -1,75 +0,0 @@
|
||||
// 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 |
||||
{ |
||||
/// <summary> |
||||
/// Display story text in a visual novel style dialog box. |
||||
/// </summary> |
||||
public interface ISayDialog |
||||
{ |
||||
/// <summary> |
||||
/// Sets the active state of the Say Dialog gameobject. |
||||
/// </summary> |
||||
void SetActive(bool state); |
||||
|
||||
/// <summary> |
||||
/// Sets the active speaking character. |
||||
/// </summary> |
||||
/// <param name="character">The active speaking character.</param> |
||||
/// <param name="flowchart">An optional Flowchart to use for variable substitution in the character name string.</param> |
||||
void SetCharacter(Character character, IFlowchart flowchart = null); |
||||
|
||||
/// <summary> |
||||
/// Sets the character image to display on the Say Dialog. |
||||
/// </summary> |
||||
void SetCharacterImage(Sprite image); |
||||
|
||||
/// <summary> |
||||
/// Sets the character name to display on the Say Dialog. |
||||
/// </summary> |
||||
void SetCharacterName(string name, Color color); |
||||
|
||||
/// <summary> |
||||
/// Write a line of story text to the Say Dialog. Starts coroutine automatically. |
||||
/// </summary> |
||||
/// <param name="text">The text to display.</param> |
||||
/// <param name="clearPrevious">Clear any previous text in the Say Dialog.</param> |
||||
/// <param name="waitForInput">Wait for player input before continuing once text is written.</param> |
||||
/// <param name="fadeWhenDone">Fade out the Say Dialog when writing and player input has finished.</param> |
||||
/// <param name="stopVoiceover">Stop any existing voiceover audio before writing starts.</param> |
||||
/// <param name="voiceOverClip">Voice over audio clip to play.</param> |
||||
/// <param name="onComplete">Callback to execute when writing and player input have finished.</param> |
||||
void Say(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, System.Action onComplete); |
||||
|
||||
/// <summary> |
||||
/// Write a line of story text to the Say Dialog. Must be started as a coroutine. |
||||
/// </summary> |
||||
/// <param name="text">The text to display.</param> |
||||
/// <param name="clearPrevious">Clear any previous text in the Say Dialog.</param> |
||||
/// <param name="waitForInput">Wait for player input before continuing once text is written.</param> |
||||
/// <param name="fadeWhenDone">Fade out the Say Dialog when writing and player input has finished.</param> |
||||
/// <param name="stopVoiceover">Stop any existing voiceover audio before writing starts.</param> |
||||
/// <param name="voiceOverClip">Voice over audio clip to play.</param> |
||||
/// <param name="onComplete">Callback to execute when writing and player input have finished.</param> |
||||
IEnumerator DoSay(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, System.Action onComplete); |
||||
|
||||
/// <summary> |
||||
/// Tell the Say Dialog to fade out once writing and player input have finished. |
||||
/// </summary> |
||||
bool FadeWhenDone { set; } |
||||
|
||||
/// <summary> |
||||
/// Stop the Say Dialog while its writing text. |
||||
/// </summary> |
||||
void Stop(); |
||||
|
||||
/// <summary> |
||||
/// Stops writing text and clears the Say Dialog. |
||||
/// </summary> |
||||
void Clear(); |
||||
} |
||||
} |
@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: a1a9184c86a4048d5973b766e9fd6803 |
||||
timeCreated: 1473421269 |
||||
licenseType: Free |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Loading…
Reference in new issue