-
Notifications
You must be signed in to change notification settings - Fork 2
/
ITrigger.cs
32 lines (31 loc) · 958 Bytes
/
ITrigger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace Game.FSM
{
/// <summary>
/// Transition trigger w/o data.
/// </summary>
public interface ITrigger
{
/// <summary>
/// Triggers the transition.
/// </summary>
/// <remarks>
/// Transition will only initiate after the current State Event is handled for the active state sub-branch.
/// </remarks>
void Invoke();
}
/// <summary>
/// Transition trigger with one data argument.
/// </summary>
/// <typeparam name="TArg">Type of the data argument.</typeparam>
public interface ITrigger<in TArg>
{
/// <summary>
/// Triggers the transition with a specified data argument.
/// </summary>
/// <remarks>
/// Transition will only initiate after the current State Event is handled for the active state sub-branch.
/// </remarks>
/// <param name="arg"></param>
void Invoke(TArg arg);
}
}