class MAGES::SceneGraph::AnimationBehavior

Overview

Behavior that handles the Animation action. More…

class AnimationBehavior: public MAGES::SceneGraph::BaseBehavior
{
public:
    // enums

    enum UsedHandType;

    // properties

    UnityEvent OnAnimated;
    UsedHandType UsedHand;
    GameObject PlayAlongAnimatedObject;
    float NormalizedDistance;
    bool RevertOnRelease;
    bool ForwardOnly;
    string AnimatorStateName;
    string AnimatorLayerName;

    // methods

    void ActionCompleted();
    void ProgressAnimator(float normalizedDistance);
};

Inherited Members

public:
    // properties

    string ObjectID;
    BaseActionData ActionData;

Detailed Documentation

Behavior that handles the Animation action.

Properties

UnityEvent OnAnimated

Gets the on triggered event.

UsedHandType UsedHand

Gets or sets The hand that will interact with the animated object.

GameObject PlayAlongAnimatedObject

Gets or sets the object which will play its animation in sync with the animated object.

float NormalizedDistance

Gets or sets the normalized distance of the animation.

bool RevertOnRelease

Gets or sets a value indicating whether an animation will revert back to its original state on Release.

bool ForwardOnly

Gets or sets a value indicating whether an animation can be played backwards or not.

string AnimatorStateName

Gets or sets the name of the state to play.

string AnimatorLayerName

Gets or sets the name of the animator layer.

Methods

void ActionCompleted()

Runs all the methods to complete the Action as it should.

void ProgressAnimator(float normalizedDistance)

Moves the animator to a specific point in the animation.

Parameters:

normalizedDistance

The time to play the animation.