diff --git a/.creator/asset-template/typescript/Custom Script Template Help Documentation.url b/.creator/asset-template/typescript/Custom Script Template Help Documentation.url new file mode 100644 index 0000000..7606df0 --- /dev/null +++ b/.creator/asset-template/typescript/Custom Script Template Help Documentation.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template \ No newline at end of file diff --git a/.creator/default-meta.json b/.creator/default-meta.json new file mode 100644 index 0000000..b94d8fd --- /dev/null +++ b/.creator/default-meta.json @@ -0,0 +1,5 @@ +{ + "image": { + "type": "sprite-frame" + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f28e06 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ + +#/////////////////////////// +# Cocos Creator 3D Project +#/////////////////////////// +library/ +temp/ +local/ +profiles/ +native +#////////////////////////// +# NPM +#////////////////////////// +node_modules/ + +#////////////////////////// +# VSCode +#////////////////////////// +.vscode/ + +#////////////////////////// +# WebStorm +#////////////////////////// +.idea/ \ No newline at end of file diff --git a/Cocos3.8.5.zip b/Cocos3.8.5.zip deleted file mode 100644 index e3bdad9..0000000 Binary files a/Cocos3.8.5.zip and /dev/null differ diff --git a/assets/music.meta b/assets/music.meta new file mode 100644 index 0000000..e5c4a61 --- /dev/null +++ b/assets/music.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "28332136-19e6-4c1d-8555-e108ef3ab5b2", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/music/bgm2.mp3 b/assets/music/bgm2.mp3 new file mode 100644 index 0000000..119628d Binary files /dev/null and b/assets/music/bgm2.mp3 differ diff --git a/assets/music/bgm2.mp3.meta b/assets/music/bgm2.mp3.meta new file mode 100644 index 0000000..7a228eb --- /dev/null +++ b/assets/music/bgm2.mp3.meta @@ -0,0 +1,14 @@ +{ + "ver": "1.0.0", + "importer": "audio-clip", + "imported": true, + "uuid": "8cb692c5-0c41-4a9b-b756-e892f17174a9", + "files": [ + ".json", + ".mp3" + ], + "subMetas": {}, + "userData": { + "downloadMode": 0 + } +} diff --git a/assets/music/click.mp3 b/assets/music/click.mp3 new file mode 100644 index 0000000..f48e031 Binary files /dev/null and b/assets/music/click.mp3 differ diff --git a/assets/music/click.mp3.meta b/assets/music/click.mp3.meta new file mode 100644 index 0000000..486742d --- /dev/null +++ b/assets/music/click.mp3.meta @@ -0,0 +1,14 @@ +{ + "ver": "1.0.0", + "importer": "audio-clip", + "imported": true, + "uuid": "5820b826-c2ed-45b2-a6c0-b4150bcef586", + "files": [ + ".json", + ".mp3" + ], + "subMetas": {}, + "userData": { + "downloadMode": 0 + } +} diff --git a/assets/music/success.mp3 b/assets/music/success.mp3 new file mode 100644 index 0000000..434955f Binary files /dev/null and b/assets/music/success.mp3 differ diff --git a/assets/music/success.mp3.meta b/assets/music/success.mp3.meta new file mode 100644 index 0000000..eb744c0 --- /dev/null +++ b/assets/music/success.mp3.meta @@ -0,0 +1,14 @@ +{ + "ver": "1.0.0", + "importer": "audio-clip", + "imported": true, + "uuid": "535db2a0-6556-4550-825e-31620cae8de0", + "files": [ + ".json", + ".mp3" + ], + "subMetas": {}, + "userData": { + "downloadMode": 0 + } +} diff --git a/assets/prefab.meta b/assets/prefab.meta new file mode 100644 index 0000000..978df96 --- /dev/null +++ b/assets/prefab.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "689726a6-3b07-4134-8a2e-efab9605bafc", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/prefab/game.meta b/assets/prefab/game.meta new file mode 100644 index 0000000..7f28f22 --- /dev/null +++ b/assets/prefab/game.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "69e3ca4b-d141-4234-9dd1-f405d9dee36e", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/prefab/resNode.meta b/assets/prefab/resNode.meta new file mode 100644 index 0000000..e7912c7 --- /dev/null +++ b/assets/prefab/resNode.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "136ad607-0e1c-4b90-91ca-76da5adabc8b", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/prefab/resNode/res_main.prefab b/assets/prefab/resNode/res_main.prefab new file mode 100644 index 0000000..a67aa6a --- /dev/null +++ b/assets/prefab/resNode/res_main.prefab @@ -0,0 +1,117 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "res_main", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "res_main", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 4 + }, + "_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__": "f5f44OeETZIQbcE4fdL9Jmh", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "SpriteFrameArr": [], + "PrefabArr": [ + { + "__uuid__": "9e3c81a2-06f0-455e-8582-70359b348cf8", + "__expectedType__": "cc.Prefab" + } + ], + "audiosArr": [ + { + "__uuid__": "5820b826-c2ed-45b2-a6c0-b4150bcef586", + "__expectedType__": "cc.AudioClip" + }, + { + "__uuid__": "8cb692c5-0c41-4a9b-b756-e892f17174a9", + "__expectedType__": "cc.AudioClip" + }, + { + "__uuid__": "535db2a0-6556-4550-825e-31620cae8de0", + "__expectedType__": "cc.AudioClip" + } + ], + "MaterialArr": [], + "Texture2DArr": [ + { + "__uuid__": "56a35c4e-18ad-4795-86ad-f11bb3ebaa5a@f9941", + "__expectedType__": "cc.SpriteFrame" + } + ], + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a096fKgtdGxJWFFGGAdi8y" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f8xZbaNcFJS4LctnHRpRy4", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/prefab/resNode/res_main.prefab.meta b/assets/prefab/resNode/res_main.prefab.meta new file mode 100644 index 0000000..ca882b9 --- /dev/null +++ b/assets/prefab/resNode/res_main.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "57d04e5b-f2fe-4c57-945c-c9a9b7f07d78", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "res_main" + } +} diff --git a/assets/prefab/uiPanel.meta b/assets/prefab/uiPanel.meta new file mode 100644 index 0000000..85c4d59 --- /dev/null +++ b/assets/prefab/uiPanel.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "b775cc71-acaf-4bb6-93e8-4cca0d702eb1", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/prefab/uiPanel/OverUI.prefab b/assets/prefab/uiPanel/OverUI.prefab new file mode 100644 index 0000000..5765ec4 --- /dev/null +++ b/assets/prefab/uiPanel/OverUI.prefab @@ -0,0 +1,1785 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "OverUI", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "OverUI", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 12 + }, + { + "__id__": 54 + } + ], + "_active": true, + "_components": [ + { + "__id__": 68 + }, + { + "__id__": 70 + }, + { + "__id__": 72 + } + ], + "_prefab": { + "__id__": 74 + }, + "_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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bgColor", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 11 + }, + "_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": 33554432, + "_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": 720, + "height": 1280 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "acM2Q/fRtLwZuE91UXa+FG" + }, + { + "__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": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "56a35c4e-18ad-4795-86ad-f11bb3ebaa5a@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_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": "78huw7eAdAyYqfxygspFTc" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 8 + }, + "_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": 2, + "_originalHeight": 2, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ebkODhlJ5Ly7ht/4eRmdX+" + }, + { + "__type__": "cc.UIOpacity", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 10 + }, + "_opacity": 120, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ff/VWyD5dLupDTgLeBMD4w" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7ap/IFsVhC27m/oi3Heq2G", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "viewNode", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 13 + }, + { + "__id__": 19 + }, + { + "__id__": 33 + }, + { + "__id__": 39 + } + ], + "_active": true, + "_components": [ + { + "__id__": 51 + } + ], + "_prefab": { + "__id__": 53 + }, + "_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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "socreLab", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + }, + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 300, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 111.23046875, + "height": 126 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5aDIcpBjJOPZUaA8k7tuE7" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "99", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 100, + "_fontSize": 100, + "_fontFamily": "Arial", + "_lineHeight": 100, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "06KMtnVo1Kg4qWdZre7R2M" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "faaK4+AN9HsaKutgatbiY2", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "maxScoreLab", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 12 + }, + "_children": [ + { + "__id__": 20 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + }, + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 32 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 25, + "y": 150, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "maxIcon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + }, + { + "__id__": 23 + }, + { + "__id__": 25 + } + ], + "_prefab": { + "__id__": 27 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -86.96871093749999, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 22 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 46, + "height": 43 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5bBYV1DIpD54TgBqYYsGGc" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 24 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9b914cf0-224a-4a7a-93cc-4ab3906fbeec@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_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": "6a7H0hXphJJacu8+KdOGN2" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_alignFlags": 8, + "_target": null, + "_left": -59.915, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "54dy7ELqZElr+KRSl4Jdjc" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0dhAMZWbtGdqfa5cDjlyBo", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": { + "__id__": 29 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100.107421875, + "height": 75.6 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43LwWioiZHPoDcNR0BBsLd" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "999", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 60, + "_fontSize": 60, + "_fontFamily": "Arial", + "_lineHeight": 60, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "99Y6CX1GhMEJZe27H1VMj2" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "71Ucx4zV5BC4C3TZiSxRHd", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "infoLab", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_prefab": { + "__id__": 38 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -1.234, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 35 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 404.5166015625, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4buyExbydONrSwU3NQqiOF" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "击败了全球100%的玩家!", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 35, + "_fontSize": 35, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_enableOutline": false, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 2, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9aHetxgVNNP5YtREEVinfk" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "dbAkvSO1RKoJYBZa2KIE11", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "startBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 12 + }, + "_children": [ + { + "__id__": 40 + } + ], + "_active": true, + "_components": [ + { + "__id__": 46 + }, + { + "__id__": 48 + } + ], + "_prefab": { + "__id__": 50 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -224.533, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "btnBg", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 41 + }, + { + "__id__": 43 + } + ], + "_prefab": { + "__id__": 45 + }, + "_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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 40 + }, + "_enabled": true, + "__prefab": { + "__id__": 42 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 175, + "height": 175 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b2ym4wRSZMHL5qzJt9Ling" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 40 + }, + "_enabled": true, + "__prefab": { + "__id__": 44 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "73b3655a-f0d7-4f43-b215-efb04b1633be@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_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": "b1JRYHeyRD27Wp14bX/z3Z" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "09LRYxkalGyLuRoSwKVW4z", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 39 + }, + "_enabled": true, + "__prefab": { + "__id__": 47 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "339WZA8HNAip2wi/LQnJCO" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 39 + }, + "_enabled": true, + "__prefab": { + "__id__": 49 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 39 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8aPPJZfp5BNoIQ2yKDBjFx" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2ak4wB2SlPsrcw5usSiw8v", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": { + "__id__": 52 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "26inYBFV9IuLccs/BmpSvl" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "98x9nSCmFGHKeZuk2GtA6V", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "moreBtn", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 55 + } + ], + "_active": true, + "_components": [ + { + "__id__": 61 + }, + { + "__id__": 63 + }, + { + "__id__": 65 + } + ], + "_prefab": { + "__id__": 67 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -289.028, + "y": 565, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "btnBg", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 54 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 56 + }, + { + "__id__": 58 + } + ], + "_prefab": { + "__id__": 60 + }, + "_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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 55 + }, + "_enabled": true, + "__prefab": { + "__id__": 57 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 80, + "height": 81 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "55J8T7NaJGtYRtquubZV75" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 55 + }, + "_enabled": true, + "__prefab": { + "__id__": 59 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "34ced794-7ae5-40da-b5aa-d6a8fbd39a38@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_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": "9dat18jzhESJRReU1ZIWeG" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "977wZ6iStHmLN9I0gG0avY", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 62 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a7oSHWX29LEYkQ4Ev0xIt2" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 64 + }, + "clickEvents": [], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 54 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "75kgo/Qh1BXbB1+s1X910M" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 66 + }, + "_alignFlags": 1, + "_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": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "88FaunB05I+qLm67tuMYsr" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "89Is10BVxB4Yb+gNQW+owo", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "37f48mOpsZDIKuk5N0nbpWc", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 69 + }, + "bgSpr": { + "__id__": 2 + }, + "viewNode": { + "__id__": 12 + }, + "scoreLab": { + "__id__": 16 + }, + "maxScoreLab": { + "__id__": 30 + }, + "infoText": { + "__id__": 36 + }, + "moreBtn": { + "__id__": 54 + }, + "aginBtn": { + "__id__": 39 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c3IYo7S4lKx7DZt33CzqQ7" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 71 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 720, + "height": 1280 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4674fWl/ZLo70VuPSzEDT7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 73 + }, + "_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": "ccYKPIGqVOCL6RGVVL71nf" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "adXKxY1ZVNR7K8iXt74BRl", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/prefab/uiPanel/OverUI.prefab.meta b/assets/prefab/uiPanel/OverUI.prefab.meta new file mode 100644 index 0000000..e32b2d1 --- /dev/null +++ b/assets/prefab/uiPanel/OverUI.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "9e3c81a2-06f0-455e-8582-70359b348cf8", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "OverUI" + } +} diff --git a/assets/resources.meta b/assets/resources.meta new file mode 100644 index 0000000..f51fbd6 --- /dev/null +++ b/assets/resources.meta @@ -0,0 +1,14 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "19090a79-a429-4a83-a4e2-37e32242724f", + "files": [], + "subMetas": {}, + "userData": { + "isBundle": true, + "bundleConfigID": "default", + "bundleName": "resources", + "priority": 8 + } +} diff --git a/assets/scene.meta b/assets/scene.meta new file mode 100644 index 0000000..7f79222 --- /dev/null +++ b/assets/scene.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "cf0ffdde-f515-4857-8cd7-67ffbb88096f", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/scene/MainGame.scene b/assets/scene/MainGame.scene new file mode 100644 index 0000000..16481d2 --- /dev/null +++ b/assets/scene/MainGame.scene @@ -0,0 +1,1030 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "MainGame", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_name": "MainGame", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 4 + }, + { + "__id__": 15 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 24 + }, + "_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 + }, + "autoReleaseAssets": false, + "_globals": { + "__id__": 25 + }, + "_id": "0401497c-b8be-4d0f-a5dd-55ed73f46146" + }, + { + "__type__": "cc.Node", + "_name": "initGame", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": null, + "_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": "f14IrQGO9P4Lidp5ktLuCP" + }, + { + "__type__": "e6010D0hTxNgaoZ2buxgch1", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "resNodeArr": [ + { + "__uuid__": "57d04e5b-f2fe-4c57-945c-c9a9b7f07d78", + "__expectedType__": "cc.Prefab" + } + ], + "rType": 3, + "storageKey": "Find_4_Icons", + "fitWidth": 720, + "fitHeight": 1280, + "_id": "a9Ab4YA6hGBLr3kXoUoRgW" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 5 + }, + { + "__id__": 7 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 12 + }, + { + "__id__": 13 + }, + { + "__id__": 14 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 360, + "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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "e8y8lvcpRF/5w7lKcpcoVs" + }, + { + "__type__": "cc.Node", + "_name": "UICamera", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 1000 + }, + "_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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "e9A2OzjU5ITqd1KS+c72Uz" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_projection": 0, + "_priority": 65535, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 640, + "_near": 1, + "_far": 2000, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 2, + "_stencil": 0, + "_clearFlags": 6, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 41943040, + "_targetTexture": null, + "_postProcess": null, + "_usePostProcess": false, + "_cameraType": -1, + "_trackingType": 0, + "_id": "7aSYCEiVpLlLbQaP1oAx2q" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 9 + }, + { + "__id__": 10 + } + ], + "_prefab": null, + "_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": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "a6Z8ifjtFAupo+xrHb5mEY" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 720, + "height": 1280 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "aayT0MJkRCrYL9f7VdPG1c" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 255, + "b": 245, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "eaGSuHpw1Ic6wJEov/qvvI" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "_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": 720, + "_originalHeight": 1280, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "8c12N2kL1Ibrpl2en8r+bz" + }, + { + "__type__": "874b2+YDKFMx6JTjx83mTa+", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": null, + "_id": "86x87e04NK2qNbYwuQcw3X" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 720, + "height": 1280 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "a8Ht4HAgZA3JSn+Z+KD/dM" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": null, + "_cameraComponent": { + "__id__": 6 + }, + "_alignCanvasWithScreen": true, + "_id": "27dYPTS+JJ9YcVfkJZQp/x" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": null, + "_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": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "f1aA+JgsBLBatu5lA4Aafn" + }, + { + "__type__": "cc.Node", + "_name": "3DNode", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 16 + }, + { + "__id__": 19 + }, + { + "__id__": 21 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_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": "36bYThj/VEUbPqc5+Fp8Mt" + }, + { + "__type__": "cc.Node", + "_name": "MainLight", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 53.956 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": -0.32470989505337083, + "y": 0, + "z": 0, + "w": 0.9458136624380242 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": -37.896, + "y": 0, + "z": 0 + }, + "_id": "c0ka+2WdtAuaozGJEFVg+r" + }, + { + "__type__": "cc.DirectionalLight", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 16 + }, + "_enabled": true, + "__prefab": null, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_useColorTemperature": false, + "_colorTemperature": 6550, + "_staticSettings": { + "__id__": 18 + }, + "_visibility": -325058561, + "_illuminanceHDR": 65000, + "_illuminance": 65000, + "_illuminanceLDR": 1.6927083333333335, + "_shadowEnabled": false, + "_shadowPcf": 0, + "_shadowBias": 0.00001, + "_shadowNormalBias": 0, + "_shadowSaturation": 1, + "_shadowDistance": 50, + "_shadowInvisibleOcclusionRange": 200, + "_csmLevel": 4, + "_csmLayerLambda": 0.75, + "_csmOptimizationMode": 2, + "_csmAdvancedOptions": false, + "_csmLayersTransition": false, + "_csmTransitionRange": 0.05, + "_shadowFixedArea": false, + "_shadowNear": 0.1, + "_shadowFar": 10, + "_shadowOrthoSize": 5, + "_id": "9fLWG+yyVI8bn73kkwACkt" + }, + { + "__type__": "cc.StaticLightSettings", + "_baked": false, + "_editorOnly": false, + "_castShadow": false + }, + { + "__type__": "cc.Node", + "_name": "MainCamera", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 20 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 32.831 + }, + "_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": "91dTFLXudIN4ameu63IqyQ" + }, + { + "__type__": "cc.Camera", + "_name": "Camera", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_projection": 1, + "_priority": 65535, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 10, + "_near": 1, + "_far": 1000, + "_color": { + "__type__": "cc.Color", + "r": 51, + "g": 76, + "b": 120, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 6, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 1822425087, + "_targetTexture": null, + "_postProcess": null, + "_usePostProcess": false, + "_cameraType": -1, + "_trackingType": 0, + "_id": "ddCjh118tGlagbHNB++4Ta" + }, + { + "__type__": "cc.Node", + "_name": "Cube", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": null, + "_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": "13buJDM/ZG8I0afziIiXTi" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "Cube", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_materials": [ + { + "__uuid__": "620b6bf3-0369-4560-837f-2a2c00b73c26", + "__expectedType__": "cc.Material" + } + ], + "_visFlags": 0, + "bakeSettings": { + "__id__": 23 + }, + "_mesh": { + "__uuid__": "1263d74c-8167-4928-91a6-4e2672411f47@a804a", + "__expectedType__": "cc.Mesh" + }, + "_shadowCastingMode": 0, + "_shadowReceivingMode": 1, + "_shadowBias": 0, + "_shadowNormalBias": 0, + "_reflectionProbeId": -1, + "_reflectionProbeBlendId": -1, + "_reflectionProbeBlendWeight": 0, + "_enabledGlobalStandardSkinObject": false, + "_enableMorph": true, + "_id": "8blZx8FeNBta05Hhq62aw/" + }, + { + "__type__": "cc.ModelBakeSettings", + "texture": null, + "uvParam": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "_bakeable": false, + "_castShadow": false, + "_receiveShadow": false, + "_recieveShadow": false, + "_lightmapSize": 64, + "_useLightProbe": false, + "_bakeToLightProbe": true, + "_reflectionProbeType": 0, + "_bakeToReflectionProbe": true + }, + { + "__type__": "cc.PrefabInfo", + "root": null, + "asset": null, + "fileId": "0401497c-b8be-4d0f-a5dd-55ed73f46146", + "instance": null, + "targetOverrides": [] + }, + { + "__type__": "cc.SceneGlobals", + "ambient": { + "__id__": 26 + }, + "shadows": { + "__id__": 27 + }, + "_skybox": { + "__id__": 28 + }, + "fog": { + "__id__": 29 + }, + "octree": { + "__id__": 30 + }, + "skin": { + "__id__": 31 + }, + "lightProbeInfo": { + "__id__": 32 + }, + "postSettings": { + "__id__": 33 + }, + "bakedWithStationaryMainLight": false, + "bakedWithHighpLightmap": false + }, + { + "__type__": "cc.AmbientInfo", + "_skyColorHDR": { + "__type__": "cc.Vec4", + "x": 0.242613, + "y": 0.362617, + "z": 0.798746, + "w": 0.520833125 + }, + "_skyColor": { + "__type__": "cc.Vec4", + "x": 0.242613, + "y": 0.362617, + "z": 0.798746, + "w": 0.520833125 + }, + "_skyIllumHDR": 20000, + "_skyIllum": 20000, + "_groundAlbedoHDR": { + "__type__": "cc.Vec4", + "x": 0.241814, + "y": 0.361945, + "z": 0.798799, + "w": 0 + }, + "_groundAlbedo": { + "__type__": "cc.Vec4", + "x": 0.241814, + "y": 0.361945, + "z": 0.798799, + "w": 0 + }, + "_skyColorLDR": { + "__type__": "cc.Vec4", + "x": 0.519964, + "y": 0.630786, + "z": 0.905039, + "w": 0.5208 + }, + "_skyIllumLDR": 0.5208, + "_groundAlbedoLDR": { + "__type__": "cc.Vec4", + "x": 0.519544, + "y": 0.630484, + "z": 0.905069, + "w": 0 + } + }, + { + "__type__": "cc.ShadowsInfo", + "_enabled": false, + "_type": 0, + "_normal": { + "__type__": "cc.Vec3", + "x": 0, + "y": 1, + "z": 0 + }, + "_distance": 0, + "_planeBias": 1, + "_shadowColor": { + "__type__": "cc.Color", + "r": 76, + "g": 76, + "b": 76, + "a": 255 + }, + "_maxReceived": 4, + "_size": { + "__type__": "cc.Vec2", + "x": 512, + "y": 512 + } + }, + { + "__type__": "cc.SkyboxInfo", + "_envLightingType": 0, + "_envmapHDR": null, + "_envmap": null, + "_envmapLDR": null, + "_diffuseMapHDR": null, + "_diffuseMapLDR": null, + "_enabled": false, + "_useHDR": false, + "_editableMaterial": null, + "_reflectionHDR": null, + "_reflectionLDR": null, + "_rotationAngle": 0 + }, + { + "__type__": "cc.FogInfo", + "_type": 0, + "_fogColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_enabled": false, + "_fogDensity": 0.3, + "_fogStart": 0.5, + "_fogEnd": 300, + "_fogAtten": 5, + "_fogTop": 1.5, + "_fogRange": 1.2, + "_accurate": false + }, + { + "__type__": "cc.OctreeInfo", + "_enabled": false, + "_minPos": { + "__type__": "cc.Vec3", + "x": -1024, + "y": -1024, + "z": -1024 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 1024, + "y": 1024, + "z": 1024 + }, + "_depth": 8 + }, + { + "__type__": "cc.SkinInfo", + "_enabled": true, + "_blurRadius": 0.01, + "_sssIntensity": 3 + }, + { + "__type__": "cc.LightProbeInfo", + "_giScale": 1, + "_giSamples": 1024, + "_bounces": 2, + "_reduceRinging": 0, + "_showProbe": true, + "_showWireframe": true, + "_showConvex": false, + "_data": null, + "_lightProbeSphereVolume": 1 + }, + { + "__type__": "cc.PostSettingsInfo", + "_toneMappingType": 0 + } +] \ No newline at end of file diff --git a/assets/scene/MainGame.scene.meta b/assets/scene/MainGame.scene.meta new file mode 100644 index 0000000..9b81354 --- /dev/null +++ b/assets/scene/MainGame.scene.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.1.50", + "importer": "scene", + "imported": true, + "uuid": "0401497c-b8be-4d0f-a5dd-55ed73f46146", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script.meta b/assets/script.meta new file mode 100644 index 0000000..082219d --- /dev/null +++ b/assets/script.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "bf2d81e3-8bc8-4e82-9ec5-d0cdf57a27d4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/assets/script/QuickTween.meta b/assets/script/QuickTween.meta new file mode 100644 index 0000000..40b6473 --- /dev/null +++ b/assets/script/QuickTween.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "33cb078c-e75a-4d19-86e6-9b12cd55b22e", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/QuickTween/QuickTween.ts b/assets/script/QuickTween/QuickTween.ts new file mode 100644 index 0000000..36d9a2b --- /dev/null +++ b/assets/script/QuickTween/QuickTween.ts @@ -0,0 +1,408 @@ + +import { Component, Node, Vec3, tween, Quat, Sprite, Color, math, easing, Camera, ITweenOption, IPunchTweenOption, IShakeTweenOption, Label } from 'cc'; +import { calcPunchData, calcShakeData, quadraticCurve } from './Util'; + +////////////////////// +// Transform +////////////////////// +Node.prototype.qtPosition = function (to: Vec3, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { position: to }, opts); +} + +Node.prototype.qtPositionX = function (to: number, duration: number, opts?: ITweenOption) { + const startPos = this.position; + return tween(this).to(duration, { position: new Vec3(to, startPos.y, startPos.z) }, opts); +} + +Node.prototype.qtPositionY = function (to: number, duration: number, opts?: ITweenOption) { + const startPos = this.position; + return tween(this).to(duration, { position: new Vec3(startPos.x, to, startPos.z) }, opts); +} + +Node.prototype.qtPositionZ = function (to: number, duration: number, opts?: ITweenOption) { + const startPos = this.position; + return tween(this).to(duration, { position: new Vec3(startPos.x, startPos.y, to) }, opts); +} + +Node.prototype.qtWorldPosition = function (to: Vec3, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { worldPosition: to }, opts); +} + +Node.prototype.qtWorldPositionX = function (to: number, duration: number, opts?: ITweenOption) { + const startPos = this.worldPosition; + return tween(this).to(duration, { worldPosition: new Vec3(to, startPos.y, startPos.z) }, opts); +} + +Node.prototype.qtWorldPositionY = function (to: number, duration: number, opts?: ITweenOption) { + const startPos = this.worldPosition; + return tween(this).to(duration, { worldPosition: new Vec3(startPos.x, to, startPos.z) }, opts); +} + +Node.prototype.qtWorldPositionZ = function (to: number, duration: number, opts?: ITweenOption) { + const startPos = this.worldPosition; + return tween(this).to(duration, { worldPosition: new Vec3(startPos.x, startPos.y, to) }, opts); +} + +Node.prototype.qtRotation = function (to: Vec3, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { eulerAngles: to }, opts); +} + +Node.prototype.qtRotationQuat = function (to: Quat, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { rotation: to }, opts); +} + +Node.prototype.qtScale = function (to: Vec3 | number, duration: number, opts?: ITweenOption) { + let toScale = to; + if (!(to instanceof Vec3)) { + toScale = new Vec3(to, to, to); + } + + return tween(this).to(duration, { scale: toScale }, opts); +} + +Node.prototype.qtScaleX = function (to: number, duration: number, opts?: ITweenOption) { + const startScale = this.scale; + return tween(this).to(duration, { scale: new Vec3(to, startScale.y, startScale.z) }, opts); +} + +Node.prototype.qtScaleY = function (to: number, duration: number, opts?: ITweenOption) { + const startScale = this.scale; + return tween(this).to(duration, { scale: new Vec3(startScale.x, to, startScale.z) }, opts); +} + +Node.prototype.qtScaleZ = function (to: number, duration: number, opts?: ITweenOption) { + const startScale = this.scale; + return tween(this).to(duration, { scale: new Vec3(startScale.x, startScale.y, to) }, opts); +} + +Node.prototype.qtPunchPosition = function (punch: Vec3, duration: number, opts?: IPunchTweenOption) { + const vibrato = opts?.vibrato ?? 3; + const elasticity = opts?.elasticity ?? 0.5; + const { tos, durations } = calcPunchData(this.position.clone(), punch, duration, vibrato, elasticity); + + const punchTween = tween(this); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: opts.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: opts.onComplete + } + } + punchTween.then(tween().to(d, { position: to }, tweenOpts)); + }); + + return punchTween.union(); +} + +Node.prototype.qtPunchRotation = function (punch: Vec3, duration: number, opts?: IPunchTweenOption) { + const vibrato = opts?.vibrato ?? 3; + const elasticity = opts?.elasticity ?? 0.5; + const { tos, durations } = calcPunchData(this.rotation.clone(), punch, duration, vibrato, elasticity); + + const punchTween = tween(this); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: opts.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: opts.onComplete + } + } + punchTween.then(tween().to(d, { eulerAngles: to }, tweenOpts)); + }); + + return punchTween.union(); +} + +Node.prototype.qtPunchScale = function (punch: Vec3, duration: number, opts?: IPunchTweenOption) { + const vibrato = opts?.vibrato ?? 3; + const elasticity = opts?.elasticity ?? 0.5; + const { tos, durations } = calcPunchData(this.scale.clone(), punch, duration, vibrato, elasticity); + + const punchTween = tween(this); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: opts.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: opts.onComplete + } + } + punchTween.then(tween().to(d, { scale: to }, tweenOpts)); + }); + + return punchTween.union(); +} + +Node.prototype.qtJumpPosition = function (to: Vec3, jumpHeight: number, jumpNum: number, duration: number, opts?: ITweenOption) { + const tweenPos = new Vec3(); + const jumpTween = tween(this); + const totalNum = jumpNum * 2; + + // 初始化选项对象,确保即使没有传入选项也不会出错 + const options = opts || {}; + + this.jumpY = 0; + let startPosY = 0; + const yUpTween = tween().to(duration / totalNum, { jumpY: jumpHeight }, { + onStart: (target: Node) => { + startPosY = target.position.y; + target.jumpY = 0; + }, + onUpdate: (target: Node, ratio) => { + tweenPos.set(target.position); + tweenPos.y = startPosY + target.jumpY; + target.position = tweenPos; + }, + onComplete: (target: Node) => { + target.jumpY = 0; + }, easing: 'quadOut' + }).to(duration / totalNum, { jumpY: jumpHeight }, { + onStart: (target: Node) => { + startPosY = target.position.y; + }, + onUpdate: (target: Node, ratio) => { + tweenPos.set(target.position); + tweenPos.y = startPosY - target.jumpY; + target.position = tweenPos; + }, + onComplete: (target: Node) => { + target.jumpY = 0; + }, easing: 'quadIn', + }).union().repeat(jumpNum); + + this.jumpOffsetY = 0; + let offsetY = 0; + const offsetYTween = tween().to(duration, { jumpOffsetY: to.y - this.position.y }, { + onStart: (target: Node) => { + offsetY = to.y - target.position.y; + target.jumpOffsetY = 0; + }, + onUpdate: (target: Node, ratio) => { + const interpOffsetY = easing.quadOut(ratio) * offsetY; + tweenPos.set(target.position); + tweenPos.y += interpOffsetY; + target.position = tweenPos; + }, + onComplete: (target: Node) => { + target.jumpOffsetY = 0; + }, easing: 'quadOut' + }); + + this.jumpX = this.position.x; + this.jumpZ = this.position.z; + const xzTween = tween().to(duration, { jumpX: to.x, jumpZ: to.z }, { + // 使用可选链运算符或者默认值 + onStart: options.onStart, + onUpdate: (target: Node, ratio) => { + tweenPos.set(target.position); + tweenPos.x = target.jumpX; + tweenPos.z = target.jumpZ; + target.position = tweenPos; + options.onUpdate?.(); + }, + onComplete: (target: Node) => { + // delete target.jumpX; + // delete target.jumpY; + // delete target.jumpZ; + // delete target.jumpOffsetY; + target.jumpX = target.position.x; + target.jumpZ = target.position.z; + options.onComplete?.(); + } + }) + + jumpTween.parallel(yUpTween, offsetYTween, xzTween); + return jumpTween; +} + +Node.prototype.qtShakePosition = function (strength: Vec3 | number, duration: number, opts?: IShakeTweenOption) { + const options = opts || {}; + + const vibrato = options?.vibrato ?? 10; + const randomness = options?.randomness ?? 90; + const fadeOut = options?.fadeOut ?? true; + let toStrength: Vec3; + let vectorBased = false; + if (!(strength instanceof Vec3)) { + toStrength = new Vec3(strength, strength, strength); + } else { + toStrength = strength; + vectorBased = true; + } + const { tos, durations } = calcShakeData(this.position.clone(), duration, toStrength, vibrato, randomness, false, vectorBased, fadeOut) + const shakeTween = tween(this); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: options.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: options.onComplete + } + } + shakeTween.then(tween().to(d, { position: to }, tweenOpts)); + }); + + return shakeTween.union(); +} + +Node.prototype.qtShakeRotation = function (strength: Vec3 | number, duration: number, opts?: IShakeTweenOption) { + const vibrato = opts?.vibrato ?? 10; + const randomness = opts?.randomness ?? 90; + const fadeOut = opts?.fadeOut ?? true; + let toStrength: Vec3; + let vectorBased = false; + if (!(strength instanceof Vec3)) { + toStrength = new Vec3(strength, strength, strength); + } else { + toStrength = strength; + vectorBased = true; + } + const { tos, durations } = calcShakeData(this.eulerAngles.clone(), duration, toStrength, vibrato, randomness, false, vectorBased, fadeOut) + const shakeTween = tween(this); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: opts.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: opts.onComplete + } + } + shakeTween.then(tween().to(d, { eulerAngles: to }, tweenOpts)); + }); + + return shakeTween.union(); +} + +Node.prototype.qtShakeScale = function (strength: Vec3 | number, duration: number, opts?: IShakeTweenOption) { + const vibrato = opts?.vibrato ?? 10; + const randomness = opts?.randomness ?? 90; + const fadeOut = opts?.fadeOut ?? true; + let toStrength: Vec3; + let vectorBased = false; + if (!(strength instanceof Vec3)) { + toStrength = new Vec3(strength, strength, strength); + } else { + toStrength = strength; + vectorBased = true; + } + const { tos, durations } = calcShakeData(this.scale.clone(), duration, toStrength, vibrato, randomness, false, vectorBased, fadeOut) + const shakeTween = tween(this); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: opts.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: opts.onComplete + } + } + shakeTween.then(tween().to(d, { scale: to }, tweenOpts)); + }); + + return shakeTween.union(); +} + +Node.prototype.qtQuadraticCurve = function (p1: Vec3, cp: Vec3, p2: Vec3, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { position: p2, easing: opts?.easing }, { + onUpdate(target, ratio) { + target.setPosition(quadraticCurve(ratio, p1, cp, p2)); + }, + onComplete: opts?.onComplete, + onStart: opts?.onStart + }).union(); +} + +////////////////////// +// Sprite +////////////////////// +// good color lerp +// https://www.alanzucconi.com/2016/01/06/colour-interpolation/ +Sprite.prototype.qtColor = function (to: Color, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { color: to }, opts); +} + +Sprite.prototype.qtOpacity = function (to: number, duration: number, opts?: ITweenOption) { + const startColor = this.color.clone(); + const tempColor = new Color(); + return tween(this).to(duration, { color: new Color(startColor.r, startColor.g, startColor.b, to) }, { + onStart: opts.onStart, + onUpdate: (target: { _val: number }, ratio: number) => { + const lerpA = startColor.a + (to - startColor.a) * ratio + tempColor.set(startColor.r, startColor.g, startColor.b, lerpA); + this.color = tempColor; + opts.onUpdate?.(); + }, + onComplete: opts.onComplete + }); +} + +////////////////////// +// Label +////////////////////// +Label.prototype.qtColor = function (to: Color, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { color: to }, opts); +} + +Label.prototype.qtString = function (to: string, duration: number, opts?: ITweenOption) { + return tween(this).to(duration, { string: to }, opts); +} + +////////////////////// +// Camera +////////////////////// +Camera.prototype.qtShakePosition = function (strength: Vec3 | number, duration: number, opts?: IShakeTweenOption) { + const vibrato = opts?.vibrato ?? 10; + const randomness = opts?.randomness ?? 90; + const fadeOut = opts?.fadeOut ?? true; + let toStrength: Vec3; + let vectorBased = false; + if (!(strength instanceof Vec3)) { + toStrength = new Vec3(strength, strength, strength); + } else { + toStrength = strength; + vectorBased = true; + } + const { tos, durations } = calcShakeData(this.node.position.clone(), duration, toStrength, vibrato, randomness, true, vectorBased, fadeOut) + const shakeTween = tween(this.node); + tos.forEach((to, index) => { + const d = durations[index]; + let tweenOpts: ITweenOption | undefined; + if (index === 0) { + tweenOpts = { + onStart: opts.onStart + } + } else if (index === tos.length - 1) { + tweenOpts = { + onComplete: opts.onComplete + } + } + shakeTween.then(tween().to(d, { position: to }, tweenOpts)); + }); + + return shakeTween.union(); +} \ No newline at end of file diff --git a/assets/script/QuickTween/QuickTween.ts.meta b/assets/script/QuickTween/QuickTween.ts.meta new file mode 100644 index 0000000..5cbb7fe --- /dev/null +++ b/assets/script/QuickTween/QuickTween.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "7068ad06-e307-495f-befa-d9239208e9f1", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/QuickTween/Util.ts b/assets/script/QuickTween/Util.ts new file mode 100644 index 0000000..99ec36a --- /dev/null +++ b/assets/script/QuickTween/Util.ts @@ -0,0 +1,160 @@ +import { KeyCode, math, Quat, Vec3 } from "cc"; + +export function clampLength(vec: Vec3, maxLength: number) { + if (vec.lengthSqr() > maxLength * maxLength) { + const clampVec = new Vec3(); + Vec3.normalize(clampVec, vec); + clampVec.multiplyScalar(maxLength); + return clampVec; + } + + return vec; +} + +export function vec3FromAngle(degree: number, length: number) { + const radian = math.toRadian(degree); + return new Vec3(length * Math.cos(radian), length * Math.sin(radian), 0); +} + +export function calcPunchData(start: Vec3, direction: Vec3, duration: number, vibrato: number, elasticity: number) { + math.clamp01(elasticity); + let strength = direction.length(); + let toIterations = Math.round(vibrato * duration); + if (toIterations < 2) { + toIterations = 2; + } + + const deltaStrength = strength / toIterations; + + let durations = []; + let sum = 0; + for (let i = 0; i < toIterations; i++) { + const iterationPercent = (i + 1) / toIterations; + const deltaDuration = duration * iterationPercent; + sum += deltaDuration; + durations[i] = deltaDuration; + } + + const durationMultiplier = duration / sum; + durations = durations.map((d) => d * durationMultiplier); + + // create to vec3 array + const tos: Vec3[] = []; + for (let i = 0; i < toIterations; i++) { + if (i < toIterations - 1) { + if (i === 0) { + tos[i] = Vec3.add(new Vec3(), start, direction); + } else if (i % 2 !== 0) { + const deltaVec = clampLength(direction, strength * elasticity); + deltaVec.negative(); + tos[i] = deltaVec.add(start); + } else { + const deltaVec = clampLength(direction, strength); + tos[i] = deltaVec.add(start); + } + } else { + tos[i] = start; + } + + strength -= deltaStrength; + } + + return { + tos, + durations + } +} + +export function calcShakeData(start: Vec3, duration: number, strength: Vec3, vibrato: number, randomness: number, ignoreZAxis: boolean, vectorBased: boolean, + fadeOut: boolean) { + KeyCode + let shakeLength = vectorBased ? strength.length() : strength.x; + let toIterations = Math.floor(vibrato * duration); + if (toIterations < 2) { + toIterations = 2; + } + const deltaShakeLen = shakeLength / toIterations; + let durations = []; + let sum = 0; + for (let i = 0; i < toIterations; i++) { + const iterationPercent = (i + 1) / toIterations; + const deltaDuration = fadeOut ? duration * iterationPercent : duration / toIterations; + sum += deltaDuration; + durations[i] = deltaDuration; + } + + const durationMultiplier = duration / sum; + durations = durations.map((d) => d * durationMultiplier); + + let angle = math.randomRange(0, 360); + const tos: Vec3[] = []; + + for (let i = 0; i < toIterations; i++) { + if (i < toIterations - 1) { + let randQuat = new Quat(); + if (i > 0) { + angle = angle - 180 + math.randomRange(-randomness, randomness); + } + // switch(randomnessMode) { + // case ShakeRandomnessMode.Harmonic: + // if (i > 0) { + // angle = angle - 180 + math.randomRange(0, randomness); + // } + // if (vectorBased || !ignoreZAxis) { + // Quat.fromAxisAngle(randQuat, Vec3.UP, math.randomRange(0, randomness)); + // } + // break; + // default: + // if (i > 0) { + // angle = angle - 180 + math.randomRange(-randomness, randomness); + // } + // if (vectorBased || !ignoreZAxis) { + // Quat.fromAxisAngle(randQuat, Vec3.UP, math.randomRange(-randomness, randomness)); + // } + // break; + // } + + if (vectorBased) { + let to = vec3FromAngle(angle, shakeLength); + Vec3.transformQuat(to, to, randQuat); + to.x = clampLength(to, strength.x).x; + to.y = clampLength(to, strength.y).y; + to.z = clampLength(to, strength.z).z; + to.normalize().multiplyScalar(shakeLength); + tos[i] = to.add(start); + if (fadeOut) { + shakeLength -= deltaShakeLen; + } + strength = clampLength(strength, shakeLength); + } else { + if (ignoreZAxis) { + tos[i] = vec3FromAngle(angle, shakeLength).add(start); + } else { + Quat.fromAxisAngle(randQuat, Vec3.UP, math.randomRange(-randomness, randomness)); + let to = vec3FromAngle(angle, shakeLength); + Vec3.transformQuat(to, to, randQuat); + tos[i] = to.add(start); + } + + if (fadeOut) { + shakeLength -= deltaShakeLen; + } + } + } else { + tos[i] = start; + } + } + + return { + tos, + durations + } +} + +export function quadraticCurve(t: number, p1: Vec3, cp: Vec3, p2: Vec3) { + let out = new Vec3(0, 0, 0); + out.x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x; + out.y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y; + out.z = (1 - t) * (1 - t) * p1.z + 2 * t * (1 - t) * cp.z + t * t * p2.z; + return out; +} \ No newline at end of file diff --git a/assets/script/QuickTween/Util.ts.meta b/assets/script/QuickTween/Util.ts.meta new file mode 100644 index 0000000..094f8b5 --- /dev/null +++ b/assets/script/QuickTween/Util.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "9d1ed435-17ef-4b92-9fd9-391c112c8f2a", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/QuickTween/quick-tween.d.ts b/assets/script/QuickTween/quick-tween.d.ts new file mode 100644 index 0000000..31913d0 --- /dev/null +++ b/assets/script/QuickTween/quick-tween.d.ts @@ -0,0 +1,310 @@ +declare module 'cc' { + + interface IPunchTweenOption extends ITweenOption { + // How much the punch will vibrate + vibrato?: number, + // Represents how much (0 to 1) the vector will go beyond the starting position + // when bouncing backwards. 1 creates a full oscillation between the punch direction and the + // opposite direction, while 0 oscillates only between the punch and the start scale. + elasticity?: number + } + + interface IShakeTweenOption extends ITweenOption { + vibrato?: number //每秒振动次数 + randomness?: number // 随机角度值 + fadeOut?: boolean // 是否淡出 + } + + interface Node { + /** + * @zh + * 移动目标的坐标到指定位置 + * @en + * Moves the target's position to the given value + * @param to dest position + * @param duration time in seconds + * @param {ITweenOption} opts options for tween + * @param {Function} opts.onStart start callback + */ + qtPosition(to: Vec3, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的坐标到指定位置, 只移动X坐标 + * @en + * Moves the target's position to the given value, tweening only the X axis. + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtPositionX(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的坐标到指定位置, 只移动Y坐标 + * @en + * Moves the target's position to the given value, tweening only the Y axis. + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtPositionY(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的坐标到指定位置, 只移动Z坐标 + * @en + * Moves the target's position to the given value, tweening only the Z axis. + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtPositionZ(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的世界坐标到指定位置 + * @en + * Moves the target's worldPosition to the given value + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtWorldPosition(to: Vec3, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的世界坐标到指定位置, 只移动X坐标 + * @en + * Moves the target's worldPosition to the given value, tweening only the X axis. + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtWorldPositionX(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的世界坐标到指定位置, 只移动Y坐标 + * @en + * Moves the target's worldPosition to the given value, tweening only the Y axis. + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtWorldPositionY(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 移动目标的世界坐标到指定位置, 只移动Z坐标 + * @en + * Moves the target's worldPosition to the given value, tweening only the Z axis. + * @param to dest position + * @param duration time in seconds + * @param opts options for tween + */ + qtWorldPositionZ(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 旋转目标到指定值 + * @en + * Rotates the target to ghe given value + * @param to dest rotation in eulerAngle + * @param duration time in seconds + * @param opts options for tween + */ + qtRotation(to: Vec3, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 旋转目标到指定值 + * @en + * Rotates the target to ghe given value + * @param to dest rotation in quaternion + * @param duration time in seconds + * @param opts options for tween + */ + qtRotationQuat(to: Quat, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 缩放目标到指定值 + * @en + * Scales the target to ghe given value + * @param to dest scale value + * @param duration time in seconds + * @param opts options for tween + */ + qtScale(to: Vec3 | number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 缩放目标到指定值,只影响X轴 + * @en + * Scales the target to ghe given value, tweening only X axis + * @param to dest scale value + * @param duration time in seconds + * @param opts options for tween + */ + qtScaleX(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 缩放目标到指定值,只影响Y轴 + * @en + * Scales the target to ghe given value, tweening only Y axis + * @param to dest scale value + * @param duration time in seconds + * @param opts options for tween + */ + qtScaleY(to: number, duration: number, opts?: ITweenOption): Tween; + /** + * @zh + * 缩放目标到指定值,只影响Z轴 + * @en + * Scales the target to ghe given value, tweening only Z axis + * @param to dest scale value + * @param duration time in seconds + * @param opts options for tween + */ + qtScaleZ(to: number, duration: number, opts?: ITweenOption): Tween; + + /** + * @zh + * 击打目标位置到指定方向,然后回到初始值 + * @en + * Punches a position towards the given direction and then + * back to the starting one as if it was connected to the starting position + * via an elastic. + * @param punch The direction and strength of the punch, (added to the node's current position) + * @param duration Time in seconds + * @param {IPunchTweenOption} opts punch tween options + * @param {number} opts.vibrato How much the punch will vibrate + * @param {number} opts.elasticity Represents how much (0 to 1) the vector will go beyond the starting position + * when bouncing backwards. 1 creates a full oscillation between the punch direction and the + * opposite direction, while 0 oscillates only between the punch and the start position. + */ + qtPunchPosition(punch: Vec3, duration: number, opts?: IPunchTweenOption): Tween; + + /** + * @zh + * 击打目标旋转方向到指定值,然后回到初始值 + * @en + * Punches a rotation to the given value and then back to the starting one as if it was connected + * to the starting rotation via an elastic. + * @param punch The strength of punch, (added to the node's current rotation) + * @param duration Time in seconds + * @param {IPunchTweenOption} opts punch tween options + * @param {number} opts.vibrato How much the punch will vibrate + * @param {number} opts.elasticity Represents how much (0 to 1) the vector will go beyond the starting position + * when bouncing backwards. 1 creates a full oscillation between the punch direction and the + * opposite direction, while 0 oscillates only between the punch and the start rotation. + */ + qtPunchRotation(punch: Vec3, duration: number, opts?: IPunchTweenOption): Tween; + + /** + * @zh + * 击打目标缩放到指定值,然后回到初始值 + * @en + * Punches a scale to the given value and then back to the starting one as if it was connected + * to the starting scale via an elastic. + * @param punch The strength of punch, (added to the node's current scale) + * @param duration Time in seconds + * @param {IPunchTweenOption} opts punch tween options + * @param {number} opts.vibrato How much the punch will vibrate + * @param {number} opts.elasticity Represents how much (0 to 1) the vector will go beyond the starting position + * when bouncing backwards. 1 creates a full oscillation between the punch direction and the + * opposite direction, while 0 oscillates only between the punch and the start scale. + */ + qtPunchScale(punch: Vec3, duration: number, opts?: IPunchTweenOption): Tween; + + jumpX?: number; + jumpY?: number; + jumpZ?: number; + jumpOffsetY?: number; + /** + * @zh + * 缓动目标的坐标到指定值,在移动过程中同时附加一个Y坐标的高度值来模拟跳跃动作 + * @en + * Tweens the target's position to the given value, while also applying a jump effect along the Y axis. + * @param to 目标坐标值 + * @param jumpHeight 跳跃高度 + * @param jumpNum 跳跃次数 + * @param duration 时间 + * @param opts tween options + */ + qtJumpPosition(to: Vec3, jumpHeight: number, jumpNum: number, duration: number, opts?: ITweenOption): Tween; + + /** + * @zh + * 使目标的位置在设定的参数下抖动 + * @en + * Shakes the target's position with the given values + * @param strength 强度 + * @param duration 时间 + * @param {IShakeTweenOption} opts shake tween options + * @param {number} opts.vibrato 每秒振动次数 + * @param {number} opts.randomness 随机角度值 + * @param {boolean} opts.fadeOut 是否淡出 + */ + qtShakePosition(strength: Vec3 | number, duration: number, opts?: IShakeTweenOption): Tween; + + /** + * @zh + * 使目标的旋转在设定的参数下抖动 + * @en + * Shakes the target's rotation with the given values + * @param strength 强度 + * @param duration 时间 + * @param {IShakeTweenOption} opts shake tween options + * @param {number} opts.vibrato 每秒振动次数 + * @param {number} opts.randomness 随机角度值 + * @param {boolean} opts.fadeOut 是否淡出 + */ + qtShakeRotation(strength: Vec3 | number, duration: number, opts?: IShakeTweenOption): Tween; + + /** + * @zh + * 使目标的缩放在设定的参数下抖动 + * @en + * Shakes the target's scale with the given values + * @param strength 强度 + * @param duration 时间 + * @param {IShakeTweenOption} opts shake tween options + * @param {number} opts.vibrato 每秒振动次数 + * @param {number} opts.randomness 随机角度值 + * @param {boolean} opts.fadeOut 是否淡出 + */ + qtShakeScale(strength: Vec3 | number, duration: number, opts?: IShakeTweenOption): Tween; + + /** + * @zh + * 缓动目标的坐标到指定值,使用二次贝塞尔曲线 + * @en + * Tweens the target's position to the given value, using a quadratic Bezier curve. + * @param p1 起点 + * @param cp 控制点 + * @param p2 终点 + * @param duration 时间 + * @param opts tween options + */ + qtQuadraticCurve(p1: Vec3, cp: Vec3, p2: Vec3, duration: number, opts?: ITweenOption): Tween; + } + + interface Sprite { + qtColor(to: Color, duration: number, opts?: ITweenOption): Tween; + qtOpacity(to: number, duration: number, opts?: ITweenOption): Tween; + } + + interface Label extends Omit { + //@ts-expect-error + spriteFrame: SpriteFrame | null; + qtColor(to: Color, duration: number, opts?: ITweenOption): Tween