TouchInput

A class to handle touch input.

Example
// Check if a touch is currently active
TouchInput.IsTouchActive(0);

// Get the position of the first touch
TouchInput.GetTouch(0);

Methods

(static) GetTouch(index) → {Vector2}

Get the position of the touch at the given index.

Parameters:
NameTypeDescription
indexnumber

The index of the touch to get the position of.

Returns:

The position of the touch at the given index.

Type: 
Vector2

(static) GetTouchCount() → {number}

Get the number of active touches.

Returns:

The number of active touches.

Type: 
number

(static) IsTouchActive(index) → {boolean}

Check if a touch is currently active.

Parameters:
NameTypeDescription
indexnumber

The index of the touch to check.

Returns:

True if the touch at the given index is active.

Type: 
boolean