ActionStack

A stack of actions performed in the game

Actions can be undone and redone. Pushing a new action to the stack will overwrite actions past the current top cursor.

Members

Functions

canRedo
bool canRedo()

Returns true if there's any actions left to redo

canUndo
bool canUndo()

Returns true if there's any actions left to undo

clear
void clear()

Clear the action stack

empty
bool empty()

Gets whether the action stack is empty.

get
ActionT get()

Get the current top of the stack

push
ActionT push(ActionT item)

Push an action to the stack

redo
ActionT redo()

Redo an action

undo
ActionT undo()

Undo an action

Meta