Class Joystick
Implements
IPointerDownHandler
IDragHandler
IPointerUpHandler
Assembly: Main.dll
Syntax
public class Joystick : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler
Fields
|
Improve this Doc
View Source
background
Declaration
protected RectTransform background
Field Value
Type |
Description |
RectTransform |
|
Properties
|
Improve this Doc
View Source
AxisOptions
Declaration
public AxisOptions AxisOptions { get; set; }
Property Value
|
Improve this Doc
View Source
DeadZone
Declaration
public float DeadZone { get; set; }
Property Value
|
Improve this Doc
View Source
Direction
Declaration
public Vector2 Direction { get; }
Property Value
|
Improve this Doc
View Source
HandleRange
Declaration
public float HandleRange { get; set; }
Property Value
|
Improve this Doc
View Source
Horizontal
Declaration
public float Horizontal { get; }
Property Value
|
Improve this Doc
View Source
SnapX
Declaration
public bool SnapX { get; set; }
Property Value
|
Improve this Doc
View Source
SnapY
Declaration
public bool SnapY { get; set; }
Property Value
|
Improve this Doc
View Source
Vertical
Declaration
public float Vertical { get; }
Property Value
Methods
|
Improve this Doc
View Source
Declaration
protected virtual void HandleInput(float magnitude, Vector2 normalised, Vector2 radius, Camera cam)
Parameters
Type |
Name |
Description |
Single |
magnitude |
|
Vector2 |
normalised |
|
Vector2 |
radius |
|
Camera |
cam |
|
|
Improve this Doc
View Source
OnDrag(PointerEventData)
Declaration
public void OnDrag(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Improve this Doc
View Source
OnPointerDown(PointerEventData)
Declaration
public virtual void OnPointerDown(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Improve this Doc
View Source
OnPointerUp(PointerEventData)
Declaration
public virtual void OnPointerUp(PointerEventData eventData)
Parameters
Type |
Name |
Description |
PointerEventData |
eventData |
|
|
Improve this Doc
View Source
ScreenPointToAnchoredPosition(Vector2)
Declaration
protected Vector2 ScreenPointToAnchoredPosition(Vector2 screenPosition)
Parameters
Type |
Name |
Description |
Vector2 |
screenPosition |
|
Returns
|
Improve this Doc
View Source
Start()
Declaration
protected virtual void Start()
Implements
IPointerDownHandler
IDragHandler
IPointerUpHandler