Browse Source

商店次数优化

181404010226 2 tháng trước cách đây
mục cha
commit
f5404ec322
2 tập tin đã thay đổi với 269 bổ sung300 xóa
  1. 265 298
      assets/Scenes/GameLevel.scene
  2. 4 2
      assets/scripts/FourUI/ShopSystem/ShopController.ts

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 265 - 298
assets/Scenes/GameLevel.scene


+ 4 - 2
assets/scripts/FourUI/ShopSystem/ShopController.ts

@@ -263,7 +263,8 @@ export class ShopController extends Component {
                         this.moneyIconNode.active = false;
                     }
                 } else {
-                    this.moneyCountLabel.string = `${totalCount}/${maxCount}`;
+                    const remainingCount = maxCount - totalCount;
+                    this.moneyCountLabel.string = `${remainingCount}/${maxCount}`;
                     // 观看广告时显示图标
                     if (this.moneyIconNode) {
                         this.moneyIconNode.active = true;
@@ -318,7 +319,8 @@ export class ShopController extends Component {
                         this.diamondIconNode.active = false;
                     }
                 } else {
-                    this.diamondCountLabel.string = `${totalCount}/${maxCount}`;
+                    const remainingCount = maxCount - totalCount;
+                    this.diamondCountLabel.string = `${remainingCount}/${maxCount}`;
                     // 观看广告时显示图标
                     if (this.diamondIconNode) {
                         this.diamondIconNode.active = true;

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác