touchHit method

int touchHit(
  1. int index
)

Returns the number of times the specified finger has made contact with the touchscreen since the last OnUpdate

The index is the order of the touches that have been made. The first finger that touches the screen will be assigned index 0. The next finger will be assigned 1 and so on.

Implementation

int touchHit(int index) {
  if (index < 0 || index >= _touchState.length) {
    return 0;
  }
  return _touchState[index].hit;
}