Cocos Creator API

1.3.0

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

Touch

: cc

The touch event class

getLocation ( ) Vec2

Returns the current touch location in OpenGL coordinates.、

:

: Vec2

getLocationX ( ) Number

Returns X axis location value.

:

: Number

getLocationY ( ) Number

Returns Y axis location value.

:

: Number

getPreviousLocation ( ) Vec2

Returns the previous touch location in OpenGL coordinates.

:

: Vec2

getStartLocation ( ) Vec2

Returns the start touch location in OpenGL coordinates.

:

: Vec2

getDelta ( ) Vec2

Returns the delta distance from the previous touche to the current one in screen coordinates.

:

: Vec2

getLocationInView ( ) Vec2

Returns the current touch location in screen coordinates.

:

: Vec2

getPreviousLocationInView ( ) Vec2

Returns the previous touch location in screen coordinates.

:

: Vec2

getStartLocationInView ( ) Vec2

Returns the start touch location in screen coordinates.

:

: Vec2

getID ( ) Number

Returns the id of cc.Touch.

:

: Number

setTouchInfo
(
  • id
  • x
  • y
)

Sets information to touch.

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index