|
|
@@ -123,9 +123,9 @@ export class GameBlockSelection extends Component {
|
|
|
// 优先从JSON配置中获取奖励数量
|
|
|
if (this.ballPriceConfigData && this.ballPriceConfigData.addCoinReward) {
|
|
|
const config = this.ballPriceConfigData.addCoinReward;
|
|
|
- const baseReward = config.initialPrice || this.DEFAULT_ADD_COIN_BASE_REWARD;
|
|
|
- const increment = config.priceIncrement || this.DEFAULT_ADD_COIN_INCREMENT;
|
|
|
- const maxReward = config.maxPrice || this.DEFAULT_ADD_COIN_MAX_REWARD;
|
|
|
+ const baseReward = config.initialPrice ?? this.DEFAULT_ADD_COIN_BASE_REWARD;
|
|
|
+ const increment = config.priceIncrement ?? this.DEFAULT_ADD_COIN_INCREMENT;
|
|
|
+ const maxReward = config.maxPrice ?? this.DEFAULT_ADD_COIN_MAX_REWARD;
|
|
|
|
|
|
// 获取当前使用次数
|
|
|
const session = this.session || LevelSessionManager.inst;
|
|
|
@@ -166,9 +166,9 @@ export class GameBlockSelection extends Component {
|
|
|
// 优先从JSON配置中获取价格
|
|
|
if (this.ballPriceConfigData && this.ballPriceConfigData.addBallPricing) {
|
|
|
const config = this.ballPriceConfigData.addBallPricing;
|
|
|
- const basePrice = config.initialPrice || this.DEFAULT_ADD_BALL_BASE_PRICE;
|
|
|
- const increment = config.priceIncrement || this.DEFAULT_ADD_BALL_INCREMENT;
|
|
|
- const maxPrice = config.maxPrice || this.DEFAULT_ADD_BALL_MAX_PRICE;
|
|
|
+ const basePrice = config.initialPrice ?? this.DEFAULT_ADD_BALL_BASE_PRICE;
|
|
|
+ const increment = config.priceIncrement ?? this.DEFAULT_ADD_BALL_INCREMENT;
|
|
|
+ const maxPrice = config.maxPrice ?? this.DEFAULT_ADD_BALL_MAX_PRICE;
|
|
|
|
|
|
// 获取当前使用次数
|
|
|
const session = this.session || LevelSessionManager.inst;
|
|
|
@@ -209,9 +209,9 @@ export class GameBlockSelection extends Component {
|
|
|
console.log('[GameBlockSelection] 刷新方块价格配置:', this.ballPriceConfigData?.refreshBlockPricing);
|
|
|
if (this.ballPriceConfigData && this.ballPriceConfigData.refreshBlockPricing) {
|
|
|
const config = this.ballPriceConfigData.refreshBlockPricing;
|
|
|
- const basePrice = config.initialPrice || this.DEFAULT_REFRESH_BASE_PRICE;
|
|
|
- const increment = config.priceIncrement || this.DEFAULT_REFRESH_INCREMENT;
|
|
|
- const maxPrice = config.maxPrice || this.DEFAULT_REFRESH_MAX_PRICE;
|
|
|
+ const basePrice = config.initialPrice ?? this.DEFAULT_REFRESH_BASE_PRICE;
|
|
|
+ const increment = config.priceIncrement ?? this.DEFAULT_REFRESH_INCREMENT;
|
|
|
+ const maxPrice = config.maxPrice ?? this.DEFAULT_REFRESH_MAX_PRICE;
|
|
|
|
|
|
// 获取当前使用次数
|
|
|
const session = this.session || LevelSessionManager.inst;
|