Click or drag to resize

PlayerMouse Class

A virtual mouse that can be used to drive a sprite or software mouse pointer. It uses a Rewired Player to move the pointer position and as the source for the buttons and axes. This is a component wrapper for Player Mouse which can be added to a GameObject.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          Rewired.ComponentsComponentWrapperPlayerController
            Rewired.ComponentsPlayerController
              Rewired.ComponentsPlayerMouse

Namespace: Rewired.Components
Assembly: Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
[SerializableAttribute]
public sealed class PlayerMouse : PlayerController

The PlayerMouse type exposes the following members.

Constructors
 NameDescription
Public methodPlayerMouseInitializes a new instance of the PlayerMouse class
Top
Properties
 NameDescription
Public propertyanimation
(Inherited from Component)
Obsolete
Public propertyaudio
(Inherited from Component)
Obsolete
Public propertyaxes The list of Axes in the controller.
(Inherited from PlayerController)
Public propertyaxisCount The number of Axes in the controller.
(Inherited from PlayerController)
Public propertybuttonCount The number of Buttons in the controller.
(Inherited from PlayerController)
Public propertybuttons The list of Buttons in the controller.
(Inherited from PlayerController)
Public propertycamera
(Inherited from Component)
Obsolete
Public propertyclampToMovementArea If enabled, movement will be clamped to the movementArea.
Public propertycollider
(Inherited from Component)
Obsolete
Public propertycollider2D
(Inherited from Component)
Obsolete
Public propertyconstantForce
(Inherited from Component)
Obsolete
Public propertydefaultToCenter If enabled, the screen position will default to the center of the allowed movement area. Otherwise, it will default to the lower-left corner of the allowed movement area.
Public propertyelementCount The number of Elements in the controller.
(Inherited from PlayerController)
Public propertyelements The list of Elements of all types in the controller.
(Inherited from PlayerController)
Public propertyenabled
(Inherited from Behaviour)
Public propertygameObject
(Inherited from Component)
Public propertyguiElement
(Inherited from Component)
Obsolete
Public propertyguiText
(Inherited from Component)
Obsolete
Public propertyguiTexture
(Inherited from Component)
Obsolete
Public propertyhideFlags
(Inherited from Object)
Public propertyhingeJoint
(Inherited from Component)
Obsolete
Public propertyisActiveAndEnabled
(Inherited from Behaviour)
Public propertyleftButton The left or first button.
Public propertylight
(Inherited from Component)
Obsolete
Public propertymiddleButton The middle or third button.
Public propertymovementArea The allowed movement area for the mouse pointer. Set movementAreaUnit to determine the data format of this value. This rect is a screen-space rect with 0, 0 at the lower-left corner. If you pass a UnityEngine.Rect in which represents 0, 0 as the upper-left corner, Y will automatically be flipped.
Public propertymovementAreaUnit The unit format of the movement area. This is used to determine the data format of movementArea.
Public propertyname
(Inherited from Object)
Public propertynetworkView
(Inherited from Component)
Obsolete
Public propertyparticleSystem
(Inherited from Component)
Obsolete
Public propertyplayerId The Player id of the Player used for the source of input.
(Inherited from PlayerController)
Public propertypointerSpeed The pointer speed. This does not affect the speed of input from the mouse x/y axes if useHardwarePointerPosition is enabled. It only affects the speed from input sources other than mouse x/y or if mouse x/y are mapped to Actions assigned to Axes.
Public propertyrenderer
(Inherited from Component)
Obsolete
Public propertyrightButton The right or second button.
Public propertyrigidbody
(Inherited from Component)
Obsolete
Public propertyrigidbody2D
(Inherited from Component)
Obsolete
Public propertyrunInEditMode
(Inherited from MonoBehaviour)
Public propertyscreenPosition The screen position on the current frame.
Public propertyscreenPositionDelta The change in screen position since the previous frame.
Public propertyscreenPositionPrev The screen position on the previous frame.
Public propertytag
(Inherited from Component)
Public propertytransform
(Inherited from Component)
Public propertyuseGUILayout
(Inherited from MonoBehaviour)
Public propertyuseHardwarePointerPosition If enabled, the hardware pointer position will be used for mouse input. Otherwise, the position of the pointer will be calculated only from the Axis Action values.
Public propertywheel The wheel (or the first wheel if multiple exist.)
Public propertyxAxis The horizontal axis or the first axis.
Public propertyyAxis The vertical axis or the second axis.
Top
Methods
 NameDescription
