7 Commits

Author SHA1 Message Date
pan
4026397cfe fix(map): fix guide trigger logic bug
修复了新手引导2关闭后,技能选取无法触发引导3的逻辑漏洞,将引导2的关闭和引导3的开启判断拆分为独立逻辑,确保正确触发后续引导流程。
2026-06-12 11:07:44 +08:00
pan
969cd657f9 重构(guide): 重构新手引导组件并更新引导prefab配置
将原ECS版本的GuideComp重构为原生Cocos Creator组件,移除冗余ECS依赖
优化引导点击与销毁逻辑,改用框架内置UI管理接口移除引导界面
更新guide1至guide4四个引导prefab,启用动画自动播放并调整动画配置
精简组件事件解绑逻辑,移除冗余的hand节点相关处理代码
2026-06-12 10:54:04 +08:00
pan
b178893a17 feat(新手引导): 实现1-4号新手引导的完整流程
新增UIID.Guide1~Guide4枚举及弹窗UI配置
在任务主页组件中添加引导1的触发与完成逻辑
在任务卡牌组件中按流程触发引导2、3、4,完成步骤后自动切换并标记完成
2026-06-12 10:31:15 +08:00
pan
8e7334f1f0 重构(新手引导): 优化新手引导预制体并清理冗余配置
本次更新了guide1、guide2、guide3、guide4四个引导UI预制体,调整了其布局尺寸与对齐组件,同时清理了MSkillBox和role_controller中冗余的旧引导相关配置,提升代码可维护性。
2026-06-12 10:26:06 +08:00
pan
facccf9a6a feat(引导系统): 新增引导预制体并优化引导交互逻辑
新增引导1至引导4四个引导预制体及对应元数据文件
优化GuideComp组件:添加触摸事件监听与销毁解绑逻辑,实现事件穿透以保证底层功能按钮正常响应
调整已完成引导列表的初始值从空数组改为包含0号引导项
更新角色控制器预制体的引导相关配置参数
2026-06-12 10:08:37 +08:00
pan
167c6b485a refactor(新手引导): 调整引导组件交互与UI实现
- 重构触发逻辑,将触摸事件改为按钮点击触发
- 更新引导预制体,添加弹窗与确认按钮UI
- 调整UI配置文件的边框参数适配新布局
- 简化组件事件管理与代码逻辑
2026-06-12 09:23:03 +08:00
pan
531343c0d7 feat(guide): 添加引导手势动画播放功能
新增dianji(点击)、huadong(滑动)两款手势动画资源及元数据文件
扩展GuideComp引导组件:新增CCString导入、动画名称配置属性,实现延迟加载并播放指定动画的逻辑,包含异常日志处理
更新引导预制体:将原hand节点重命名为shouzhi,添加Animation组件并绑定两款动画剪辑,调整默认配置
2026-06-12 08:57:44 +08:00
22 changed files with 6902 additions and 2843 deletions

View File

@@ -0,0 +1,258 @@
[
{
"__type__": "cc.AnimationClip",
"_name": "dianji",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 15,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 0.6666666666666666,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 11
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.VectorTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channels": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
}
],
"_nComponents": 3
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
"position"
]
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 4
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 20.685,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 6
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": -58.235,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 8
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 10
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "70fd0e99-c640-4497-b2c2-936f5179f227",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "dianji"
}
}

View File

