Humanoid Control for Unity v4
Loading...
Searching...
No Matches
Public Attributes | Protected Member Functions | List of all members
Passer.CollisionEventHandler Class Reference

Description

Implements behaviour based on collisions.

The Collision Event Handler is a convenience component to act on collision events without programming. It is a specific implementation of an EventHandler.

The Event

The Collision Event Handler can be placed on GameObjects and Rigidbodies to catch collision events and execute functions when this happens.

The event type is as follows:

%Target Method Parameters

GameObject

When the Target Method takes a GameObject as parameter, the Target method will receive the GameObject of the collider which is touching this collider.

Boolean

When the Target Method takes a boolean parameter, a constant value can be used or the parameter can be set to From Event. When the parameter comes from the event, the boolean value is true when the collider is touching another collider and false when not.

Integer

When the Target Method takes a integer (Int32) parameter, a constant value can be used or the parameter can be set to From Event. When the parameter comes from the event, the integer value is 1 when the collider is touching another collider and 0 when not.

Float

When the Target Method takes a float (Single) parameter, a constant value can be used or the parameter can be set to From Event. When the parameters comes from the event, the float value is 1.0 when the collider is touching another collider and 0.0 when not.

Inherits MonoBehaviour.

Public Attributes

GameObjectEventHandlers collisionHandlers
 

Protected Member Functions

virtual void OnCollisionEnter (Collision collision)
 
virtual void OnCollisionExit (Collision collision)
 

Member Data Documentation

◆ collisionHandlers

GameObjectEventHandlers Passer.CollisionEventHandler.collisionHandlers
Initial value:
= new GameObjectEventHandlers() {
label = "Collision Event",
tooltip =
"Call functions using the collider state\n" +
"Parameter: the GameObject colliding with the collider",
eventTypeLabels = new string[] {
"Never",
"On Collision Start",
"On Collision End",
"While Colliding",
"While not Colliding",
"On Collision Change",
"Always"
},
}

The documentation for this class was generated from the following file: