Cocos Creator API

1.3.0

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

inputManager

: cc

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

handleTouchesBegin
(
  • touches
)

touches Array

handleTouchesMove
(
  • touches
)

touches Array

handleTouchesEnd
(
  • touches
)

touches Array

handleTouchesCancel
(
  • touches
)

touches Array

getSetOfTouchesEndOrCancel
(
  • touches
)
Array

touches Array

:

: Array

getHTMLElementPosition
(
  • element
)
Object

element HTMLElement

:

: Object

getPreTouch
(
  • touch
)
Touch

touch Touch

:

: Touch

setPreTouch
(
  • touch
)

touch Touch

getTouchByXY
(
  • tx
  • ty
  • pos
)
Touch

tx Number
ty Number
pos Vec2

:

: Touch

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

location Vec2
pos Vec2
eventType Number

getPointByEvent
(
  • event
  • pos
)
Vec2

event Touch
pos Vec2

:

: Vec2

getTouchesByEvent
(
  • event
  • pos
)
Array

event Touch
pos Vec2

:

: Array

registerSystemEvent
(
  • element
)

element HTMLElement

update
(
  • dt
)

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