You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
8 years ago
|
using UnityEngine;
|
||
|
|
||
|
namespace Fungus
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 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.
|
||
|
/// </summary>
|
||
|
public interface IEventHandler
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// The parent Block which owns this Event Handler.
|
||
|
/// </summary>
|
||
8 years ago
|
Block ParentBlock { get; set; }
|
||
8 years ago
|
|
||
|
/// <summary>
|
||
|
/// The Event Handler should call this method when the event is detected to start executing the Block.
|
||
|
/// </summary>
|
||
|
bool ExecuteBlock();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns custom summary text for the event handler.
|
||
|
/// </summary>
|
||
|
string GetSummary();
|
||
|
}
|
||
|
}
|