Commit 72b52381 authored by liujiangnan's avatar liujiangnan

feat: 释放原生方法

parent c885c68f
......@@ -186,6 +186,13 @@ export function initAir(_this) {
throw ('非源生环境');
}
},
freeAllOcMethod () {
window.courseware.stopRecord();
window.courseware.stopTest();
window.courseware.closeOsmo();
window.courseware.closeOsmoHandwriting();
window.courseware.closeOsmoFingerRead();
}
};
}
......@@ -220,7 +220,7 @@ cc.Class({
exitBtn.active = false;
cc.game.removePersistRootNode(this.node);
cc.director.getScene().destroy();
window.courseware.freeAllOcMethod();
cc.director.loadScene("debug_shell", null, null, (err, scene) => {
});
})
......@@ -312,6 +312,9 @@ cc.Class({
if (!this.courses || index == this.courseIndex || index < 0 || index > this.courses.length - 1) {
return;
}
window.courseware.freeAllOcMethod();
this.courseIndex = index;
this.courseItem = this.courses[this.courseIndex];
if (this.courseIndex == 0) {
......
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