app/data/ct.release/res.js
/**
         * Creates a DragonBones skeleton, ready to be added to your copies.
         * @param {string} name The name of the skeleton asset
         * @param {string} [skin] Optional; allows you to specify the used skin
         * @returns {object} The created skeleton
         */
Creates a DragonBones skeleton, ready to be added to your copies.
@param {string} name The name of the skeleton asset
@param {string} [skin] Optional; allows you to specify the used skin
@returns {object} The created skeleton
Creates a DragonBones skeleton ready to be added to your copies . @param { string } name The name of the skeleton asset @param { string } [ skin ] Optional ; allows you to specify the used skin @returns { object } The created skeleton
makeSkeleton(name, skin) {
            const r = ct.res.skelRegistry[name],
                  skel = dbFactory.buildArmatureDisplay('Armature', r.data.name, skin);
            skel.ctName = name;
            skel.on(dragonBones.EventObject.SOUND_EVENT, function (event) {
                if (ct.sound.exists(event.name)) {
                    ct.sound.spawn(event.name);
                } else {
                    console.warn(`Skeleton ${skel.ctName} tries to play a non-existing sound ${event.name} at animation ${skel.animation.lastAnimationName}`);
                }
            });
            return skel;
        }
makeSkeleton ( name , skin ) { const r = ct . res . skelRegistry [ name ] , skel = dbFactory . buildArmatureDisplay ( 'Armature' , r . data . name , skin ) ; skel . ctName = name ; skel . on ( dragonBones . EventObject . SOUND_EVENT , function ( event ) { if ( ct . sound . exists ( event . name ) ) { ct . sound . spawn ( event . name ) ; } else { console . warn ( ` ${ skel . ctName } ${ event . name } ${ skel . animation . lastAnimationName } ` ) ; } } ) ; return skel ; }
Creates a DragonBones skeleton, ready to be added to your copies.
Creates a DragonBones skeleton ready to be added to your copies .