Show / Hide Table of Contents

    Class Joystick

    Inheritance
    Object
    Joystick
    DynamicJoystick
    FixedJoystick
    FloatingJoystick
    VariableJoystick
    Implements
    IPointerDownHandler
    IDragHandler
    IPointerUpHandler
    Namespace: Global
    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
    Type Description
    AxisOptions
    | Improve this Doc View Source

    DeadZone

    Declaration
    public float DeadZone { get; set; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Direction

    Declaration
    public Vector2 Direction { get; }
    Property Value
    Type Description
    Vector2
    | Improve this Doc View Source

    HandleRange

    Declaration
    public float HandleRange { get; set; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    Horizontal

    Declaration
    public float Horizontal { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    SnapX

    Declaration
    public bool SnapX { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    SnapY

    Declaration
    public bool SnapY { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Vertical

    Declaration
    public float Vertical { get; }
    Property Value
    Type Description
    Single

    Methods

    | Improve this Doc View Source

    HandleInput(Single, Vector2, Vector2, Camera)

    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
    Type Description
    Vector2
    | Improve this Doc View Source

    Start()

    Declaration
    protected virtual void Start()

    Implements

    IPointerDownHandler
    IDragHandler
    IPointerUpHandler
    • Improve this Doc
    • View Source
    • 0 Comments
    Back to top Example Footer