blob: 426c8a503de6d595bac43381a7e3ce78b76599bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
namespace UNEB
{
public abstract class ActionBase
{
public ActionManager manager;
/// <summary>
/// Can be used to check if the action is a valid state for furthur execution.
/// For example, we only want to run delete node if a node is selected for deletion.
/// </summary>
/// <returns></returns>
public virtual bool Init() { return true; }
public abstract void Do();
/// <summary>
/// Called when the action is removed from the undo/redo buffers.
/// </summary>
public virtual void OnDestroy() { }
}
}
|