Commit 1a65a7e8 authored by huoshizhe's avatar huoshizhe

fix: 移动摄像头

parent fac64a1f
......@@ -175,6 +175,7 @@ cc.Class({
this._status.treeHeight = idx;
this.growTree(idx);
this.growSky(idx);
this.moveCamera(idx);
await asyncTweenTo(nodeTree, 3, { y: 500 + 200 * idx });
this.playEffect('路牌');
......@@ -198,7 +199,13 @@ cc.Class({
},
moveCamera(idx) {
const cameraYList = [0, 0, 220, 560, 720];
const cameraYList = [0, 0];
this.data.wordList.foreach((word, idx) => {
if (idx < 2) {
return;
}
cameraYList.push(idx * 200);
});
const camera = cc.find('Canvas/Main Camera');
asyncTweenTo(camera, 3, { y: cameraYList[idx] });
},
......
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