Cocos Creator API

0.7.1

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

Event.EventAcceleration

Extends Event
Module: cc

The acceleration event

Properties

type String

Inherited from Event:

The name of the event (case-sensitive), e.g. "click", "fire", or "submit".

target Object

Inherited from Event:

A reference to the target to which the event was originally dispatched.

currentTarget; Object

Inherited from Event:

A reference to the currently registered target for the event.

eventPhase Number

Inherited from Event:

Indicates which phase of the event flow is currently being evaluated. Returns an integer value represented by 4 constants:

  • Event.NONE = 0
  • Event.CAPTURING_PHASE = 1
  • Event.AT_TARGET = 2
  • Event.BUBBLING_PHASE = 3 The phases are explained in the [section 3.1, Event dispatch and DOM event flow] (http://www.w3.org/TR/DOM-Level-3-Events/#event-flow), of the DOM Level 3 Events specification.

_defaultPrevented Boolean private

Inherited from Event:

Indicates whether or not event.preventDefault() has been called on the event.

_propagationStopped Boolean private

Inherited from Event:

Indicates whether or not event.stopPropagation() has been called on the event.

_propagationImmediateStopped Boolean private

Inherited from Event:

Indicates whether or not event.stopPropagationImmediate() has been called on the event.

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

Methods

unuse ( ) String

Inherited from Event:

Reset the event for being stored in the object pool.

returns:

type: String

reuse ( ) String

Inherited from Event:

Reuse the event for being used again by the object pool.

returns:

type: String

preventDefault ( )

Inherited from Event:

If invoked when the cancelable attribute value is true, signals to the operation that caused event to be dispatched that it needs to be canceled.

stopPropagation ( )

Inherited from Event:

Stops propagation for current event.

stopPropagationImmediate ( )

Inherited from Event:

Stops propagation for current event immediately, the event won't even be dispatched to the listeners attached in the current target.

isStopped ( ) Boolean

Inherited from Event:

Checks whether the event has been stopped.

returns:

type: Boolean

getCurrentTarget ( ) Node

Inherited from Event:

Gets current target of the event
note: It only be available when the event listener is associated with node.
It returns 0 when the listener is associated with fixed priority.

returns:

type: Node

The target with which the event associates.

getType ( ) String

Inherited from Event:

Gets the event type.

returns:

type: String

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