# Class: Cocos2dJsHelper

## Cocos2dJsHelper

#### new Cocos2dJsHelper()

  Cocos2dJsHelper

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `center` | cc.Point | Scene center
  `space` | cp.Space | Chipmunk space object
  `score` | number | Current score
  `currentChapter` | number | Current chapter
  `currentLevel` | number | Current level

### Extends

- cc.Class

### Methods

#### animate(prefix, count, interval, revert)

  Create framed animation with similar file name.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `prefix` |  | File name prefix
  `count` |  | File name's number suffix starts from 1, and ends with this value
  `interval` |  | Frame interval
  `revert` |  | Whether revert the animation framed.

  ##### Returns:

  Type
    cc.Animate

#### config(k [, v])

  Get or set the configuration.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `k` | string |  | Configuration key
  `v` | string | number | object | boolean | undefined | <optional> | Set the configuration when v is given

#### init()

  Initialize some variables. Need to be called on game start.

#### shadowLabel(text, size)

  Return label with shadow.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `text` | string | The label content
  `size` | number | Label point size

  ##### Returns:

  Type
    cc.LabelTTF

#### Search results