refactor: 移除技能卡牌系统相关代码和资源

1. 删除MSkillBoxComp组件文件及对应的meta配置
2. 从UI配置中移除SkillBox相关注册项
3. 删除MSkillBox.prefab及其meta配置
4. 新增winbox和winboxbg弹窗预制体资源
5. 优化CardLiteComp的注释描述
This commit is contained in:
pan
2026-08-26 09:39:46 +08:00
parent d4499d2154
commit aca32fd5c8
8 changed files with 523 additions and 815 deletions

View File

@@ -2,12 +2,12 @@
"ver": "1.1.50", "ver": "1.1.50",
"importer": "prefab", "importer": "prefab",
"imported": true, "imported": true,
"uuid": "053b0528-ec69-4ff8-85d7-99f128440121", "uuid": "500f0ef4-720a-4f2e-931d-470bf11ce111",
"files": [ "files": [
".json" ".json"
], ],
"subMetas": {}, "subMetas": {},
"userData": { "userData": {
"syncNodeName": "MSkillBox" "syncNodeName": "winbox"
} }
} }

View File

@@ -0,0 +1,319 @@
[
{
"__type__": "cc.Prefab",
"_name": "winboxbg",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "winboxbg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 12
}
],
"_prefab": {
"__id__": 14
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 57.432,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_sky",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 700.0000000000006,
"height": 700
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "08WRaUTRtBoLZDLT2cN4Mc"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@a7b3a",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73",
"__expectedType__": "cc.SpriteAtlas"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "03RfLB07VFR5uklShb2x26"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": -50.00000000000004,
"_bottom": -50,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 185,
"_originalHeight": 81,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a3cPcPwhJD0b1a42pOaLxy"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "70TAIG6KROq7YtmAV7TB6O",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"_contentSize": {
"__type__": "cc.Size",
"width": 700.0000000000006,
"height": 600
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "efn7IzyGtCJIFV50y3xcMm"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": false,
"__prefab": {
"__id__": 13
},
"_alignFlags": 42,
"_target": null,
"_left": 10,
"_right": 10,
"_top": 590,
"_bottom": 300,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fc2EpaVB1BrppLfezSkGbe"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a7x2ngYBBCDZGBGSnpC09G",
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "fa3905e2-e4b8-4b97-8133-f6012983b023",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "winboxbg"
}
}

View File

@@ -23,8 +23,6 @@ export enum UIID {
// Heros, // Heros,
// Talents, // Talents,
Mission, Mission,
/** 技能卡牌系统核心控制器 */
SkillBox,
} }
/** 打开界面方式的配置数据 */ /** 打开界面方式的配置数据 */
@@ -40,6 +38,5 @@ export var UIConfigData: { [key: number]: UIConfig } = {
// [UIID.Heros]: { layer: LayerType.UI, prefab: "gui/element/heros" }, // [UIID.Heros]: { layer: LayerType.UI, prefab: "gui/element/heros" },
// [UIID.Talents]: { layer: LayerType.UI, prefab: "gui/element/talents" }, // [UIID.Talents]: { layer: LayerType.UI, prefab: "gui/element/talents" },
[UIID.Mission]: { layer: LayerType.UI, prefab: "gui/element/mission" }, [UIID.Mission]: { layer: LayerType.UI, prefab: "gui/element/mission" },
[UIID.SkillBox]: { layer: LayerType.UI, prefab: "gui/element/skillbox" },
} }

View File

@@ -8,7 +8,7 @@
* 3. 点击卡牌时通过事件通知父组件(HerosListComp)切换选中英雄详情。 * 3. 点击卡牌时通过事件通知父组件(HerosListComp)切换选中英雄详情。
* *
* 关键设计: * 关键设计:
* - 轻量版 CardComp,仅用于英雄展示,无拖拽使用、无锁定、无费用扣除等交互。 * - 轻量展示组件,仅用于英雄展示,无拖拽使用、无锁定、无费用扣除等交互。
* - 英雄卡图标加载 idle 动画剪辑并提取首帧静态展示。 * - 英雄卡图标加载 idle 动画剪辑并提取首帧静态展示。
* - 通过 iconVisualToken 防止异步加载竞态。 * - 通过 iconVisualToken 防止异步加载竞态。
* *

View File

@@ -1,83 +0,0 @@
/**
* @file MSkillBoxComp.ts
* @description 技能卡牌选择器
*
* 职责:
*
* 关键设计:
*
* 依赖:
*/
import { mLogger } from "../common/Logger";
import { _decorator, instantiate, Label, Node, NodeEventType, Prefab, SpriteAtlas, Tween, tween, Vec3, Widget } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
const { ccclass, property } = _decorator;
/**
* MSkillBoxComp —— 技能卡牌系统核心控制器
*
* 管理 3 个卡牌槽位的抽卡分发、卡池升级、金币费用、
* 在 1,5,10,15,20 回合弹出技能卡牌三选一
*/
@ccclass('MSkillBoxComp')
@ecs.register('MissionCard', false)
export class MSkillBoxComp extends CCComp {
/** 是否启用调试日志 */
private debugMode: boolean = false;
// ======================== 编辑器绑定节点 ========================
/** 卡牌槽位 1 节点 */
@property(Node)
card1: Node = null!
/** 卡牌槽位 2 节点 */
@property(Node)
card2: Node = null!
/** 卡牌槽位 3 节点 */
@property(Node)
card3: Node = null!
/** 刷新按钮 */
@property(Node)
refreshBtn: Node = null!
/** 看广告刷新按钮 */
@property(Node)
adRefreshBtn: Node = null!
/**
* 组件加载:
*/
onLoad() {
}
onAdded(args: any) {
}
onDestroy() {
}
init() {
}
update(dt: number) {
}
private bindEvents() {
}
reset() {
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "85b247fa-1f22-411a-b3a6-82e9797512e1",
"files": [],
"subMetas": {},
"userData": {}
}