using UnityEngine;
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();
}
}