@@ -0,0 +1,258 @@
[
{
"__type__": "cc.AnimationClip",
"_name": "huadong",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 10,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 1,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 11
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.VectorTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channels": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
}
],
"_nComponents": 3
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
"position"
]
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 4
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.7,
1
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 6
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.7,
1
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 213.527,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 8
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.7,
1
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"tangentMode": 0
}
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 10
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "be8b49e0-c726-4c44-823e-d50921b886d3",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "huadong"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,394 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "guide",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "guide",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 12
},
{
"__id__": 14
},
{
"__id__": 16
}
],
"_prefab": {
"__id__": 18
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 640,
"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": "hand",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 11
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -294.238,
"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": "hand",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 8
},
"_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__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 98,
"height": 111
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "79Vu4Cv05PnJw1LXaSE4DD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@5990a",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e4qJ7s1yxD9JrYdfGLFkVo"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c98HTacPpLKZkCGXoKpM4T",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 140
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8bH6M7VahGk79zZiTESQBG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cbf1XjyLtM3ptfNNcea20y",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
"height": 1280
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "50NXlbXx9PHYhb8LT2nDRv"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_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": "10DsksGxZDUbKjtrjCTMxF"
},
{
"__type__": "25122z/cnRPhp90+CJYs5+r",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"hand": {
"__id__": 2
},
"guide_id": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1fYnYBrbBNgoLyArRX18hs"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "6dh4o/8p1Cy5An1p6o4Bc3",
"targetOverrides": null
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,6 @@
],
"subMetas": {},
"userData": {
"syncNodeName": "guide"
"syncNodeName": "guide1"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "26b4ba5a-c5e4-405a-8ce9-27be21f86171",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "guide2"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "9864952d-1b4a-4fb8-9e10-05ae52a1befb",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "guide3"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "d2dcd02d-b49b-45ea-8e20-1cc474837da9",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "guide4"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,26 +22,26 @@
"__id__": 2
},
{
"__id__": 445
"__id__": 423
},
{
"__id__": 454
"__id__": 432
}
],
"_active": true,
"_components": [
{
"__id__": 467
"__id__": 445
},
{
"__id__": 469
"__id__": 447
},
{
"__id__": 471
"__id__": 449
}
],
"_prefab": {
"__id__": 473
"__id__": 451
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -92,25 +92,22 @@
},
{
"__id__": 73
},
{
"__id__": 416
}
],
"_active": true,
"_components": [
{
"__id__": 438
"__id__": 416
},
{
"__id__": 440
"__id__": 418
},
{
"__id__": 442
"__id__": 420
}
],
"_prefab": {
"__id__": 444
"__id__": 422
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -9422,421 +9419,17 @@
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"_parent": {
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_prefab": {
"_enabled": true,
"__prefab": {
"__id__": 417
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 416
},
"asset": {
"__uuid__": "93fda804-b794-4119-a287-952a70be15cb",
"__expectedType__": "cc.Prefab"
},
"fileId": "6dh4o/8p1Cy5An1p6o4Bc3",
"instance": {
"__id__": 418
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "5aJhr6IKBCvr1yjzfuMlha",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [
{
"__id__": 419
}
],
"propertyOverrides": [
{
"__id__": 433
},
{
"__id__": 435
},
{
"__id__": 436
},
{
"__id__": 437
}
],
"removedComponents": []
},
{
"__type__": "cc.MountedComponentsInfo",
"targetInfo": {
"__id__": 420
},
"components": [
{
"__id__": 421
}
]
},
{
"__type__": "cc.TargetInfo",
"localID": [
"cbf1XjyLtM3ptfNNcea20y"
]
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {
"mountedRoot": {
"__id__": 416
}
},
"node": {
"__id__": 422
},
"_enabled": true,
"__prefab": {
"__id__": 432
},
"_alignFlags": 44,
"_target": null,
"_left": 160,
"_right": 160,
"_top": 0,
"_bottom": 275.762,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 400,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "hand",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 416
},
"_children": [
{
"__id__": 423
}
],
"_active": true,
"_components": [
{
"__id__": 429
},
{
"__id__": 421
}
],
"_prefab": {
"__id__": 431
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -294.238,
"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": "hand",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 422
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 424
},
{
"__id__": 426
}
],
"_prefab": {
"__id__": 428
},
"_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__": 423
},
"_enabled": true,
"__prefab": {
"__id__": 425
},
"_contentSize": {
"__type__": "cc.Size",
"width": 98,
"height": 111
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "79Vu4Cv05PnJw1LXaSE4DD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 423
},
"_enabled": true,
"__prefab": {
"__id__": 427
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@5990a",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e4qJ7s1yxD9JrYdfGLFkVo"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c98HTacPpLKZkCGXoKpM4T",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 422
},
"_enabled": true,
"__prefab": {
"__id__": 430
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 140
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8bH6M7VahGk79zZiTESQBG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cbf1XjyLtM3ptfNNcea20y",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6b+8SFUXpKIYA8Q2ep3HVS"
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 434
},
"propertyPath": [
"_name"
],
"value": "guide"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"6dh4o/8p1Cy5An1p6o4Bc3"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 434
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 640,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 434
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 434
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 439
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
@@ -9863,7 +9456,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 441
"__id__": 419
},
"_alignFlags": 21,
"_target": null,
@@ -9899,7 +9492,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 443
"__id__": 421
},
"home_btn": {
"__id__": 121
@@ -9948,14 +9541,14 @@
"__id__": 1
},
"_prefab": {
"__id__": 446
"__id__": 424
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 445
"__id__": 423
},
"asset": {
"__uuid__": "26bff847-cd29-48a5-bbfa-c3e2dbda688d",
@@ -9963,7 +9556,7 @@
},
"fileId": "5a9CMsVQhKP5Y+UJfTKPbx",
"instance": {
"__id__": 447
"__id__": 425
},
"targetOverrides": null
},
@@ -9977,19 +9570,19 @@
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 448
"__id__": 426
},
{
"__id__": 450
"__id__": 428
},
{
"__id__": 451
"__id__": 429
},
{
"__id__": 452
"__id__": 430
},
{
"__id__": 453
"__id__": 431
}
],
"removedComponents": []
@@ -9997,7 +9590,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 449
"__id__": 427
},
"propertyPath": [
"_name"
@@ -10013,7 +9606,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 449
"__id__": 427
},
"propertyPath": [
"_lpos"
@@ -10028,7 +9621,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 449
"__id__": 427
},
"propertyPath": [
"_lrot"
@@ -10044,7 +9637,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 449
"__id__": 427
},
"propertyPath": [
"_euler"
@@ -10059,7 +9652,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 449
"__id__": 427
},
"propertyPath": [
"_active"
@@ -10073,14 +9666,14 @@
"__id__": 1
},
"_prefab": {
"__id__": 455
"__id__": 433
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 454
"__id__": 432
},
"asset": {
"__uuid__": "56aee962-4a5e-45ae-a779-999444d06d18",
@@ -10088,7 +9681,7 @@
},
"fileId": "cboM54s0hM07XCtrpFp0/b",
"instance": {
"__id__": 456
"__id__": 434
},
"targetOverrides": null
},
@@ -10102,28 +9695,28 @@
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 457
"__id__": 435
},
{
"__id__": 459
"__id__": 437
},
{
"__id__": 460
"__id__": 438
},
{
"__id__": 461
"__id__": 439
},
{
"__id__": 462
"__id__": 440
},
{
"__id__": 464
"__id__": 442
},
{
"__id__": 465
"__id__": 443
},
{
"__id__": 466
"__id__": 444
}
],
"removedComponents": []
@@ -10131,7 +9724,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 458
"__id__": 436
},
"propertyPath": [
"_name"
@@ -10147,7 +9740,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 458
"__id__": 436
},
"propertyPath": [
"_lpos"
@@ -10162,7 +9755,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 458
"__id__": 436
},
"propertyPath": [
"_lrot"
@@ -10178,7 +9771,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 458
"__id__": 436
},
"propertyPath": [
"_euler"
@@ -10193,7 +9786,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 463
"__id__": 441
},
"propertyPath": [
"_top"
@@ -10209,7 +9802,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 463
"__id__": 441
},
"propertyPath": [
"_alignFlags"
@@ -10219,7 +9812,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 463
"__id__": 441
},
"propertyPath": [
"_bottom"
@@ -10229,7 +9822,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 458
"__id__": 436
},
"propertyPath": [
"_active"
@@ -10246,7 +9839,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 468
"__id__": 446
},
"_contentSize": {
"__type__": "cc.Size",
@@ -10274,7 +9867,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 470
"__id__": 448
},
"_alignFlags": 45,
"_target": null,
@@ -10310,7 +9903,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 472
"__id__": 450
},
"debugMode": false,
"_id": ""
@@ -10329,16 +9922,13 @@
},
"fileId": "6514ysgfJNtIx/ak03+nce",
"instance": null,
"targetOverrides": null,
"targetOverrides": [],
"nestedPrefabInstanceRoots": [
{
"__id__": 454
"__id__": 432
},
{
"__id__": 445
},
{
"__id__": 416
"__id__": 423
},
{
"__id__": 55

View File

@@ -9960,8 +9960,8 @@
"height": 539,
"rawWidth": 480,
"rawHeight": 539,
"borderTop": 72,
"borderBottom": 346,
"borderTop": 36,
"borderBottom": 296,
"borderLeft": 38,
"borderRight": 30,
"packable": true,

View File

@@ -44,7 +44,7 @@ export class SingletonModuleComp extends ecs.Comp {
in_fight: false,
stop_mon_action: false,
};
finish_guides: number[] = []
finish_guides: number[] = [0]
data: any = {
score: 0,
mission: 1,

View File

@@ -24,6 +24,10 @@ export enum UIID {
HInfo,
/** 技能卡牌系统核心控制器 */
SkillBox,
Guide1,
Guide2,
Guide3,
Guide4,
}
/** 打开界面方式的配置数据 */
@@ -40,4 +44,8 @@ export var UIConfigData: { [key: number]: UIConfig } = {
[UIID.Mission]: { layer: LayerType.UI, prefab: "gui/element/mission" },
[UIID.HInfo]: { layer: LayerType.UI, prefab: "gui/element/hnode" },
[UIID.SkillBox]: { layer: LayerType.UI, prefab: "gui/element/skillbox" },
[UIID.Guide1]: { layer: LayerType.PopUp, prefab: "gui/element/guide1" },
[UIID.Guide2]: { layer: LayerType.PopUp, prefab: "gui/element/guide2" },
[UIID.Guide3]: { layer: LayerType.PopUp, prefab: "gui/element/guide3" },
[UIID.Guide4]: { layer: LayerType.PopUp, prefab: "gui/element/guide4" },
}

View File

@@ -1,46 +1,27 @@
import { mLogger } from "../common/Logger";
import { _decorator, Animation, AnimationClip, EventTouch, Label, Node, NodeEventType, Sprite, SpriteAtlas, Tween, tween, UIOpacity, Vec3, resources, Light, UITransform, Widget, CCInteger } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { _decorator, Animation, AnimationClip, EventTouch, Label, Node, NodeEventType, Sprite, SpriteAtlas, Tween, tween, UIOpacity, Vec3, resources, Light, UITransform, Widget, CCInteger, CCString, Component } from "cc";
import { smc } from "../common/SingletonModuleComp";
import { UIID } from "../common/config/GameUIConfig";
import { oops } from "db://oops-framework/core/Oops";
const { ccclass, property } = _decorator;
@ccclass('GuideComp')
@ecs.register('GuideComp', false)
export class GuideComp extends CCComp {
export class GuideComp extends Component {
/** 是否开启调试日志 */
private debugMode: boolean = true;
// ======================== 编辑器绑定节点 ========================
/** 手势图标节点 */
@property(Node)
hand: Node = null!
/** 引导编号 ID */
@property({ type: CCInteger })
guide_id: number = 0
onLoad() {
// 如果该引导已经完成,则隐藏并销毁本节点
if (smc.finish_guides.includes(this.guide_id)) {
this.node.active = false;
this.node.destroy();
return;
}
// 监听手势节点点击事件
if (this.hand) {
this.hand.on(NodeEventType.TOUCH_START, this.onTouchStart, this);
this.hand.on(NodeEventType.TOUCH_END, this.onGuideClick, this);
} else {
// 兜底:如果没有绑定手势节点,则监听自身节点
this.node.on(NodeEventType.TOUCH_START, this.onTouchStart, this);
this.node.on(NodeEventType.TOUCH_END, this.onGuideClick, this);
}
// 监听自身节点(即弹窗任意位置)的点击事件
this.node.on(NodeEventType.TOUCH_START, this.onTouchStart, this);
this.node.on(NodeEventType.TOUCH_END, this.onGuideClick, this);
}
private onTouchStart(event: EventTouch) {
@@ -61,17 +42,25 @@ export class GuideComp extends CCComp {
// 允许事件穿透,确保底层的实际功能按钮能正常接收到点击事件
event.preventSwallow = true;
// 完成后隐藏并销毁引导节点
this.node.active = false;
this.node.destroy();
// 因为通过 oops.gui.open(UIID) 弹出的界面根节点可能会带有一个阻挡点击的遮罩组件BlockInputEvents
// 所以应当通过 oops.gui.remove 彻底从框架的层级管理中移除当前界面。
let targetUIID = -1;
if (this.guide_id === 1) targetUIID = UIID.Guide1;
if (this.guide_id === 2) targetUIID = UIID.Guide2;
if (this.guide_id === 3) targetUIID = UIID.Guide3;
if (this.guide_id === 4) targetUIID = UIID.Guide4;
if (targetUIID !== -1) {
oops.gui.remove(targetUIID);
} else {
// 兜底方案
this.node.active = false;
this.node.destroy();
}
}
/** 组件销毁时解绑所有事件,防止残留回调 */
onDestroy() {
if (this.hand && this.hand.isValid) {
this.hand.off(NodeEventType.TOUCH_START, this.onTouchStart, this);
this.hand.off(NodeEventType.TOUCH_END, this.onGuideClick, this);
}
if (this.node && this.node.isValid) {
this.node.off(NodeEventType.TOUCH_START, this.onTouchStart, this);
this.node.off(NodeEventType.TOUCH_END, this.onGuideClick, this);
@@ -82,11 +71,4 @@ export class GuideComp extends CCComp {
init() {
}
/** ECS 组件移除时的释放钩子:销毁节点 */
reset() {
if (this.node && this.node.isValid) {
this.node.destroy();
}
}
}

View File

@@ -49,6 +49,7 @@ import { FacSet, FightSet } from "../common/config/GameSet";
import { MoveComp } from "../hero/MoveComp";
import { MissionHeroComp } from "./MissionHeroComp";
import { MissionEconomy } from "./MissionEconomy";
import { UIID } from "../common/config/GameUIConfig";
const { ccclass, property } = _decorator;
@@ -328,6 +329,12 @@ export class MissionCardComp extends CCComp {
this.isBattlePhase = true;
this.enterBattlePhase();
this.clearAllCards();
// 第一次进入战斗阶段关闭guide4
if (!smc.finish_guides.includes(4)) {
smc.finish_guides.push(4);
oops.gui.remove(UIID.Guide4);
}
}
/**
@@ -411,6 +418,11 @@ export class MissionCardComp extends CCComp {
const cards = this.buildSkillDrawCards();
this.dispatchCardsToSkillSlots(cards);
this.playSkillCardEnterAnim();
// 首次弹出技能三选一的时候弹出guide2
if (!smc.finish_guides.includes(2)) {
oops.gui.open(UIID.Guide2);
}
}
private dispatchCardsToSkillSlots(cards: CardConfig[]) {
@@ -427,6 +439,24 @@ export class MissionCardComp extends CCComp {
if (this.skill_card_node && this.skill_card_node.isValid) {
this.skill_card_node.active = false;
}
// 首次完成技能选取后 关闭guide2打开guide3
// 之前这里有个逻辑漏洞:玩家如果在弹出 guide2 之前就已经因为手快点掉了 guide2
// smc.finish_guides 里就会有 2。
// 但其实这里的本意是:只要发生了选取技能,并且 guide3 还没弹过,就弹 guide3。
// 如果我们把它包在 `if (!smc.finish_guides.includes(2))` 里,
// 当玩家点击 guide2 把它关掉时finish_guides 存入了 2
// 再点技能卡触发这个方法,外层 if 就会进不去guide3 就永远弹不出来了!
// 修复:独立判断 guide2 的关闭 和 guide3 的开启
if (!smc.finish_guides.includes(2)) {
smc.finish_guides.push(2);
oops.gui.remove(UIID.Guide2);
}
if (!smc.finish_guides.includes(3)) {
oops.gui.open(UIID.Guide3);
}
}
/** 解除按钮监听,避免节点销毁后回调泄漏 */
@@ -474,6 +504,16 @@ export class MissionCardComp extends CCComp {
const before = this.getAliveHeroCount();
const after = this.getAliveHeroCount();
this.updateHeroNumUI(true, after > before);
// 第一次召唤英雄后关闭guide3打开guide4
if (!smc.finish_guides.includes(3)) {
smc.finish_guides.push(3);
oops.gui.remove(UIID.Guide3);
}
if (!smc.finish_guides.includes(4)) {
oops.gui.open(UIID.Guide4);
}
}
/** 英雄死亡事件回调:刷新面板列表并更新英雄数量 UI */

View File

@@ -70,6 +70,11 @@ export class MissionHomeComp extends CCComp {
/** 启动时显示主页 */
start() {
this.home_active()
// 首次打开游戏打开guide1
if (!smc.finish_guides.includes(1)) {
oops.gui.open(UIID.Guide1);
}
}
onEnable(){
@@ -88,6 +93,13 @@ export class MissionHomeComp extends CCComp {
*/
start_mission() {
mLogger.log(this.debugMode, 'MissionHomeComp', "start_mission")
// 进入战斗后关闭guide1
if (!smc.finish_guides.includes(1)) {
smc.finish_guides.push(1);
oops.gui.remove(UIID.Guide1);
}
oops.gui.open(UIID.Mission)
this.node.active=false;