Cocos Creator API

1.3.0

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

ArmatureDisplay

: cc

The Armature Display of DragonBones

(Armature Display has a reference to a DragonBonesAsset and stores the state for ArmatureDisplay instance, which consists of the current pose's bone SRT, slot colors, and which slot attachments are visible.
Multiple Armature Display can use the same DragonBonesAsset which includes all animations, skins, and attachments.)

dragonAsset DragonBonesAsset

The DragonBones data contains the armatures information (bind pose bones, slots, draw order, attachments, skins, etc) and animations but does not hold any state.
Multiple ArmatureDisplay can share the same DragonBones data.

dragonAtlasAsset DragonBonesAtlasAsset

The atlas asset for the DragonBones.

armatureName String

The name of current armature.

animationName String

The name of current playing animation.

_defaultArmatureIndex Number

timeScale Number

The time scale of this armature.

playTimes Number

The play times of the default animation. -1 means using the value of config file; 0 means repeat for ever >0 means repeat times

debugBones Boolean

Indicates whether open debug bones.

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

playAnimation
(
  • animName
  • playTimes
)
dragonBones.AnimationState

Play the specified animation. Parameter animName specify the animation name. Parameter playTimes specify the repeat times of the animation. -1 means use the value of the config file. 0 means play the animation for ever.

0 means repeat times.

animName String
playTimes Number

:

: dragonBones.AnimationState

getArmatureNames ( ) Array

Get the all armature names in the DragonBones Data.

:

: Array

getAnimationNames
(
  • armatureName
)
Array

Get the all animation names of specified armature.

armatureName String

:

: Array

addEventListener
(
  • eventType
  • listener
  • target
)

Add event listener for the DragonBones Event.

eventType dragonBones.EventObject
listener function
target Object

removeEventListener
(
  • eventType
  • listener
  • target
)

Remove the event listener for the DragonBones Event.

eventType dragonBones.EventObject
listener function
target Object

buildArmature
(
  • armatureName
)
dragonBones.Armature

Build the armature for specified name.

armatureName String

:

: dragonBones.Armature

armature ( ) Object

Get the current armature object of the ArmatureDisplay.

:

: Object

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