class MAGES::SceneGraph::ActivateBehavior

Overview

This behavior is performed when the user interacts with the object and presses the activation button. More…

class ActivateBehavior: public MAGES::SceneGraph::BaseBehavior
{
public:
    // properties

    UnityEvent OnActivated;
    UnityEvent OnRegisteredActivation;
    int NumberOfActivations;
    bool HapticFeedback;
    float HapticFeedbackIntensity;
    bool ActivateOnPress;
    int ActivationsCount;

    // methods

    void Rearm();
};

Inherited Members

public:
    // properties

    string ObjectID;
    BaseActionData ActionData;

Detailed Documentation

This behavior is performed when the user interacts with the object and presses the activation button.

Properties

UnityEvent OnActivated

Gets the on Activated event.

UnityEvent OnRegisteredActivation

Gets or sets an event that invokes when an Activation is registered.

int NumberOfActivations

Gets or sets the number of activations needed to perform the action.

bool HapticFeedback

Gets or sets a value indicating whether the controller will vibrate while the object is being activated.

float HapticFeedbackIntensity

Gets or sets a value indicating the intensity of the controller vibration during the activation.

bool ActivateOnPress

Gets or sets a value indicating whether the action performs according to the activation of the object. If true, the action will perform when the button is pressed. If false, the action will perform when the button is released.

int ActivationsCount

Gets the number of activations.

Methods

void Rearm()

Puts the behavior back to zero activations so the object can be activated again.

Called by the action when a condition declines the trigger. The count has latched at NumberOfActivations by then, and every further activation pushes it past that, so without this the object stays unresponsive until the user lets go of it.