Simulation.Affordance Class Reference

An affordance is the opportunity granted by an object to an agent to perform an action. More...

Public Member Functions

Slot.Result ProlongLastInteraction ()
 Prolong the last interaction. Only available if interaction already finished, will then restart without setting the frame the animation started in. More...
 
Slot.Result StartInteraction (string name)
 Start Interaction by name. More...
 
Slot.Result StartRandomInteraction ()
 From all interactions registered at this affordance, pick one randomly More...
 
bool AddInteraction (Interaction interaction)
 Make an interaction available at this affordance More...
 

Properties

bool InteractionStartedThisFrame [get]
 Whether the interaction was started in the current frame More...
 
Interaction CurrentInteraction [get]
 This will return null if the remaining duration is 0. More...
 
bool HasInteraction [get]
 Whether an actual Interaction is available behind this affordance. More...
 

Detailed Description

An affordance is the opportunity granted by an object to an agent to perform an action.

Member Function Documentation

bool Simulation.Affordance.AddInteraction ( Interaction  interaction)

Make an interaction available at this affordance

Parameters
interactionThe interaction you want to add.
Slot.Result Simulation.Affordance.ProlongLastInteraction ( )

Prolong the last interaction. Only available if interaction already finished, will then restart without setting the frame the animation started in.

Returns
NoProlongableInteraction if none is found. The result of StartInteraction otherwise.
Slot.Result Simulation.Affordance.StartInteraction ( string  name)

Start Interaction by name.

Parameters
name
Returns
Slot.Result Simulation.Affordance.StartRandomInteraction ( )

From all interactions registered at this affordance, pick one randomly

Returns

Property Documentation

Interaction Simulation.Affordance.CurrentInteraction
get

This will return null if the remaining duration is 0.

bool Simulation.Affordance.HasInteraction
get

Whether an actual Interaction is available behind this affordance.

bool Simulation.Affordance.InteractionStartedThisFrame
get

Whether the interaction was started in the current frame


The documentation for this class was generated from the following file:
  • Affordance.cs