Commit ad05737d authored by liujiangnan's avatar liujiangnan

feat: 上报成绩

parent c7a039ff
import { onHomeworkFinish } from "../script/common/util";
/**
* 游戏主逻辑
*/
......@@ -160,6 +162,8 @@ var game = cc.Class({
this.playCatDragon("finish")
this._timeoutIds.push(setTimeout(() => {
LWD_3.speaker.inst.playEffect(LWD_3.enum.E_Audio.CatComplete);
// TODO 结束游戏,上报成绩
onHomeworkFinish();
}, 500));
},
......
......@@ -227,3 +227,12 @@ async function rabbonFall(node) {
await asyncTweenBy(node, time, { x: offsetX, angle: offsetX * 60 / 200 });
rabbonFall(node);
}
export function onHomeworkFinish(callback = null, data = null) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
middleLayer.getComponent('middleLayer').onHomeworkFinish(callback, data);
} else {
console.log('onHomeworkFinish');
}
}
\ No newline at end of file
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