Commit b48ccac3 authored by liujiangnan's avatar liujiangnan

fix: 重影问题

parent a52b163a
...@@ -37,6 +37,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -37,6 +37,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.currentIndex = this.getStoreCurrentIndex(); this.currentIndex = this.getStoreCurrentIndex();
const node = cc.find(`Canvas/bg/L${this.currentIndex + 1}`); const node = cc.find(`Canvas/bg/L${this.currentIndex + 1}`);
node.x = 0; node.x = 0;
if (this.currentIndex !==0) {
cc.find(`Canvas/bg/L1`).x = -4000;
}
const middleLayer = cc.find('middleLayer'); const middleLayer = cc.find('middleLayer');
if (!middleLayer) { if (!middleLayer) {
...@@ -198,7 +201,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -198,7 +201,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 已经是第一个了 // 已经是第一个了
return; return;
} }
console.log("======向右滑动=======");
this.rightMove(); this.rightMove();
} }
...@@ -207,8 +209,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -207,8 +209,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 已经是最后一个了 // 已经是最后一个了
return; return;
} }
console.log("======向左滑动======="); this.leftMove();
this.leftMove()
} }
} }
......
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