class MAGES::SceneGraph::ManagedObject¶
Overview¶
An object that is managed by the scene graph. More…
class ManagedObject: public MonoBehaviour { public: // methods void Bind(GraphRunner runner, BaseActionData data); ManagedObject DestroyOnPerform(bool destroyOnPerform); ManagedObject Initialized(Action onInitialize); ManagedObject Performed(Action onPerform); ManagedObject Undone(Action onUndo); ManagedObject FirstSelectEntered(Action action); ManagedObject SelectEntered(Action action); string GetSpawnActionId(); };
Detailed Documentation¶
An object that is managed by the scene graph.
Added at runtime in order to bind the object’s lifetime to an action.
Methods¶
void Bind(GraphRunner runner, BaseActionData data)
Bind the object’s lifetime to an action.
Parameters:
runner |
The graph runner. |
data |
The action to which this object’s lifetime will be bound to. |
ManagedObject DestroyOnPerform(bool destroyOnPerform)
Destroy the object after the action is performed.
Parameters:
destroyOnPerform |
Set to true to destroy. |
Returns:
Self.
ManagedObject Initialized(Action onInitialize)
Call a method or lambda when initialized.
Parameters:
onInitialize |
The method or lambda to call. |
Returns:
Self.
ManagedObject Performed(Action onPerform)
Call a method or lambda when performed.
Parameters:
onPerform |
The method or lambda to call. |
Returns:
Self.
ManagedObject Undone(Action onUndo)
Call a method or lambda when undone.
Parameters:
onUndo |
The method or lambda to call. |
Returns:
Self.
ManagedObject FirstSelectEntered(Action action)
Call a method or lambda when the first select enter interaction is triggered.
Parameters:
action |
The action to invoke. |
Returns:
Self.
ManagedObject SelectEntered(Action action)
Call a method or lambda when the select enter interaction is triggered.
Parameters:
action |
The action to invoke. |
Returns:
Self.
string GetSpawnActionId()
Get the action ID to which this object’s lifetime is bound to.
Returns:
The ActionID that spawned this object.