Commit d9f7f37f authored by Tt's avatar Tt

修改数据上报方案

parent 140c8476
...@@ -321,19 +321,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -321,19 +321,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.layers.push(outLayer) this.layers.push(outLayer)
} }
cc.tween(this.CurrentLayer).to(1/3, { x: 2000 }).start(); cc.tween(this.CurrentLayer).to(1 / 3, { x: 2000 }).start();
if (this.LittleLayer) { if (this.LittleLayer) {
cc.tween(this.LittleLayer).to(1/3, { x: 0, y: 0, scale: 1 }).start(); cc.tween(this.LittleLayer).to(1 / 3, { x: 0, y: 0, scale: 1 }).start();
} }
if (this.OutLayer) { if (this.OutLayer) {
cc.tween(this.OutLayer).to(1/3, { x: this.layer_word_little.x, y: this.layer_word_little.y }).start(); cc.tween(this.OutLayer).to(1 / 3, { x: this.layer_word_little.x, y: this.layer_word_little.y }).start();
} }
this.scheduleOnce(() => { this.scheduleOnce(() => {
this.touchForbid = false; this.touchForbid = false;
this.count++; this.count++;
this.maxCurrent = Math.max(this.maxCurrent, this.count); this.maxCurrent = Math.max(this.maxCurrent, this.count);
this.startPlay(); this.startPlay();
}, 1/3) }, 1 / 3)
} }
replay() { replay() {
this.initData(); this.initData();
...@@ -363,6 +363,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -363,6 +363,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
gameOver() { gameOver() {
this.sendData().then(() => { this.sendData().then(() => {
})
this.scheduleOnce(() => {
pg.event.once('layer_ending_touch_replay', () => { pg.event.once('layer_ending_touch_replay', () => {
this.replay(); this.replay();
}) })
...@@ -370,7 +372,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -370,7 +372,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
middleLayer.saveGolds(this.score); // 保存金币数量;num 是获得金币的数量,数字类型; middleLayer.saveGolds(this.score); // 保存金币数量;num 是获得金币的数量,数字类型;
middleLayer.goNextPage(); // 跳转到下一页 middleLayer.goNextPage(); // 跳转到下一页
// pg.event.emit('layer_ending_show', { coin: this.score }) // pg.event.emit('layer_ending_show', { coin: this.score })
}) }, 0.5)
} }
createLayer() { createLayer() {
......
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