All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | Public Attributes | Properties | List of all members
InteractionSystem Class Reference

Handles FBBIK interactions for a character. More...

Inherits MonoBehaviour.

Collaboration diagram for InteractionSystem:
Collaboration graph
[legend]

Public Member Functions

bool IsInInteraction (FullBodyBipedEffector effectorType)
 Determines whether this effector is interaction and not paused More...
 
bool IsPaused (FullBodyBipedEffector effectorType)
 Determines whether this effector is paused More...
 
bool IsPaused ()
 Returns true if any of the effectors is paused More...
 
bool IsInSync ()
 Returns true if either all effectors in interaction are paused or none is. More...
 
bool StartInteraction (FullBodyBipedEffector effectorType, InteractionObject interactionObject, bool interrupt)
 Starts the interaction between an effector and an interaction object. More...
 
bool StartInteraction (FullBodyBipedEffector effectorType, InteractionObject interactionObject, InteractionTarget target, bool interrupt)
 Starts the interaction between an effector and a specific interaction target. More...
 
bool PauseInteraction (FullBodyBipedEffector effectorType)
 Pauses the interaction of an effector. More...
 
bool ResumeInteraction (FullBodyBipedEffector effectorType)
 Resumes the paused interaction of an effector. More...
 
bool StopInteraction (FullBodyBipedEffector effectorType)
 Stops the interaction of an effector. More...
 
void PauseAll ()
 Pauses all the interaction effectors. More...
 
void ResumeAll ()
 Resumes all the paused interaction effectors. More...
 
void StopAll ()
 Stops all interactions. More...
 
InteractionObject GetInteractionObject (FullBodyBipedEffector effectorType)
 Gets the current interaction object of an effector. More...
 
float GetProgress (FullBodyBipedEffector effectorType)
 Gets the progress of any interaction with the specified effector. More...
 
float GetMinActiveProgress ()
 Gets the minimum progress of any active interaction More...
 
bool TriggerInteraction (int index, bool interrupt)
 Triggers all interactions of an InteractionTrigger. Returns false if unsuccessful (maybe out of range). More...
 
bool TriggerInteraction (int index, bool interrupt, out InteractionObject interactionObject)
 Triggers all interactions of an InteractionTrigger. Returns false if unsuccessful (maybe out of range). More...
 
bool TriggerInteraction (int index, bool interrupt, out InteractionTarget interactionTarget)
 Triggers all interactions of an InteractionTrigger. Returns false if unsuccessful (maybe out of range). More...
 
InteractionTrigger.Range GetClosestInteractionRange ()
 Gets the closest InteractionTrigger Range. More...
 
InteractionObject GetClosestInteractionObjectInRange ()
 Gets the closest InteractionObject in range. More...
 
InteractionTarget GetClosestInteractionTargetInRange ()
 Gets the closest InteractionTarget in range. More...
 
InteractionObject[] GetClosestInteractionObjectsInRange ()
 Gets the closest InteractionObjects in range. More...
 
InteractionTarget[] GetClosestInteractionTargetsInRange ()
 Gets the closest InteractionTargets in range. More...
 
bool TriggerEffectorsReady (int index)
 Returns true if all effectors of a trigger are either not in interaction or paused More...
 
InteractionTrigger.Range GetTriggerRange (int index)
 Return the current most appropriate range of an InteractionTrigger listed in triggersInRange. More...
 
int GetClosestTriggerIndex ()
 Returns the InteractionTrigger that is in range and closest to the character. More...
 
delegate void InteractionDelegate (FullBodyBipedEffector effectorType, InteractionObject interactionObject)
 Interaction delegate More...
 
delegate void InteractionEventDelegate (FullBodyBipedEffector effectorType, InteractionObject interactionObject, InteractionObject.InteractionEvent interactionEvent)
 Interaction event delegate More...
 

Public Attributes

string targetTag = ""
 If not empty, only the targets with the specified tag will be used by this Interaction System. More...
 
float fadeInTime = 0.3f
 The fade in time of the interaction. More...
 
float speed = 1f
 The master speed for all interactions. More...
 
float resetToDefaultsSpeed = 1f
 If > 0, lerps all the FBBIK channels used by the Interaction System back to their default or initial values when not in interaction. More...
 
Collider characterCollider
 The collider that registers OnTriggerEnter and OnTriggerExit events with InteractionTriggers. More...
 
Transform FPSCamera
 Will be used by Interaction Triggers that need the camera's position. Assign the first person view character camera. More...
 
LayerMask camRaycastLayers
 The layers that will be raycasted from the camera (along camera.forward). All InteractionTrigger look at target colliders should be included. More...
 
float camRaycastDistance = 1f
 Max distance of raycasting from the camera. More...
 
InteractionDelegate OnInteractionStart
 Called when an InteractionEvent has been started More...
 
InteractionDelegate OnInteractionPause
 Called when an Interaction has been paused More...
 
InteractionDelegate OnInteractionPickUp
 Called when an InteractionObject has been picked up. More...
 
InteractionDelegate OnInteractionResume
 Called when a paused Interaction has been resumed More...
 
InteractionDelegate OnInteractionStop
 Called when an Interaction has been stopped More...
 
InteractionEventDelegate OnInteractionEvent
 Called when an interaction event occurs. More...
 
RaycastHit raycastHit
 Gets the RaycastHit from trigger seeking. More...
 
InteractionLookAt lookAt = new InteractionLookAt()
 Handles looking at the interactions. More...
 

Properties

bool inInteraction [get]
 Returns true if any of the effectors is in interaction and not paused. More...
 
FullBodyBipedIK ik [get, set]
 Gets the FullBodyBipedIK component. More...
 
List< InteractionTriggertriggersInRange [get, set]
 Gets the in contact. More...
 

Detailed Description

Handles FBBIK interactions for a character.