feat: 调整游戏难度并优化UI布局
- 降低卡池等级上限和英雄等级上限以简化前期难度 - 重新平衡前四波怪物配置,使难度曲线更平缓 - 移除卡池升级功能并隐藏相关UI按钮 - 调整角色控制器UI元素的位置和尺寸 - 修改加载界面元素的缩放比例
This commit is contained in:
@@ -201,11 +201,11 @@ export class MissionCardComp extends CCComp {
|
||||
this.clearHeroInfoPanels();
|
||||
this.layoutCardSlots();
|
||||
this.clearAllCards();
|
||||
if (this.cards_up) {
|
||||
this.cards_up.active = true;
|
||||
}
|
||||
// if (this.cards_up) {
|
||||
// this.cards_up.active = true;
|
||||
// }
|
||||
this.resetButtonScale(this.cards_chou);
|
||||
this.resetButtonScale(this.cards_up);
|
||||
// this.resetButtonScale(this.cards_up);
|
||||
this.updateCoinAndCostUI();
|
||||
this.updateHeroNumUI(false, false);
|
||||
this.node.active = true;
|
||||
@@ -269,9 +269,9 @@ export class MissionCardComp extends CCComp {
|
||||
this.cards_chou?.on(NodeEventType.TOUCH_START, this.onDrawTouchStart, this);
|
||||
this.cards_chou?.on(NodeEventType.TOUCH_END, this.onDrawTouchEnd, this);
|
||||
this.cards_chou?.on(NodeEventType.TOUCH_CANCEL, this.onDrawTouchCancel, this);
|
||||
this.cards_up?.on(NodeEventType.TOUCH_START, this.onUpgradeTouchStart, this);
|
||||
this.cards_up?.on(NodeEventType.TOUCH_END, this.onUpgradeTouchEnd, this);
|
||||
this.cards_up?.on(NodeEventType.TOUCH_CANCEL, this.onUpgradeTouchCancel, this);
|
||||
// this.cards_up?.on(NodeEventType.TOUCH_START, this.onUpgradeTouchStart, this);
|
||||
// this.cards_up?.on(NodeEventType.TOUCH_END, this.onUpgradeTouchEnd, this);
|
||||
// this.cards_up?.on(NodeEventType.TOUCH_CANCEL, this.onUpgradeTouchCancel, this);
|
||||
}
|
||||
// ======================== 事件回调 ========================
|
||||
|
||||
@@ -318,9 +318,9 @@ export class MissionCardComp extends CCComp {
|
||||
this.cards_chou?.off(NodeEventType.TOUCH_START, this.onDrawTouchStart, this);
|
||||
this.cards_chou?.off(NodeEventType.TOUCH_END, this.onDrawTouchEnd, this);
|
||||
this.cards_chou?.off(NodeEventType.TOUCH_CANCEL, this.onDrawTouchCancel, this);
|
||||
this.cards_up?.off(NodeEventType.TOUCH_START, this.onUpgradeTouchStart, this);
|
||||
this.cards_up?.off(NodeEventType.TOUCH_END, this.onUpgradeTouchEnd, this);
|
||||
this.cards_up?.off(NodeEventType.TOUCH_CANCEL, this.onUpgradeTouchCancel, this);
|
||||
// this.cards_up?.off(NodeEventType.TOUCH_START, this.onUpgradeTouchStart, this);
|
||||
// this.cards_up?.off(NodeEventType.TOUCH_END, this.onUpgradeTouchEnd, this);
|
||||
// this.cards_up?.off(NodeEventType.TOUCH_CANCEL, this.onUpgradeTouchCancel, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -462,18 +462,18 @@ export class MissionCardComp extends CCComp {
|
||||
private onDrawTouchCancel() {
|
||||
this.playButtonResetAnim(this.cards_chou);
|
||||
}
|
||||
/** 升级按钮按下反馈 */
|
||||
private onUpgradeTouchStart() {
|
||||
this.playButtonPressAnim(this.cards_up);
|
||||
}
|
||||
/** 升级按钮释放 → 执行升级逻辑 */
|
||||
private onUpgradeTouchEnd() {
|
||||
this.playButtonClickAnim(this.cards_up, () => this.onClickUpgrade());
|
||||
}
|
||||
/** 升级按钮取消 → 恢复缩放 */
|
||||
private onUpgradeTouchCancel() {
|
||||
this.playButtonResetAnim(this.cards_up);
|
||||
}
|
||||
// /** 升级按钮按下反馈 */
|
||||
// private onUpgradeTouchStart() {
|
||||
// this.playButtonPressAnim(this.cards_up);
|
||||
// }
|
||||
// /** 升级按钮释放 → 执行升级逻辑 */
|
||||
// private onUpgradeTouchEnd() {
|
||||
// this.playButtonClickAnim(this.cards_up, () => this.onClickUpgrade());
|
||||
// }
|
||||
// /** 升级按钮取消 → 恢复缩放 */
|
||||
// private onUpgradeTouchCancel() {
|
||||
// this.playButtonResetAnim(this.cards_up);
|
||||
// }
|
||||
|
||||
/** 将四个卡槽节点映射为 CardComp,形成固定顺序控制数组 */
|
||||
private cacheCardComps() {
|
||||
@@ -516,34 +516,34 @@ export class MissionCardComp extends CCComp {
|
||||
this.dispatchCardsToSlots(cards);
|
||||
}
|
||||
|
||||
/** 升级按钮:仅提升卡池等级,卡槽是否更新由下一次抽卡触发 */
|
||||
private onClickUpgrade() {
|
||||
if (this.poolLv >= CARD_POOL_MAX_LEVEL) {
|
||||
mLogger.log(this.debugMode, "MissionCardComp", "pool already max", this.poolLv);
|
||||
return;
|
||||
}
|
||||
const cost = this.getUpgradeCost(this.poolLv);
|
||||
const currentCoin = this.getMissionCoin();
|
||||
if (currentCoin < cost) {
|
||||
oops.gui.toast(`金币不足,升级需要${cost}`);
|
||||
this.updateCoinAndCostUI();
|
||||
mLogger.log(this.debugMode, "MissionCardComp", "pool upgrade coin not enough", {
|
||||
poolLv: this.poolLv,
|
||||
currentCoin,
|
||||
cost
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setMissionCoin(currentCoin - cost);
|
||||
this.poolLv += 1;
|
||||
this.playCoinChangeAnim(false);
|
||||
this.updateCoinAndCostUI();
|
||||
mLogger.log(this.debugMode, "MissionCardComp", "pool level up", {
|
||||
poolLv: this.poolLv,
|
||||
cost,
|
||||
leftCoin: this.getMissionCoin()
|
||||
});
|
||||
}
|
||||
// /** 升级按钮:仅提升卡池等级,卡槽是否更新由下一次抽卡触发 */
|
||||
// private onClickUpgrade() {
|
||||
// if (this.poolLv >= CARD_POOL_MAX_LEVEL) {
|
||||
// mLogger.log(this.debugMode, "MissionCardComp", "pool already max", this.poolLv);
|
||||
// return;
|
||||
// }
|
||||
// const cost = this.getUpgradeCost(this.poolLv);
|
||||
// const currentCoin = this.getMissionCoin();
|
||||
// if (currentCoin < cost) {
|
||||
// oops.gui.toast(`金币不足,升级需要${cost}`);
|
||||
// this.updateCoinAndCostUI();
|
||||
// mLogger.log(this.debugMode, "MissionCardComp", "pool upgrade coin not enough", {
|
||||
// poolLv: this.poolLv,
|
||||
// currentCoin,
|
||||
// cost
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// this.setMissionCoin(currentCoin - cost);
|
||||
// this.poolLv += 1;
|
||||
// this.playCoinChangeAnim(false);
|
||||
// this.updateCoinAndCostUI();
|
||||
// mLogger.log(this.debugMode, "MissionCardComp", "pool level up", {
|
||||
// poolLv: this.poolLv,
|
||||
// cost,
|
||||
// leftCoin: this.getMissionCoin()
|
||||
// });
|
||||
// }
|
||||
|
||||
// ======================== 阶段切换 ========================
|
||||
|
||||
@@ -685,23 +685,23 @@ export class MissionCardComp extends CCComp {
|
||||
}
|
||||
/** 更新升级按钮上的等级文案,反馈当前卡池层级 */
|
||||
private updatePoolLvUI() {
|
||||
if (this.cards_up) {
|
||||
const nobg = this.cards_up.getChildByName("nobg");
|
||||
if (nobg) {
|
||||
nobg.active = !this.canUpPool();
|
||||
}
|
||||
const coinNode = this.cards_up.getChildByName("coin");
|
||||
const label = coinNode?.getChildByName("num")?.getComponent(Label);
|
||||
if (this.poolLv >= CARD_POOL_MAX_LEVEL) {
|
||||
if (label) {
|
||||
label.string = `0`;
|
||||
}
|
||||
} else {
|
||||
if (label) {
|
||||
label.string = `${this.getUpgradeCost(this.poolLv)}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (this.cards_up) {
|
||||
// const nobg = this.cards_up.getChildByName("nobg");
|
||||
// if (nobg) {
|
||||
// nobg.active = !this.canUpPool();
|
||||
// }
|
||||
// const coinNode = this.cards_up.getChildByName("coin");
|
||||
// const label = coinNode?.getChildByName("num")?.getComponent(Label);
|
||||
// if (this.poolLv >= CARD_POOL_MAX_LEVEL) {
|
||||
// if (label) {
|
||||
// label.string = `0`;
|
||||
// }
|
||||
// } else {
|
||||
// if (label) {
|
||||
// label.string = `${this.getUpgradeCost(this.poolLv)}`;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (this.pool_lv_node) {
|
||||
this.pool_lv_node.active = true;
|
||||
const lv = Math.max(CARD_POOL_INIT_LEVEL, Math.min(CARD_POOL_MAX_LEVEL, Math.floor(this.poolLv)));
|
||||
@@ -1059,7 +1059,7 @@ export class MissionCardComp extends CCComp {
|
||||
reset() {
|
||||
this.clearHeroInfoPanels();
|
||||
this.resetButtonScale(this.cards_chou);
|
||||
this.resetButtonScale(this.cards_up);
|
||||
// this.resetButtonScale(this.cards_up);
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user