diff --git a/Assets/Fungus/Scripts/Components/EventHandler.cs b/Assets/Fungus/Scripts/Components/EventHandler.cs index 6699cc39..c40925b6 100644 --- a/Assets/Fungus/Scripts/Components/EventHandler.cs +++ b/Assets/Fungus/Scripts/Components/EventHandler.cs @@ -35,16 +35,22 @@ namespace Fungus [RequireComponent(typeof(Block))] [RequireComponent(typeof(Flowchart))] [AddComponentMenu("")] - public class EventHandler : MonoBehaviour, IEventHandler + public class EventHandler : MonoBehaviour { [HideInInspector] [FormerlySerializedAs("parentSequence")] [SerializeField] protected Block parentBlock; - #region IEventHandler + #region Public methods + /// + /// The parent Block which owns this Event Handler. + /// public virtual Block ParentBlock { get { return parentBlock; } set { parentBlock = value; } } + /// + /// The Event Handler should call this method when the event is detected to start executing the Block. + /// public virtual bool ExecuteBlock() { if (ParentBlock == null) @@ -68,6 +74,9 @@ namespace Fungus return flowchart.ExecuteBlock(ParentBlock); } + /// + /// Returns custom summary text for the event handler. + /// public virtual string GetSummary() { return ""; diff --git a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs deleted file mode 100644 index 4baa1669..00000000 --- a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs +++ /dev/null @@ -1,31 +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) - -namespace Fungus -{ - /// - /// A Block may have an associated Event Handler which starts executing commands when - /// a specific event occurs. - /// To create a custom Event Handler, simply subclass EventHandler and call the ExecuteBlock() method - /// when the event occurs. - /// Add an EventHandlerInfo attibute and your new EventHandler class will automatically appear in the - /// 'Execute On Event' dropdown menu when a block is selected. - /// - public interface IEventHandler - { - /// - /// The parent Block which owns this Event Handler. - /// - Block ParentBlock { get; set; } - - /// - /// The Event Handler should call this method when the event is detected to start executing the Block. - /// - bool ExecuteBlock(); - - /// - /// Returns custom summary text for the event handler. - /// - string GetSummary(); - } -} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs.meta b/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs.meta deleted file mode 100644 index 9c74a406..00000000 --- a/Assets/Fungus/Scripts/Interfaces/IEventHandler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5ae3dddb3147c4a07a851843721affe8 -timeCreated: 1473856414 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: