const DWTool = require("./DWTool"); class ThemeManager { /** * 从res中加载对应的艺人骨骼动画 * @param {*} isBigMan * @param {*} gender * @param {*} jobId 1: 主持, 2: 舞者, 3: 歌手, 4: 演员, 5: 电竞明星 */ static loadArtist(isBigMan = false, gender = 1, jobId) { //处理性别为0时未知性别 if (gender === 0) { gender = 1; } let p = new Promise((resolve, reject) => { let name = `4${isBigMan ? 1 : 2}${gender}0${jobId}`; cc.loader.loadRes(`./people_spines/${name}`, sp.SkeletonData, (err, skeletonData,) => { if (err) { reject(err); } else { resolve(skeletonData); } }); }); return p; } } module.exports = ThemeManager;