Browse Source

Reverted IConversationManager interface

master
Christopher 8 years ago
parent
commit
ebc63819f8
  1. 23
      Assets/Fungus/Scripts/Interfaces/IConversationManager.cs
  2. 12
      Assets/Fungus/Scripts/Interfaces/IConversationManager.cs.meta
  3. 13
      Assets/Fungus/Scripts/Utils/ConversationManager.cs

23
Assets/Fungus/Scripts/Interfaces/IConversationManager.cs

@ -1,23 +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 System.Collections;
namespace Fungus
{
/// <summary>
/// Helper class to manage parsing and executing the conversation format.
/// </summary>
public interface IConversationManager
{
/// <summary>
/// Caches the character objects in the scene for fast lookup during conversations.
/// </summary>
void PopulateCharacterCache();
/// <summary>
/// Parse and execute a conversation string.
/// </summary>
IEnumerator DoConversation(string conv);
}
}

12
Assets/Fungus/Scripts/Interfaces/IConversationManager.cs.meta

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 3a7ff247990a84e1a96765d1c03735b6
timeCreated: 1473679803
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

13
Assets/Fungus/Scripts/Utils/ConversationManager.cs

@ -9,7 +9,10 @@ using System.Text;
namespace Fungus.Utils
{
public class ConversationManager : IConversationManager
/// <summary>
/// Helper class to manage parsing and executing the conversation format.
/// </summary>
public class ConversationManager
{
protected struct ConversationItem
{
@ -261,14 +264,20 @@ namespace Fungus.Utils
return item;
}
#region IConversationManager
#region Public methods
/// <summary>
/// Caches the character objects in the scene for fast lookup during conversations.
/// </summary>
public void PopulateCharacterCache()
{
// cache characters for faster lookup
characters = UnityEngine.Object.FindObjectsOfType<Character>();
}
/// <summary>
/// Parse and execute a conversation string.
/// </summary>
public IEnumerator DoConversation(string conv)
{
if (string.IsNullOrEmpty(conv))

Loading…
Cancel
Save