Public methodBroadcastMessage(String)
(Inherited from Component)
Public methodBroadcastMessage(String, Object)
(Inherited from Component)
Public methodBroadcastMessage(String, SendMessageOptions)
(Inherited from Component)
Public methodBroadcastMessage(String, Object, SendMessageOptions)
(Inherited from Component)
Public methodCancelInvoke
(Inherited from MonoBehaviour)
Public methodCancelInvoke(String)
(Inherited from MonoBehaviour)
Public methodCompareTag
(Inherited from Component)
Public methodEquals
(Inherited from Object)
Public methodGetAxis Gets the current axis value.
(Inherited from PlayerController)
Public methodGetAxisRaw Gets the current raw axis value.
(Inherited from PlayerController)
Public methodGetButton Gets the current value of the button.
(Inherited from PlayerController)
Public methodGetButtonDown Gets the down state of the button. Returns True only on the first frame the button was pressed.
(Inherited from PlayerController)
Public methodGetButtonUp Gets the up state of the button. Returns True only on the first frame the button was released.
(Inherited from PlayerController)
Public methodGetComponent(String)
(Inherited from Component)
Public methodGetComponent(Type)
(Inherited from Component)
Public methodGetComponent``1
(Inherited from Component)
Public methodGetComponentInChildren(Type)
(Inherited from Component)
Public methodGetComponentInChildren(Type, Boolean)
(Inherited from Component)
Public methodGetComponentInChildren``1
(Inherited from Component)
Public methodGetComponentInChildren``1(Boolean)
(Inherited from Component)
Public methodGetComponentInParent(Type)
(Inherited from Component)
Public methodGetComponentInParent``1
(Inherited from Component)
Public methodGetComponents(Type)
(Inherited from Component)
Public methodGetComponents(Type, ListComponent)
(Inherited from Component)
Public methodGetComponents``1
(Inherited from Component)
Public methodGetComponents``1(ListUMP)
(Inherited from Component)
Public methodGetComponentsInChildren(Type)
(Inherited from Component)
Public methodGetComponentsInChildren(Type, Boolean)
(Inherited from Component)
Public methodGetComponentsInChildren``1
(Inherited from Component)
Public methodGetComponentsInChildren``1(Boolean)
(Inherited from Component)
Public methodGetComponentsInChildren``1(ListUMP)
(Inherited from Component)
Public methodGetComponentsInChildren``1(Boolean, ListUMP)
(Inherited from Component)
Public methodGetComponentsInParent(Type)
(Inherited from Component)
Public methodGetComponentsInParent(Type, Boolean)
(Inherited from Component)
Public methodGetComponentsInParent``1
(Inherited from Component)
Public methodGetComponentsInParent``1(Boolean)
(Inherited from Component)
Public methodGetComponentsInParent``1(Boolean, ListUMP)
(Inherited from Component)
Public methodGetElement(Int32) Gets the element at the specified index.
(Inherited from PlayerController)
Public methodGetHashCode
(Inherited from Object)
Public methodGetInstanceID
(Inherited from Object)
Public methodInvoke
(Inherited from MonoBehaviour)
Public methodInvokeRepeating
(Inherited from MonoBehaviour)
Public methodIsInvoking
(Inherited from MonoBehaviour)
Public methodIsInvoking(String)
(Inherited from MonoBehaviour)
Public methodSendMessage(String)
(Inherited from Component)
Public methodSendMessage(String, Object)
(Inherited from Component)
Public methodSendMessage(String, SendMessageOptions)
(Inherited from Component)
Public methodSendMessage(String, Object, SendMessageOptions)
(Inherited from Component)
Public methodSendMessageUpwards(String)
(Inherited from Component)
Public methodSendMessageUpwards(String, Object)
(Inherited from Component)
Public methodSendMessageUpwards(String, SendMessageOptions)
(Inherited from Component)
Public methodSendMessageUpwards(String, Object, SendMessageOptions)
(Inherited from Component)
Public methodStartCoroutine(IEnumerator)
(Inherited from MonoBehaviour)
Public methodStartCoroutine(String)
(Inherited from MonoBehaviour)
Public methodStartCoroutine(String, Object)
(Inherited from MonoBehaviour)
Public methodStartCoroutine_Auto
(Inherited from MonoBehaviour)
Obsolete
Public methodStopAllCoroutines
(Inherited from MonoBehaviour)
Public methodStopCoroutine(Coroutine)
(Inherited from MonoBehaviour)
Public methodStopCoroutine(IEnumerator)
(Inherited from MonoBehaviour)
Public methodStopCoroutine(String)
(Inherited from MonoBehaviour)
Public methodToString
(Inherited from Object)
Top
Events
 NameDescription
Public eventAxisValueChangedEvent Triggered when the axis value changes.
(Inherited from PlayerController)
Public eventButtonStateChangedEvent Triggered the first frame the button is pressed or released.
(Inherited from PlayerController)
Public eventEnabledStateChangedEvent Triggered when the controller is enabled or disabled.
(Inherited from PlayerController)
Public eventScreenPositionChangedEvent Triggers when the screen position changes.
Top
See Also