Commit ab049cf6 authored by liujiangnan's avatar liujiangnan

feat: 切换环境

parent 96f588b7
This diff is collapsed.
......@@ -286,5 +286,22 @@ export default class SceneComponent extends MyCocosSceneComponent {
.to(0.3, { scaleX: 1, x: 0 }, { easing: 'sineIn' })
.start();
});
// 环境切换后门
// Canvas/bg/bg_oxford
const bk = cc.find(`Canvas/bg/bg_oxford`);
bk.on('click', () => {
const bk_count = bk["bk_count"];
if (!bk_count) {
bk.attr({bk_count: 1});
setTimeout(() => {
bk.attr({bk_count: null});
}, 2000);
} else if (bk_count>10){
window["courseware"]?.changeHost();
} else {
bk.attr({bk_count: bk_count+1});
}
});
}
}
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