Class cc.Touch

Class Summary
Constructor Attributes Constructor Name and Description
 
The data of touch event

Method Summary

Class Detail

cc.Touch()
The data of touch event

Method Detail

  • ctor(x, y, id)
    Constructor
    Parameters:
    x
    y
    id
  • {cc.Point} getDelta()
    returns the delta of 2 current touches locations in screen coordinates
    Returns:
    {cc.Point}
  • {Number} getId()
    Returns:
    {Number}
  • {Number} getID()
    Returns:
    {Number}
  • {cc.Point} getLocation()
    returns the current touch location in OpenGL coordinates
    Returns:
    {cc.Point}
  • {cc.Point} getLocationInView()
    returns the current touch location in screen coordinates
    Returns:
    {cc.Point}
  • {number} getLocationX()
    gets location X axis data
    Returns:
    {number}
  • {number} getLocationY()
    gets location Y axis data
    Returns:
    {number}
  • {cc.Point} getPreviousLocation()
    returns the previous touch location in OpenGL coordinates
    Returns:
    {cc.Point}
  • {cc.Point} getPreviousLocationInView()
    returns the previous touch location in screen coordinates
    Returns:
    {cc.Point}
  • {cc.Point} getStartLocation()
    returns the start touch location in OpenGL coordinates
    Returns:
    {cc.Point}
  • {cc.Point} getStartLocationInView()
    returns the start touch location in screen coordinates
    Returns:
    {cc.Point}
  • setTouchInfo(id, x, y)
    set information to touch
    Parameters:
    {Number} id
    {Number} x
    {Number} y