Commit a2c6ddeb authored by 李维's avatar 李维

feat: 调整模板分辨率

parent 59681740
This diff is collapsed.
...@@ -355,7 +355,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -355,7 +355,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
unansweredQuestions.forEach((data, index) => { unansweredQuestions.forEach((data, index) => {
const candyNode = cc.instantiate(this.item) as CandyNode; const candyNode = cc.instantiate(this.item) as CandyNode;
this.layout.addChild(candyNode); this.layout.addChild(candyNode);
this.updateItem(candyNode, data, index * 320 + 150); this.updateItem(candyNode, data, (index * 320 + 150) / 1.5);
if (index === 0) { if (index === 0) {
this.candyNodeWidth = candyNode.width; this.candyNodeWidth = candyNode.width;
} }
...@@ -748,7 +748,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -748,7 +748,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.visible(word, false); pg.view.visible(word, false);
// 设置图片内容 // 设置图片内容
if (currentData.picUrl) { if (currentData.picUrl) {
pg.view.setNetImg(icon, currentData.picUrl, { w: 945, h: 500 }); pg.view.setNetImg(icon, currentData.picUrl, { w: 945 / 1.5, h: 500 / 1.5 });
} }
} else { } else {
// 否则显示文字,隐藏图片 // 否则显示文字,隐藏图片
...@@ -758,9 +758,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -758,9 +758,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (currentData.txt) { if (currentData.txt) {
pg.view.setString(word, currentData.txt); pg.view.setString(word, currentData.txt);
if (currentData.txt > 6) { if (currentData.txt > 6) {
word.getComponent(cc.Label).fontSize = 250; word.getComponent(cc.Label).fontSize = 250 / 1.5;
} else { } else {
word.getComponent(cc.Label).fontSize = 350; word.getComponent(cc.Label).fontSize = 350 / 1.5;
} }
} }
} }
...@@ -910,7 +910,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -910,7 +910,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.layout.x -= frameScrollDistance; this.layout.x -= frameScrollDistance;
// 累计滚动距离 // 累计滚动距离
this.scrollDistance = Math.abs(this.layout.x) - this.addCount * 100; this.scrollDistance = Math.abs(this.layout.x) - this.addCount * 100 / 1.5;
if (!this.addCount) { if (!this.addCount) {
this.addCount = 1; this.addCount = 1;
} }
...@@ -929,7 +929,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -929,7 +929,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (firstCandy && firstCandy.x + this.layout.x + firstCandy.width / 2 < 0) { if (firstCandy && firstCandy.x + this.layout.x + firstCandy.width / 2 < 0) {
// 如果移出的节点对应的题目还未回答,将其重新添加到待添加队列 // 如果移出的节点对应的题目还未回答,将其重新添加到待添加队列
if (firstCandy) { if (firstCandy) {
const x = children[children.length - 1].x + 320; const x = children[children.length - 1].x + 320 / 1.5;
firstCandy.x = x; firstCandy.x = x;
} }
} }
......
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