refactor(config): 将CardKind枚举移动到GameSet并更新相关引用

重构代码结构,将CardKind枚举从CardSet.ts移动到GameSet.ts以集中管理游戏配置枚举
更新MissionCardComp.ts中的卡片类型显示逻辑,支持根据CardKind动态显示对应节点
调整card.prefab的UI元素位置和尺寸,优化卡片显示效果
This commit is contained in:
panw
2026-01-16 10:51:46 +08:00
parent 954f44f454
commit 5bb3acf385
5 changed files with 98 additions and 32 deletions

View File

@@ -2,7 +2,7 @@ import { AttrCards, AttrInfo, CanSelectAttrs } from "./AttrSet";
import { talConf, ItalConf, CanSelectTalents } from "./TalSet";
import { SkillSet, SkillConfig, CanSelectSkills } from "./SkillSet";
import { HeroInfo, heroInfo, CanSelectHeros } from "./heroSet";
import { CardType } from "./GameSet";
import { CardType, CardKind } from "./GameSet";
/**
* 统一卡牌信息接口 (用于UI显示和逻辑处理)
@@ -37,16 +37,6 @@ export interface IPoolConfig {
tag?: string; // 辅助筛选从全池中筛选带tag的如 "special"
}
export enum CardKind {
Atk = 1,
Atted = 2,
Buff = 3,
Attr = 4,
Skill = 5,
Hp = 6,
Dead = 7,
Partner = 8,
}
// 默认单卡权重
const DEFAULT_CARD_WEIGHT = 100;

View File

@@ -30,6 +30,17 @@ export enum CardType {
Attr = 5
}
export enum CardKind {
Atk = 1,
Atted = 2,
Buff = 3,
Attr = 4,
Skill = 5,
Hp = 6,
Dead = 7,
Partner = 8,
}
/**
* 获取等级对应的奖励类型
* @param level 当前等级

View File

@@ -1,6 +1,6 @@
import { count } from "console";
import { Attrs, BType } from "./HeroAttrs";
import { CardKind } from "./CardSet";
import { CardKind } from "./GameSet";
/**
* 天赋类型枚举,也是触发条件