class MAGES::SceneGraph::InsertBehavior

Overview

Behavior that handles the Insert action. More…

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

    UnityEvent OnInserted;
    float InsertedAngleDiff;
    GameObject FinalPosition;
    float AngleTolerance;
    InsertionType InsertionType;
    bool SelectedInsertion;

    // methods

    void Start();
    void FinalizeAction();
    void Rearm();
};

Inherited Members

public:
    // properties

    string ObjectID;
    BaseActionData ActionData;

Detailed Documentation

Behavior that handles the Insert action.

Properties

UnityEvent OnInserted

Gets the on triggered event.

float InsertedAngleDiff

Gets the angle difference between the inserted object and the final position.

GameObject FinalPosition

Gets or sets the inal position of the insert Action.

float AngleTolerance

Gets or sets the insertion angle. If angle tolerance is 0, the object must be inserted at the exact angle.

InsertionType InsertionType

Gets or sets the insertion type.

bool SelectedInsertion

Gets or sets a value indicating whether the object must be inserted while being selected.

Methods

void Start()

Initialize the script.

void FinalizeAction()

Finalizes the action of inserting the object.

void Rearm()

Lets the object be inserted again, once it has left the final position.

Called by the action when a condition declines the trigger, after it has moved the object back to where it spawned. That spawn pose can be inside the final position’s volume, and nothing else stops OnTriggerStay from inserting it again on the spot, so leaving the volume is what actually re-opens the gate. The Ghost the insertion consumed does not come back: it belongs to the effect, not to this behavior.