fix(map): 修复任务奖励图标加载问题并重构组件逻辑

- 移除 MGetsComp 中未使用的属性和方法,简化组件结构
- 在 MissionGetsComp 中实现动态加载奖励图标功能,支持从 gui/uicons 图集获取
- 调整 get.prefab 结构,分离图标和数字显示节点
- 解决资源加载机制限制,确保动态加载资源正常工作
This commit is contained in:
panw
2026-01-27 16:02:33 +08:00
parent ce6b7bce1e
commit b869e1c33c
4 changed files with 204 additions and 47 deletions

View File

@@ -29,25 +29,28 @@
},
{
"__id__": 26
},
{
"__id__": 32
}
],
"_active": true,
"_components": [
{
"__id__": 32
"__id__": 38
},
{
"__id__": 34
"__id__": 40
},
{
"__id__": 36
"__id__": 42
},
{
"__id__": 39
"__id__": 45
}
],
"_prefab": {
"__id__": 41
"__id__": 47
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -605,7 +608,7 @@
},
{
"__type__": "cc.Node",
"_name": "num",
"_name": "icon",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
@@ -626,8 +629,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 34.381,
"y": -27.61,
"x": 0,
"y": 3,
"z": 0
},
"_lrot": {
@@ -665,6 +668,142 @@
"__prefab": {
"__id__": 28
},
"_contentSize": {
"__type__": "cc.Size",
"width": 93,
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bbJGIGV/FBhKHt/1tzLuwE"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 26
},
"_enabled": true,
"__prefab": {
"__id__": 30
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "031877cb-0f3d-4e92-bc5d-e492a0d95a08@5dd64",
"__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": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4al0MLxMlB56FJWnzCZ4F9"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "3fySg1nP5PX4FJgI5Phn2X",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "num",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
},
{
"__id__": 35
}
],
"_prefab": {
"__id__": 37
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 34.381,
"y": -27.61,
"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__": 32
},
"_enabled": true,
"__prefab": {
"__id__": 34
},
"_contentSize": {
"__type__": "cc.Size",
"width": 17.90380859375,
@@ -687,11 +826,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 26
"__id__": 32
},
"_enabled": true,
"__prefab": {
"__id__": 30
"__id__": 36
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -772,7 +911,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 33
"__id__": 39
},
"_contentSize": {
"__type__": "cc.Size",
@@ -800,7 +939,7 @@
},
"_enabled": false,
"__prefab": {
"__id__": 35
"__id__": 41
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -845,11 +984,11 @@
},
"_enabled": true,
"__prefab": {
"__id__": 37
"__id__": 43
},
"clickEvents": [
{
"__id__": 38
"__id__": 44
}
],
"_interactable": true,
@@ -913,7 +1052,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 40
"__id__": 46
},
"_id": ""
},