-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStateMachine.IPopupState.cs
More file actions
24 lines (22 loc) · 947 Bytes
/
StateMachine.IPopupState.cs
File metadata and controls
24 lines (22 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
namespace BAStudio.StatePattern
{
public partial class StateMachine<T>
{
/// <summary>
/// PopupStates are specialized to be works on its own. It ends itself and does not make transition to other states.
/// PopupStates are kept in a list so theorically unlimited ones can be added.
/// PopupStates are not cached and will be broadcasted by events; it serves as result data of itself.
/// </summary>
public interface IPopupState
{
void OnStarting(StateMachine<T> machine, T subject, object parameter = null);
void OnEnding(StateMachine<T> machine, T subject, object parameter = null);
void Update(StateMachine<T> machine, T subject);
#if UNITY_2017_1_OR_NEWER
public virtual void FixedUpdate(StateMachine<T> machine, T subject) {}
public virtual void LateUpdate(StateMachine<T> machine, T subject) {}
#endif
}
}
}