Contains extensions for IInteractor.
More...
Contains extensions for IInteractor.
◆ GetBehavior< TBehavior >()
Gets a behavior from the specified interactor.
- Template Parameters
-
TBehavior | The behavior type. |
- Parameters
-
interactor | The interactor. |
- Returns
- A behavior or
null
if not found.
- Type Constraints
-
TBehavior | : | class | |
TBehavior | : | IBehavior | |
◆ GetBehavior()
Gets a behavior from the specified interactor.
- Parameters
-
interactor | The interactor. |
type | The behavior type. |
- Returns
- A behavior or
null
if not found.
◆ WithGazeAware() [1/2]
Gets a GazeAwareBehavior for the specified interactor. The behavior will be created and added if it do not already exist.
- Parameters
-
interactor | The interactor. |
- Returns
- A gaze aware behavior.
◆ WithGazeAware() [2/2]
Gets an iterator to a sequence of GazeAwareBehavior for the specified interactors. The behaviors will be created and added if they does not already exist.
- Parameters
-
interactors | The interactors. |
- Returns
- An iterator to a sequence of gaze aware behaviors.
◆ WithGazeAware< TInteractor >() [1/2]
Adds a GazeAwareBehavior on the specified interactor if it is not present, and configures it using the specified action .
- Template Parameters
-
- Parameters
-
- Returns
- The interactor.
- Type Constraints
-
TInteractor | : | IMutableBehaviorsInteractor | |
◆ WithGazeAware< TInteractor >() [2/2]
Adds a GazeAwareBehavior on all the specified interactors if it is not present, and configures them using the specified action .
- Template Parameters
-
- Parameters
-
interactors | The interactors. |
action | The action to configure the GazeAwareBehaviors with. |
- Returns
- The interactors.
- Type Constraints
-
TInteractor | : | IMutableBehaviorsInteractor | |
◆ GetOrAdd< TBehavior >()
Gets a specific behavior from a sequence of interactors. The behaviors will be created and added if they do not already exist on the interactor.
- Template Parameters
-
TBehavior | The behavior type. |
- Parameters
-
interactors | The interactors. |
- Returns
- A sequence of behaviors.
- Type Constraints
-
TBehavior | : | class | |
TBehavior | : | IBehavior | |
TBehavior | : | new() | |
◆ GetOrAdd< TInteractor, TBehavior >() [1/2]
static TInteractor GetOrAdd< TInteractor, TBehavior > |
( |
this TInteractor |
interactor, |
|
|
Action< TBehavior > |
action |
|
) |
| |
|
inlinestatic |
Gets a specific behavior from an interactor and configures it using the specified action. The behavior will be created and added if it do not already exist on the interactor.
- Template Parameters
-
TInteractor | The interactor type. |
TBehavior | The behavior type. |
- Parameters
-
interactor | The interactor. |
action | The action used to configure the behavior. |
- Returns
- The same TInteractor instance so that multiple calls can be chained.
- Type Constraints
-
TInteractor | : | IMutableBehaviorsInteractor | |
TBehavior | : | class | |
TBehavior | : | IBehavior | |
TBehavior | : | new() | |
◆ GetOrAdd< TInteractor, TBehavior >() [2/2]
static IEnumerable<TInteractor> GetOrAdd< TInteractor, TBehavior > |
( |
this IEnumerable< TInteractor > |
interactors, |
|
|
Action< TBehavior > |
action |
|
) |
| |
|
inlinestatic |
Gets a specific behavior from a sequence of interactors and configures it using the specified action. The behaviors will be created and added if they do not already exist on the interactor.
- Template Parameters
-
TInteractor | The interactor type. |
TBehavior | The behavior type. |
- Parameters
-
interactors | The interactors. |
action | The action used to configure the behaviors. |
- Returns
- The same IEnumerable<TInteractor> instance so that multiple calls can be chained.
- Type Constraints
-
TInteractor | : | IMutableBehaviorsInteractor | |
TBehavior | : | class | |
TBehavior | : | IBehavior | |
TBehavior | : | new() | |
The documentation for this class was generated from the following file: