Cocos Creator API

1.0.0

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

inputManager

Module: cc

This class manages all events of input. include: touch, mouse, accelerometer, keyboard

Methods

handleTouchesBegin
(
  • touches
)

name type description
touches Array

handleTouchesMove
(
  • touches
)

name type description
touches Array

handleTouchesEnd
(
  • touches
)

name type description
touches Array

handleTouchesCancel
(
  • touches
)

name type description
touches Array

getSetOfTouchesEndOrCancel
(
  • touches
)
Array

name type description
touches Array

returns:

type: Array

getHTMLElementPosition
(
  • element
)
Object

name type description
element HTMLElement

returns:

type: Object

getPreTouch
(
  • touch
)
Touch

name type description
touch Touch

returns:

type: Touch

setPreTouch
(
  • touch
)

name type description
touch Touch

getTouchByXY
(
  • tx
  • ty
  • pos
)
Touch

name type description
tx Number
ty Number
pos Vec2

returns:

type: Touch

getTouchByXY
(
  • location
  • pos
  • eventType
)
Event.EventMouse

name type description
location Vec2
pos Vec2
eventType Number

returns:

getPointByEvent
(
  • event
  • pos
)
Vec2

name type description
event Touch
pos Vec2

returns:

type: Vec2

getTouchesByEvent
(
  • event
  • pos
)
Array

name type description
event Touch
pos Vec2

returns:

type: Array

registerSystemEvent
(
  • element
)

name type description
element HTMLElement

update
(
  • dt
)

name type description
dt Number

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