class MAGES::SceneGraph::GraphRunner

Overview

An object that can run a single graph. More…

class GraphRunner: public MonoBehaviour
{
public:
    // properties

    SceneGraphData RuntimeGraph;
    SceneGraphData OriginalGraph;
    ActionInitializedEvent ActionInitialized;
    ActionPerformedEvent ActionPerformed;
    ActionUndoneEvent ActionUndone;
    ActionStateChangeEvent ActionStateChanged;

    // methods

    void Perform(bool skip = false);
    void Undo();
    void PerformAction(BaseActionData data, bool skip = false);
    void UndoAction(BaseActionData data);
    void StartGraph();
    void InitializeAction(BaseActionData data);
};

Detailed Documentation

An object that can run a single graph.

Properties

SceneGraphData RuntimeGraph

Gets or sets the graph data.

SceneGraphData OriginalGraph

Gets or sets the original graph data.

ActionInitializedEvent ActionInitialized

Gets or sets the action initialized event.

ActionPerformedEvent ActionPerformed

Gets or sets the action performed event.

ActionUndoneEvent ActionUndone

Gets or sets the action performed event.

ActionStateChangeEvent ActionStateChanged

Gets or sets the action state changed event.

Methods

void Perform(bool skip = false)

Perform the currently running actions.

Parameters:

skip

Set to true if user has skipped the action.

void Undo()

Undo the currently running actions.

void PerformAction(BaseActionData data, bool skip = false)

Perform an action.

Parameters:

data

The action.

skip

Set to true if the user skipped it.

void UndoAction(BaseActionData data)

Undo an action.

Parameters:

data

The action.

void StartGraph()

Initialize the graph and start simulating the actions.

void InitializeAction(BaseActionData data)

Initialize an action.

Parameters:

data

The action data.