class MAGES::SceneGraph::ManagedObject¶
Overview¶
An object that is managed by the scene graph. More…
class ManagedObject: public MonoBehaviour { public: // properties BaseActionData BindedAction; // methods static ManagedObject GetActionManagedObject( GameObject gameObject, BaseActionData action ); void Bind(GraphRunner runner, BaseActionData data); ManagedObject DestroyOnPerform(bool destroyOnPerform); ManagedObject DestroyOnUndo(bool destroyOnUndo); ManagedObject Initialized(Action onInitialize); ManagedObject Performed(Action onPerform); ManagedObject Undone(Action onUndo); ManagedObject FirstSelectEntered(Action action); ManagedObject SelectEntered(Action action); ManagedObject SelectExited(Action action); string GetSpawnActionId(); bool GetDestroyOnPerform(); bool GetDestroyOnUndo(); };
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.
Properties¶
BaseActionData BindedAction
Gets the action data that is bound to this object.
Methods¶
static ManagedObject GetActionManagedObject( GameObject gameObject, BaseActionData action )
Returns the ManagedObject component of the gameobject based on the given action.
Parameters:
gameObject |
The gameobject to get the ManagedObject from. |
action |
The desired action ManagedObject. |
Returns:
The ManagedObject of the gameobject that corresponds to the action given.
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 DestroyOnUndo(bool destroyOnUndo)
Destroy the object after the action is undone.
Parameters:
destroyOnUndo |
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.
ManagedObject SelectExited(Action action)
Call a method or lambda when the select exit interaction is triggered.
Parameters:
action |
The action to run. |
Returns:
Self.
string GetSpawnActionId()
Get the action ID to which this object’s lifetime is bound to.
Returns:
The ActionID that spawned this object.
bool GetDestroyOnPerform()
Gets the DestroyOnPerform value.
Returns:
The DestroyOnPerform value.
bool GetDestroyOnUndo()
Gets the DestroyOnUndo value.
Returns:
The DestroyOnUndo value.