1. (A jump B(1) )默認(rèn)播放的一個(gè)龍骨動(dòng)畫(huà)
armature.animation.play(動(dòng)畫(huà)名,循環(huán)次數(shù))
直接播放/無(wú)過(guò)渡切換動(dòng)畫(huà)
2. (A fade B(1) )從其他動(dòng)畫(huà)銜接到當(dāng)前動(dòng)畫(huà)
armature.animation.fadeIn(動(dòng)畫(huà)名,緩動(dòng)切換時(shí)間(秒), 循環(huán)次數(shù));
可以從任何其他動(dòng)畫(huà)過(guò)渡切換到當(dāng)前動(dòng)畫(huà)的第一幀并播放
3. (A jump B(n) )播放當(dāng)前動(dòng)畫(huà)的第幾幀,百分比或者秒偏移
armature.animation.gotoAndPlayByFrame(動(dòng)畫(huà)名,隨機(jī)幀位,循環(huán)次數(shù));
gotoAndPlayByProgress
gotoAndPlayByTime
無(wú)過(guò)渡直接切換到當(dāng)前動(dòng)畫(huà)的指定位置播放
4. (A fade B(n) )銜接到當(dāng)前動(dòng)畫(huà)的指定位置
let config = dragonBones.BaseObject.borrowObject(dragonBones.AnimationConfig);
config.name = 動(dòng)畫(huà)名;
config.resetToPose = true;
config.playTimes = 循環(huán)次數(shù);
config.fadeInTime = 過(guò)渡時(shí)間(秒);
config.animation = 動(dòng)畫(huà)名;
config.position = 當(dāng)前動(dòng)畫(huà)的位置(百分比 0~1);
armature.animation.playConfig(config);
可以從其他動(dòng)畫(huà)任意位置銜接到當(dāng)前動(dòng)畫(huà)的任意位置