Commit 68659313 authored by yu's avatar yu

1

parent c834e72c
......@@ -15663,8 +15663,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
216.927,
-146.147,
215,
-145,
0,
0,
0,
......
......@@ -97,8 +97,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.randomPopo();
this.starAction();
this.flyAction();
let hammer = cc.find("hammer", this.layout_game);
hammer.active = true;
this.initHammer();
}
private initListener() {
......@@ -118,8 +117,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
})
pg.event.on('layer_coin_show_coin_end', () => {
this.nextEgg();
this.initHammer();
})
}
private initHammer() {
let hammer = cc.find("hammer", this.layout_game);
hammer.active = true;
hammer.angle = 0;
hammer.setPosition(215, -145);
}
replay() {
this.initData();
this.initView();
......@@ -169,14 +175,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
private gameOver() {
Game.getIns().state = GAME_STATE.OVER;
let data: any = {};
data.total = Game.getIns().total;
data.right = Game.getIns().player.right;
data.scores = Game.getIns().player.voices;
data.stone = Math.floor(10 * data.right / data.total);
this.log("total: " + data.total + " right: " + data.right + " stone: " + data.stone);
onHomeworkFinish(data)
// pg.event.emit('layer_ending_show', { coin: this.score })
const midd = cc.find('middleLayer');
if (!midd) return this.log("no middleLayer");
let middleLayer = midd.getComponent('middleLayer');
middleLayer.saveGolds(Game.getIns().len * 3); // 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer.goNextPage(); // 跳转到下一页
}
gameStart() {
......@@ -315,7 +319,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.touchData.parent.active = false;
this.tempCount = 0;
if (this.checkIsOver()) {
pg.event.emit('layer_ending_show', { coin: this.score })
this.gameOver();
}
}
}
......
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