Commit ff4cde55 authored by 范雪寒's avatar 范雪寒

fix: 坐标计算错误

parent a9a3ed2f
...@@ -23,7 +23,7 @@ cc.Class({ ...@@ -23,7 +23,7 @@ cc.Class({
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
const star = cc.instantiate(cc.find('Star')); const star = cc.instantiate(cc.find('Star'));
star.name = `star_${i}`; star.name = `star_${i}`;
star.scale = this.Between(0.5, 1, ((starLayout.height - paddingY * (length)) / length) / star.height); star.scale = this.Between(0.5, 1, (starLayout.height / length - paddingY) / star.height);
star.parent = starLayout; star.parent = starLayout;
} }
length++; length++;
......
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