Browse Source

Reverted ITextTagParser interface

master
Christopher 8 years ago
parent
commit
ced1af5bdf
  1. 2
      Assets/Fungus/Scripts/Components/Writer.cs
  2. 13
      Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs
  3. 12
      Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs.meta
  4. 7
      Assets/Fungus/Scripts/Utils/TextTagParser.cs

2
Assets/Fungus/Scripts/Components/Writer.cs

@ -833,7 +833,7 @@ namespace Fungus
tokenText += "{wi}"; tokenText += "{wi}";
} }
ITextTagParser tagParser = new TextTagParser(); var tagParser = new TextTagParser();
List<TextTagToken> tokens = tagParser.Tokenize(tokenText); List<TextTagToken> tokens = tagParser.Tokenize(tokenText);
gameObject.SetActive(true); gameObject.SetActive(true);

13
Assets/Fungus/Scripts/Interfaces/ITextTagParser.cs

@ -1,13 +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.Generic;
using Fungus.Utils;
namespace Fungus
{
public interface ITextTagParser
{
List<TextTagToken> Tokenize(string storyText);
}
}

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

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

7
Assets/Fungus/Scripts/Utils/TextTagParser.cs

@ -10,7 +10,7 @@ namespace Fungus.Utils
/// <summary> /// <summary>
/// Parses a string for special Fungus text tags. /// Parses a string for special Fungus text tags.
/// </summary> /// </summary>
public class TextTagParser : ITextTagParser public class TextTagParser
{ {
public static string GetTagHelp() public static string GetTagHelp()
{ {
@ -217,8 +217,11 @@ namespace Fungus.Utils
return paramsList; return paramsList;
} }
#region ITextTagParser implementation #region Public methods
/// <summary>
/// Processes a block of story text and converts it to a list of tokens.
/// </summary>
public virtual List<TextTagToken> Tokenize(string storyText) public virtual List<TextTagToken> Tokenize(string storyText)
{ {
List<TextTagToken> tokens = new List<TextTagToken>(); List<TextTagToken> tokens = new List<TextTagToken>();

Loading…
Cancel
Save