From 3faa5862b75cc621216c062faff721ceae6b8ad4 Mon Sep 17 00:00:00 2001 From: walkpan Date: Sat, 28 Mar 2026 14:32:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(gui):=20=E4=B8=BA=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=B7=BB=E5=8A=A0=E5=85=A5=E5=9C=BA=E5=92=8C?= =?UTF-8?q?=E5=87=BA=E5=9C=BA=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 notify.anim 动画文件,实现从右向左滑入和淡出效果 - 调整弹窗尺寸和文本布局以适配动画效果 - 启用动画组件并配置默认播放 --- assets/resources/common/prefab/notify.prefab | 34 +- assets/resources/gui/anim/notify.anim | 549 +++++++++++++++++++ assets/resources/gui/anim/notify.anim.meta | 13 + 3 files changed, 583 insertions(+), 13 deletions(-) create mode 100644 assets/resources/gui/anim/notify.anim create mode 100644 assets/resources/gui/anim/notify.anim.meta diff --git a/assets/resources/common/prefab/notify.prefab b/assets/resources/common/prefab/notify.prefab index 5347b08b..36068905 100644 --- a/assets/resources/common/prefab/notify.prefab +++ b/assets/resources/common/prefab/notify.prefab @@ -146,7 +146,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 680, - "height": 120 + "height": 80 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -182,7 +182,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@091ff", + "__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@7f50d", "__expectedType__": "cc.SpriteFrame" }, "_type": 1, @@ -285,7 +285,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 15, + "x": 0, "y": 0, "z": 0 }, @@ -326,7 +326,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 610, + "width": 650, "height": 70 }, "_anchorPoint": { @@ -363,10 +363,10 @@ "a": 255 }, "_string": "信息", - "_horizontalAlign": 0, + "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 31, - "_fontSize": 30, + "_actualFontSize": 26, + "_fontSize": 25, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 2, @@ -442,8 +442,8 @@ }, "_alignFlags": 45, "_target": null, - "_left": 60, - "_right": 30, + "_left": 25, + "_right": 25, "_top": 40, "_bottom": 40, "_horizontalCenter": 0, @@ -486,7 +486,7 @@ "__id__": 1 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 21 @@ -691,13 +691,21 @@ "node": { "__id__": 1 }, - "_enabled": false, + "_enabled": true, "__prefab": { "__id__": 31 }, "playOnLoad": true, - "_clips": [], - "_defaultClip": null, + "_clips": [ + { + "__uuid__": "c0d7c1dc-c150-4a47-80b7-826fa74203dd", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "c0d7c1dc-c150-4a47-80b7-826fa74203dd", + "__expectedType__": "cc.AnimationClip" + }, "_id": "" }, { diff --git a/assets/resources/gui/anim/notify.anim b/assets/resources/gui/anim/notify.anim new file mode 100644 index 00000000..485ba9eb --- /dev/null +++ b/assets/resources/gui/anim/notify.anim @@ -0,0 +1,549 @@ +[ + { + "__type__": "cc.AnimationClip", + "_name": "notify", + "_objFlags": 0, + "__editorExtras__": { + "embeddedPlayerGroups": [] + }, + "_native": "", + "sample": 12, + "speed": 1, + "wrapMode": 1, + "enableTrsBlending": false, + "_duration": 2, + "_hash": 500763545, + "_tracks": [ + { + "__id__": 1 + }, + { + "__id__": 11 + } + ], + "_exoticAnimation": null, + "_events": [], + "_embeddedPlayers": [], + "_additiveSettings": { + "__id__": 22 + }, + "_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.5833333134651184, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 6 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [ + 0, + 0.5833333134651184, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 350, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 350, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 350, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 663.406982421875, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 8 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [ + 0, + 0.5833333134651184, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 10 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [], + "_values": [], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.ColorTrack", + "_binding": { + "__type__": "cc.animation.TrackBinding", + "path": { + "__id__": 12 + }, + "proxy": null + }, + "_channels": [ + { + "__id__": 14 + }, + { + "__id__": 16 + }, + { + "__id__": 18 + }, + { + "__id__": 20 + } + ] + }, + { + "__type__": "cc.animation.TrackPath", + "_paths": [ + { + "__id__": 13 + }, + "color" + ] + }, + { + "__type__": "cc.animation.ComponentPath", + "component": "cc.Sprite" + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 15 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [ + 0, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 17 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [ + 0, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 19 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [ + 0, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 21 + } + }, + { + "__type__": "cc.RealCurve", + "_times": [ + 0, + 1.6666666269302368, + 2 + ], + "_values": [ + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": { + "broken": null + } + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 255, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + }, + { + "__type__": "cc.RealKeyframeValue", + "interpolationMode": 0, + "tangentWeightMode": 0, + "value": 0, + "rightTangent": 0, + "rightTangentWeight": 1, + "leftTangent": 0, + "leftTangentWeight": 1, + "easingMethod": 0, + "__editorExtras__": null + } + ], + "preExtrapolation": 1, + "postExtrapolation": 1 + }, + { + "__type__": "cc.AnimationClipAdditiveSettings", + "enabled": false, + "refClip": null + } +] \ No newline at end of file diff --git a/assets/resources/gui/anim/notify.anim.meta b/assets/resources/gui/anim/notify.anim.meta new file mode 100644 index 00000000..3f6ede30 --- /dev/null +++ b/assets/resources/gui/anim/notify.anim.meta @@ -0,0 +1,13 @@ +{ + "ver": "2.0.3", + "importer": "animation-clip", + "imported": true, + "uuid": "c0d7c1dc-c150-4a47-80b7-826fa74203dd", + "files": [ + ".cconb" + ], + "subMetas": {}, + "userData": { + "name": "notify" + } +}