feat: 添加战斗结算奖励系统
1. 新增结算奖励配置常量,定义金币、天赋经验、英雄碎片的发放规则与胜利加成系数 2. 新增RewardItemComp通用奖励条目组件,实现数量展示与弹跳入场动画 3. 为VictoryComp添加结算奖励逻辑:计算发放奖励、渲染奖励UI并添加入场动画效果 4. 新增金币、天赋经验奖励预制体并配置到结算弹窗中 5. 调整ui3.plist的图片边框参数适配新奖励图标
This commit is contained in:
@@ -211,3 +211,20 @@ export function getLvColor(lv: number): Color {
|
||||
* 用于 BG_node 下子节点的显隐切换
|
||||
*/
|
||||
export const CARD_LV_BG_COLORS: string[] = ["green", "blue", "purple", "yellow", "red"];
|
||||
|
||||
/**
|
||||
* 战斗结算奖励配置(每局结束后发放:英雄碎片 + 金币 + 天赋经验)。
|
||||
* 数值均为"失败基准",胜利时整体乘以 victory_multiplier。
|
||||
*/
|
||||
export const VICTORY_REWARD_SET = {
|
||||
/** 金币:base + wave_win_count × per_wave */
|
||||
gold: { base: 100, per_wave: 50 },
|
||||
/** 天赋经验:base + wave_win_count × per_wave */
|
||||
talent_exp: { base: 20, per_wave: 10 },
|
||||
/** 每个出场英雄保底碎片数 */
|
||||
played_fragment: 1,
|
||||
/** 随机英雄碎片数量(发放给随机抽中的 1 个英雄) */
|
||||
random_fragment: 2,
|
||||
/** 胜利加成系数(失败 1.0) */
|
||||
victory_multiplier: 1.2,
|
||||
};
|
||||
|
||||
0
assets/script/game/common/config/ItemSet.ts
Normal file
0
assets/script/game/common/config/ItemSet.ts
Normal file
9
assets/script/game/common/config/ItemSet.ts.meta
Normal file
9
assets/script/game/common/config/ItemSet.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "18fae899-4daa-406a-806a-2857fad8b648",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user