Commit 53357a49 authored by liujiangnan's avatar liujiangnan

feat

parent 801928b6
......@@ -3048,7 +3048,7 @@
"__id__": 59
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 68
......
......@@ -287,12 +287,62 @@ export default class NewClass extends middleLayerBase {
if (this.courseIndex == this.courses.length - 1) {
// 最后一页课件
this.unlockNextForder();
this.playGetParterAnim();
} else {
// 如果不是最后一页,跳转到下一页
this.goNextPage();
}
}
async playGetParterAnim() {
const coolcat = cc.find('middleLayer/coolcat');
coolcat.active = true;
// 胜利音效
this.playLocalAudio("win").then();
const star = cc.find('middleLayer/coolcat/star');
star.active = true;
star.getComponent(dragonBones.ArmatureDisplay).playAnimation('normal', 1);
setTimeout(() => {
this.showConfirm('还想再来一次吗?', () => {
this.hideGetParterAnim();
// 识别页
const gameSelectData = this.getData('NJ_game_select');
this.loadOnlineCourseWare(gameSelectData.courseId);
}, () => {
// 潜水艇页
this.hideGetParterAnim();
cc.find('middleLayer/BtnRight').active = false;
cc.find('middleLayer/BtnLeft').active = false;
cc.find('middleLayer/ExitBtn').active = false;
const idx = this.getData('NJ_menu_select_idx');
if (idx == '0') {
this.loadOnlineBundle('NJ_QianShuiTing');
} else if (idx == '1') {
this.loadOnlineBundle('NJ_ShaMo');
} else if (idx == '2') {
this.loadOnlineBundle('NJ_NongChang');
}
});
}, 1000);
}
hideGetParterAnim() {
const coolcat = cc.find('middleLayer/coolcat');
coolcat.active = false;
const apple = cc.find('middleLayer/coolcat/apple');
apple.active = false;
apple.setPosition(0, 0);
const light = cc.find('middleLayer/coolcat/light');
light.active = false;
const star = cc.find('middleLayer/coolcat/star');
star.active = false;
}
saveLastGameData(callback) {
const token = cc.sys.localStorage.getItem('token');
this.callNetworkApiGet('/api/oxford/v1/kid/info', { token }, (res) => {
......@@ -626,7 +676,5 @@ export default class NewClass extends middleLayerBase {
this.reportErrorLog();
this.onMiddleLayerLoadingFinish();
// 测试定位使用的
// this.playGetParterAnim();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment