Class Manus::Interaction::RockerSwitch
ClassList > Manus > Interaction > RockerSwitch
A rocker switch implementation, has an On and Off state.
Inherits the following classes: MonoBehaviour, Manus::Interaction::IValue
Public Attributes
| Type | Name | 
|---|---|
| CollisionArea[] | collisionAreasOff   Collision areas that are used to trigger the Off state.  | 
| CollisionArea[] | collisionAreasOn   Collision areas that are used to trigger the On state.  | 
| bool | initialState   = = false This is the initial state of the object when it is enabled, true for On and false for Off.  | 
| Action< RockerSwitch > | onStateOff   The action called when the state changes to Off.  | 
| Action< RockerSwitch > | onStateOn   The action called when the state changes to On.  | 
| Transform | pivot   = = null The pivot used to rotate around when changing states.  | 
| Vector3 | pivotExtentlocalRotation   = = new Vector3(10.0f, 0.0f, 0.0f) The rotational extents used to rotate when changing states.  | 
Public Properties
| Type | Name | 
|---|---|
| property float | normalizedValue   The normalized value.  | 
| property float | value   The value, this value is either 1 or 0.  | 
Public Properties inherited from Manus::Interaction::IValue
See Manus::Interaction::IValue
| Type | Name | 
|---|---|
| property float | normalizedValue   | 
| property float | value   | 
Public Functions
| Type | Name | 
|---|---|
| void | OnCollisionAreasChanged (CollisionArea p_Area)  This function is called when a collision area changes. This could mean an object either started or stopped touching the collision area.  | 
Protected Attributes
| Type | Name | 
|---|---|
| bool | m_State   = = false | 
Protected Functions
| Type | Name | 
|---|---|
| void | SetState (bool p_State)  Sets the switch's state and invokes the desired actions.  | 
Public Attributes Documentation
variable collisionAreasOff
variable collisionAreasOn
variable initialState
variable onStateOff
variable onStateOn
variable pivot
variable pivotExtentlocalRotation
Public Properties Documentation
property normalizedValue
Implements Manus::Interaction::IValue::normalizedValue
property value
Implements Manus::Interaction::IValue::value
Public Functions Documentation
function OnCollisionAreasChanged
This function is called when a collision area changes. This could mean an object either started or stopped touching the collision area.
Parameters:
p_AreaThe area that changed
Protected Attributes Documentation
variable m_State
Protected Functions Documentation
function SetState
Sets the switch's state and invokes the desired actions.
Parameters:
p_StateTrue for On and False for Off
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Interaction/RockerSwitch.cs