6 changed files with 52 additions and 14 deletions
@ -0,0 +1,30 @@
|
||||
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> |
||||
IBlock ParentBlock { get; set; } |
||||
|
||||
/// <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(); |
||||
} |
||||
} |
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 5ae3dddb3147c4a07a851843721affe8 |
||||
timeCreated: 1473856414 |
||||
licenseType: Free |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Loading…
Reference in new issue