diff --git a/Assets/Fungus/Narrative/Scripts/CustomTag.cs b/Assets/Fungus/Narrative/Scripts/CustomTag.cs index 73a244df..de1314ea 100644 --- a/Assets/Fungus/Narrative/Scripts/CustomTag.cs +++ b/Assets/Fungus/Narrative/Scripts/CustomTag.cs @@ -12,17 +12,17 @@ namespace Fungus [ExecuteInEditMode] public class CustomTag : MonoBehaviour { + [Tooltip("String that defines the start of the tag.")] [SerializeField] protected string tagStartSymbol; - public virtual string TagStartSymbol { get { return tagStartSymbol; } } + [Tooltip("String that defines the end of the tag.")] [SerializeField] protected string tagEndSymbol; - public virtual string TagEndSymbol { get { return tagEndSymbol; } } + [Tooltip("String to replace the start tag with.")] [SerializeField] protected string replaceTagStartWith; - public virtual string ReplaceTagStartWith { get { return replaceTagStartWith; } } + [Tooltip("String to replace the end tag with.")] [SerializeField] protected string replaceTagEndWith; - public virtual string ReplaceTagEndWith { get { return replaceTagEndWith; } } static public List activeCustomTags = new List(); @@ -38,5 +38,17 @@ namespace Fungus { activeCustomTags.Remove(this); } + + #region ICustomTag implementation + + public virtual string TagStartSymbol { get { return tagStartSymbol; } } + + public virtual string TagEndSymbol { get { return tagEndSymbol; } } + + public virtual string ReplaceTagStartWith { get { return replaceTagStartWith; } } + + public virtual string ReplaceTagEndWith { get { return replaceTagEndWith; } } + + #endregion } } \ No newline at end of file diff --git a/Assets/Fungus/Narrative/Scripts/ICustomTag.cs b/Assets/Fungus/Narrative/Scripts/ICustomTag.cs new file mode 100644 index 00000000..d0f38781 --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/ICustomTag.cs @@ -0,0 +1,28 @@ +namespace Fungus +{ + /// + /// Create custom tags for use in Say text. + /// + public interface ICustomTag + { + /// + /// String that defines the start of the tag. + /// + string TagStartSymbol { get; } + + /// + /// String that defines the end of the tag. + /// + string TagEndSymbol { get; } + + /// + /// String to replace the start tag with. + /// + string ReplaceTagStartWith { get; } + + /// + /// String to replace the end tag with. + /// + string ReplaceTagEndWith { get; } + } +} diff --git a/Assets/Fungus/Narrative/Scripts/ICustomTag.cs.meta b/Assets/Fungus/Narrative/Scripts/ICustomTag.cs.meta new file mode 100644 index 00000000..b6b9ec49 --- /dev/null +++ b/Assets/Fungus/Narrative/Scripts/ICustomTag.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 59af36c15380c4854860339298d3779e +timeCreated: 1473680400 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: