commit e9c9afb3b9618f4f62e12657c0bc47a7f73849b4 Author: zzc <1761997216@qq.com> Date: Thu Jan 1 08:45:37 1970 +0800 first commit 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/.gitignore b/.gitignore new file mode 100644 index 0000000..a231b3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ + +#/////////////////////////// +# Cocos Creator 3D Project +#/////////////////////////// +library/ +temp/ +local/ +build/ +profiles/ +native +#////////////////////////// +# NPM +#////////////////////////// +node_modules/ + +#////////////////////////// +# VSCode +#////////////////////////// +.vscode/ + +#////////////////////////// +# WebStorm +#////////////////////////// +.idea/ \ No newline at end of file diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..fcba46b Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/resources.meta b/assets/resources.meta new file mode 100644 index 0000000..3c275fd --- /dev/null +++ b/assets/resources.meta @@ -0,0 +1,14 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "b5b90e41-dfc6-4ee6-8975-64853447f305", + "files": [], + "subMetas": {}, + "userData": { + "isBundle": true, + "bundleConfigID": "default", + "bundleName": "resources", + "priority": 8 + } +} diff --git a/assets/resources/.DS_Store b/assets/resources/.DS_Store new file mode 100644 index 0000000..677e50a Binary files /dev/null and b/assets/resources/.DS_Store differ diff --git a/assets/resources/ball.png b/assets/resources/ball.png new file mode 100644 index 0000000..2c69cf6 Binary files /dev/null and b/assets/resources/ball.png differ diff --git a/assets/resources/ball.png.meta b/assets/resources/ball.png.meta new file mode 100644 index 0000000..b032164 --- /dev/null +++ b/assets/resources/ball.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.27", + "importer": "image", + "imported": true, + "uuid": "cbabcdf5-bcc6-409d-85d2-52375ac79698", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "cbabcdf5-bcc6-409d-85d2-52375ac79698@6c48a", + "displayName": "ball", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "cbabcdf5-bcc6-409d-85d2-52375ac79698", + "visible": false + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "cbabcdf5-bcc6-409d-85d2-52375ac79698@f9941", + "displayName": "ball", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 16, + "height": 16, + "rawWidth": 16, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -8, + -8, + 0, + 8, + -8, + 0, + -8, + 8, + 0, + 8, + 8, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 16, + 16, + 16, + 0, + 0, + 16, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -8, + -8, + 0 + ], + "maxPos": [ + 8, + 8, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "cbabcdf5-bcc6-409d-85d2-52375ac79698@6c48a", + "atlasUuid": "", + "trimType": "auto" + }, + "ver": "1.0.12", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "hasAlpha": true, + "fixAlphaTransparencyArtifacts": false, + "redirect": "cbabcdf5-bcc6-409d-85d2-52375ac79698@6c48a" + } +} diff --git a/assets/resources/football.fbx b/assets/resources/football.fbx new file mode 100644 index 0000000..39c887c Binary files /dev/null and b/assets/resources/football.fbx differ diff --git a/assets/resources/football.fbx.meta b/assets/resources/football.fbx.meta new file mode 100644 index 0000000..c41174a --- /dev/null +++ b/assets/resources/football.fbx.meta @@ -0,0 +1,113 @@ +{ + "ver": "2.3.13", + "importer": "fbx", + "imported": true, + "uuid": "08b00b93-6f70-457d-a520-a2aa23678481", + "files": [], + "subMetas": { + "e94cd": { + "importer": "gltf-mesh", + "uuid": "08b00b93-6f70-457d-a520-a2aa23678481@e94cd", + "displayName": "", + "id": "e94cd", + "name": "Икосфера.mesh", + "userData": { + "gltfIndex": 0, + "triangleCount": 4800 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "b31f4": { + "importer": "gltf-material", + "uuid": "08b00b93-6f70-457d-a520-a2aa23678481@b31f4", + "displayName": "", + "id": "b31f4", + "name": "white.material", + "userData": { + "gltfIndex": 0 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "515b9": { + "importer": "gltf-material", + "uuid": "08b00b93-6f70-457d-a520-a2aa23678481@515b9", + "displayName": "", + "id": "515b9", + "name": "black.material", + "userData": { + "gltfIndex": 1 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "564dd": { + "importer": "gltf-scene", + "uuid": "08b00b93-6f70-457d-a520-a2aa23678481@564dd", + "displayName": "", + "id": "564dd", + "name": "football.prefab", + "userData": { + "gltfIndex": 0 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "imageMetas": [], + "fbx": { + "smartMaterialEnabled": true + }, + "lods": { + "enable": false, + "hasBuiltinLOD": false, + "options": [ + { + "screenRatio": 0.25, + "faceCount": 1 + }, + { + "screenRatio": 0.125, + "faceCount": 0.25 + }, + { + "screenRatio": 0.01, + "faceCount": 0.1 + } + ] + }, + "assetFinder": { + "meshes": [ + "08b00b93-6f70-457d-a520-a2aa23678481@e94cd" + ], + "skeletons": [], + "textures": [], + "materials": [ + "08b00b93-6f70-457d-a520-a2aa23678481@b31f4", + "08b00b93-6f70-457d-a520-a2aa23678481@515b9" + ], + "scenes": [ + "08b00b93-6f70-457d-a520-a2aa23678481@564dd" + ] + } + } +} diff --git a/assets/resources/football_field.fbx b/assets/resources/football_field.fbx new file mode 100644 index 0000000..c4ceb47 Binary files /dev/null and b/assets/resources/football_field.fbx differ diff --git a/assets/resources/football_field.fbx.meta b/assets/resources/football_field.fbx.meta new file mode 100644 index 0000000..2bb5827 --- /dev/null +++ b/assets/resources/football_field.fbx.meta @@ -0,0 +1,214 @@ +{ + "ver": "2.3.13", + "importer": "fbx", + "imported": true, + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43", + "files": [], + "subMetas": { + "2f6d1": { + "importer": "gltf-mesh", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@2f6d1", + "displayName": "", + "id": "2f6d1", + "name": "Cube.mesh", + "userData": { + "gltfIndex": 0, + "triangleCount": 28 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "81eaa": { + "importer": "gltf-embeded-image", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@81eaa", + "displayName": "", + "id": "81eaa", + "name": "tex_football_field.image", + "userData": { + "gltfIndex": 0, + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": false, + "type": "texture" + }, + "ver": "1.0.3", + "imported": true, + "files": [ + ".json", + ".png" + ], + "subMetas": {} + }, + "5ba76": { + "importer": "texture", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@5ba76", + "displayName": "", + "id": "5ba76", + "name": "tex_football_field.texture", + "userData": { + "wrapModeS": "repeat", + "wrapModeT": "repeat", + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0, + "isUuid": true, + "imageUuidOrDatabaseUri": "f80f846a-f4fa-4901-b733-79c6212deb43@81eaa" + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "3373f": { + "importer": "gltf-material", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@3373f", + "displayName": "", + "id": "3373f", + "name": "base_football_field.material", + "userData": { + "gltfIndex": 0 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "9cf53": { + "importer": "gltf-material", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@9cf53", + "displayName": "", + "id": "9cf53", + "name": "football_field.material", + "userData": { + "gltfIndex": 1 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "6a01c": { + "importer": "gltf-material", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@6a01c", + "displayName": "", + "id": "6a01c", + "name": "grass_dark_football_field.material", + "userData": { + "gltfIndex": 2 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "683d0": { + "importer": "gltf-material", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@683d0", + "displayName": "", + "id": "683d0", + "name": "ground_dark_football_field.material", + "userData": { + "gltfIndex": 3 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "66bc7": { + "importer": "gltf-material", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@66bc7", + "displayName": "", + "id": "66bc7", + "name": "ground_light_football_field.material", + "userData": { + "gltfIndex": 4 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "4e238": { + "importer": "gltf-scene", + "uuid": "f80f846a-f4fa-4901-b733-79c6212deb43@4e238", + "displayName": "", + "id": "4e238", + "name": "football_field.prefab", + "userData": { + "gltfIndex": 0 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "imageMetas": [ + { + "name": "tex_football_field", + "uri": "f80f846a-f4fa-4901-b733-79c6212deb43@81eaa" + } + ], + "fbx": { + "smartMaterialEnabled": true + }, + "lods": { + "enable": false, + "hasBuiltinLOD": false, + "options": [ + { + "screenRatio": 0.25, + "faceCount": 1 + }, + { + "screenRatio": 0.125, + "faceCount": 0.25 + }, + { + "screenRatio": 0.01, + "faceCount": 0.1 + } + ] + }, + "assetFinder": { + "meshes": [ + "f80f846a-f4fa-4901-b733-79c6212deb43@2f6d1" + ], + "skeletons": [], + "textures": [ + "f80f846a-f4fa-4901-b733-79c6212deb43@5ba76" + ], + "materials": [ + "f80f846a-f4fa-4901-b733-79c6212deb43@3373f", + "f80f846a-f4fa-4901-b733-79c6212deb43@9cf53", + "f80f846a-f4fa-4901-b733-79c6212deb43@6a01c", + "f80f846a-f4fa-4901-b733-79c6212deb43@683d0", + "f80f846a-f4fa-4901-b733-79c6212deb43@66bc7" + ], + "scenes": [ + "f80f846a-f4fa-4901-b733-79c6212deb43@4e238" + ] + } + } +} diff --git a/assets/resources/goal_new4.fbx b/assets/resources/goal_new4.fbx new file mode 100644 index 0000000..f0ad52e Binary files /dev/null and b/assets/resources/goal_new4.fbx differ diff --git a/assets/resources/goal_new4.fbx.meta b/assets/resources/goal_new4.fbx.meta new file mode 100644 index 0000000..7ccf913 --- /dev/null +++ b/assets/resources/goal_new4.fbx.meta @@ -0,0 +1,263 @@ +{ + "ver": "2.3.13", + "importer": "fbx", + "imported": true, + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326", + "files": [], + "subMetas": { + "29428": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@29428", + "displayName": "", + "id": "29428", + "name": "Plane.012.mesh", + "userData": { + "gltfIndex": 7, + "triangleCount": 3704 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "59394": { + "importer": "gltf-material", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@59394", + "displayName": "", + "id": "59394", + "name": "Material.007.material", + "userData": { + "gltfIndex": 2 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "99380": { + "importer": "gltf-material", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@99380", + "displayName": "", + "id": "99380", + "name": "Material.001.material", + "userData": { + "gltfIndex": 1 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "bbd92": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@bbd92", + "displayName": "", + "id": "bbd92", + "name": "Cylinder.004.mesh", + "userData": { + "gltfIndex": 0, + "triangleCount": 124 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "10dfa": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@10dfa", + "displayName": "", + "id": "10dfa", + "name": "Cylinder.005.mesh", + "userData": { + "gltfIndex": 1, + "triangleCount": 124 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "10a81": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@10a81", + "displayName": "", + "id": "10a81", + "name": "Cylinder.006.mesh", + "userData": { + "gltfIndex": 2, + "triangleCount": 124 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "5cf41": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@5cf41", + "displayName": "", + "id": "5cf41", + "name": "Plane.008.mesh", + "userData": { + "gltfIndex": 3, + "triangleCount": 3704 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "c5c89": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@c5c89", + "displayName": "", + "id": "c5c89", + "name": "Plane.009.mesh", + "userData": { + "gltfIndex": 4, + "triangleCount": 3704 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "57ecb": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@57ecb", + "displayName": "", + "id": "57ecb", + "name": "Plane.010.mesh", + "userData": { + "gltfIndex": 5, + "triangleCount": 16 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "38a9f": { + "importer": "gltf-mesh", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@38a9f", + "displayName": "", + "id": "38a9f", + "name": "Plane.011.mesh", + "userData": { + "gltfIndex": 6, + "triangleCount": 3704 + }, + "ver": "1.1.1", + "imported": true, + "files": [ + ".bin", + ".json" + ], + "subMetas": {} + }, + "551ec": { + "importer": "gltf-material", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@551ec", + "displayName": "", + "id": "551ec", + "name": "Material.005.material", + "userData": { + "gltfIndex": 0 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "364f4": { + "importer": "gltf-scene", + "uuid": "299a2b65-c675-485f-860f-fa566ac3f326@364f4", + "displayName": "", + "id": "364f4", + "name": "goal_new4.prefab", + "userData": { + "gltfIndex": 0 + }, + "ver": "1.0.14", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "imageMetas": [], + "fbx": { + "smartMaterialEnabled": true + }, + "lods": { + "enable": false, + "hasBuiltinLOD": false, + "options": [ + { + "screenRatio": 0.25, + "faceCount": 1 + }, + { + "screenRatio": 0.125, + "faceCount": 0.25 + }, + { + "screenRatio": 0.01, + "faceCount": 0.1 + } + ] + }, + "assetFinder": { + "meshes": [ + "299a2b65-c675-485f-860f-fa566ac3f326@bbd92", + "299a2b65-c675-485f-860f-fa566ac3f326@10dfa", + "299a2b65-c675-485f-860f-fa566ac3f326@10a81", + "299a2b65-c675-485f-860f-fa566ac3f326@5cf41", + "299a2b65-c675-485f-860f-fa566ac3f326@c5c89", + "299a2b65-c675-485f-860f-fa566ac3f326@57ecb", + "299a2b65-c675-485f-860f-fa566ac3f326@38a9f", + "299a2b65-c675-485f-860f-fa566ac3f326@29428" + ], + "skeletons": [], + "textures": [], + "materials": [ + "299a2b65-c675-485f-860f-fa566ac3f326@551ec", + "299a2b65-c675-485f-860f-fa566ac3f326@99380", + "299a2b65-c675-485f-860f-fa566ac3f326@59394" + ], + "scenes": [ + "299a2b65-c675-485f-860f-fa566ac3f326@364f4" + ] + } + } +} diff --git a/assets/resources/ui.meta b/assets/resources/ui.meta new file mode 100644 index 0000000..d762333 --- /dev/null +++ b/assets/resources/ui.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "5fc9d063-3798-4978-a773-81fbb8a5cdfe", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/ui/.DS_Store b/assets/resources/ui/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/assets/resources/ui/.DS_Store differ diff --git a/assets/resources/ui/Preview.prefab b/assets/resources/ui/Preview.prefab new file mode 100644 index 0000000..d582746 --- /dev/null +++ b/assets/resources/ui/Preview.prefab @@ -0,0 +1,239 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Preview", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "Preview", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Sprite", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68wE+uAUxFYLDEuk6lHNR3" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "57520716-48c8-4a19-8acf-41c9f8777fb0@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": "e19APLNrlB/JU0ZdmOMkxq" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c96ZwVsKFA7Lwh0J8Ej3p5", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "47igSZnfpM0ZlyosMVKC5z" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c46/YsCPVOJYA4mWEpNYRx", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/ui/Preview.prefab.meta b/assets/resources/ui/Preview.prefab.meta new file mode 100644 index 0000000..ca5d754 --- /dev/null +++ b/assets/resources/ui/Preview.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "a4fc77e4-d765-48e6-b999-1b6afcb194cc", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Preview" + } +} diff --git a/assets/resources/ui/ball.prefab b/assets/resources/ui/ball.prefab new file mode 100644 index 0000000..3a00b5b --- /dev/null +++ b/assets/resources/ui/ball.prefab @@ -0,0 +1,114 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "ball", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "ball", + "_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__": "cc.SpriteRenderer", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_materials": [ + { + "__uuid__": "ade8a15a-dcca-4b3c-84c6-f6476ac875bb", + "__expectedType__": "cc.Material" + } + ], + "_visFlags": 0, + "_spriteFrame": { + "__uuid__": "cbabcdf5-bcc6-409d-85d2-52375ac79698@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_mode": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_flipX": false, + "_flipY": false, + "_size": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "eeQKP+GsNNhqfOqxoFdU6u" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bdqBOP1c1DX7hkNID5uzfW", + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/ui/ball.prefab.meta b/assets/resources/ui/ball.prefab.meta new file mode 100644 index 0000000..c720def --- /dev/null +++ b/assets/resources/ui/ball.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "facfb653-dd5b-448a-8240-ac3d1cf41068", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "ball" + } +} diff --git a/assets/resources/ui/vibration.prefab b/assets/resources/ui/vibration.prefab new file mode 100644 index 0000000..fbe9a4b --- /dev/null +++ b/assets/resources/ui/vibration.prefab @@ -0,0 +1,114 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "vibration", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "vibration", + "_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__": "cc.SpriteRenderer", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_materials": [ + { + "__uuid__": "ade8a15a-dcca-4b3c-84c6-f6476ac875bb", + "__expectedType__": "cc.Material" + } + ], + "_visFlags": 0, + "_spriteFrame": { + "__uuid__": "8ede48ee-13ca-4dcb-aeb5-fd66d88dc691@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_mode": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_flipX": false, + "_flipY": false, + "_size": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c3gkb1lSNHOZhW4xgAMR2c" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "28NxmbJepDw6NSNbHjBimN", + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/ui/vibration.prefab.meta b/assets/resources/ui/vibration.prefab.meta new file mode 100644 index 0000000..0c9fca2 --- /dev/null +++ b/assets/resources/ui/vibration.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "491ef077-7d08-452e-8f00-040b69aebe45", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "vibration" + } +} diff --git a/assets/scene.meta b/assets/scene.meta new file mode 100644 index 0000000..292a9a4 --- /dev/null +++ b/assets/scene.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "f4a2d32c-901d-44c2-a505-01844eb57404", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scene/game.scene b/assets/scene/game.scene new file mode 100644 index 0000000..cb380f4 --- /dev/null +++ b/assets/scene/game.scene @@ -0,0 +1,2702 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "game", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_name": "game", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 7 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 125 + }, + "_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__": 128 + }, + "_id": "4e8dc402-8873-4978-9793-a1b2e7b8b766" + }, + { + "__type__": "cc.Node", + "_name": "Main Light", + "_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.06397656665577071, + "y": -0.44608233363525845, + "z": -0.8239028751062036, + "w": -0.3436591377065261 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": -117.894, + "y": -194.909, + "z": 38.562 + }, + "_id": "c0y6F5f+pAvI805TdmxIjx" + }, + { + "__type__": "cc.DirectionalLight", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 250, + "b": 240, + "a": 255 + }, + "_useColorTemperature": false, + "_colorTemperature": 6550, + "_staticSettings": { + "__id__": 4 + }, + "_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": "597uMYCbhEtJQc0ffJlcgA" + }, + { + "__type__": "cc.StaticLightSettings", + "_baked": false, + "_editorOnly": false, + "_castShadow": false + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0.024, + "y": 2.897, + "z": 6.001 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0.009551961022502867, + "y": 0.9798920657190034, + "z": 0.19929005393983917, + "w": 0.0019426739882918735 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": -22.992, + "y": 180, + "z": 1.117 + }, + "_id": "c9DMICJLFO5IeO07EPon7U" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_projection": 1, + "_priority": 0, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 10, + "_near": 1, + "_far": 1000, + "_color": { + "__type__": "cc.Color", + "r": 51, + "g": 51, + "b": 51, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 14, + "_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": "7dWQTpwS5LrIHnc1zAPUtf" + }, + { + "__type__": "cc.Node", + "_name": "Game", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 8 + }, + { + "__id__": 33 + }, + { + "__id__": 53 + }, + { + "__id__": 40 + }, + { + "__id__": 56 + }, + { + "__id__": 59 + }, + { + "__id__": 110 + } + ], + "_active": true, + "_components": [ + { + "__id__": 123 + }, + { + "__id__": 124 + } + ], + "_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": "4bOd8Xue1LIpuZQoUvmchr" + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 7 + }, + "_prefab": { + "__id__": 9 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 8 + }, + "asset": { + "__uuid__": "f80f846a-f4fa-4901-b733-79c6212deb43@4e238", + "__expectedType__": "cc.Prefab" + }, + "fileId": "38QkU2IGhUTaPaTv903h6Z", + "instance": { + "__id__": 10 + }, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "6744pOjvBCCK44T8u131NU", + "prefabRootNode": null, + "mountedChildren": [], + "mountedComponents": [ + { + "__id__": 11 + } + ], + "propertyOverrides": [ + { + "__id__": 15 + }, + { + "__id__": 17 + }, + { + "__id__": 19 + }, + { + "__id__": 21 + }, + { + "__id__": 23 + }, + { + "__id__": 25 + }, + { + "__id__": 27 + }, + { + "__id__": 29 + }, + { + "__id__": 31 + } + ], + "removedComponents": [] + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 12 + }, + "components": [ + { + "__id__": 13 + }, + { + "__id__": 14 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 8 + } + }, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "88HK/F71hDNaZprIBWE6y9" + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 8 + } + }, + "node": { + "__id__": 8 + }, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 8.643, + "y": 1.11, + "z": 12.077 + }, + "_id": "f2ZcwIDsZBmJFTZPlLVGmx" + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 16 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 18 + }, + "propertyPath": [ + "_name" + ], + "value": "football_field" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 20 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0.005977717087112807, + "w": 0.9999821332896035 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 22 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0.685 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 24 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 2.178, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "9c9a0IbVdS96xZ7cJfoHik" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 26 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59Sq/neidR/aIRFbgCaCK3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 28 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 30 + }, + "propertyPath": [ + "_lscale" + ], + "value": { + "__type__": "cc.Vec3", + "x": 2.678, + "y": 1, + "z": 3.014 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "38QkU2IGhUTaPaTv903h6Z" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 32 + }, + "propertyPath": [ + "_materials", + "0" + ], + "value": { + "__uuid__": "f80f846a-f4fa-4901-b733-79c6212deb43@3373f", + "__expectedType__": "cc.Material" + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "78+oNBafdcP6Hje0Y1bpBb" + ] + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 7 + }, + "_prefab": { + "__id__": 34 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 33 + }, + "asset": { + "__uuid__": "08b00b93-6f70-457d-a520-a2aa23678481@564dd", + "__expectedType__": "cc.Prefab" + }, + "fileId": "b2x688TuJQKKsjL+YdA+Gw", + "instance": { + "__id__": 35 + }, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "4eZ2MoHDJAOKhHQ1b2/vSp", + "prefabRootNode": null, + "mountedChildren": [], + "mountedComponents": [ + { + "__id__": 36 + } + ], + "propertyOverrides": [ + { + "__id__": 43 + }, + { + "__id__": 45 + }, + { + "__id__": 47 + }, + { + "__id__": 49 + }, + { + "__id__": 51 + }, + { + "__id__": 52 + } + ], + "removedComponents": [] + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 37 + }, + "components": [ + { + "__id__": 38 + }, + { + "__id__": 39 + }, + { + "__id__": 41 + }, + { + "__id__": 42 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "b2x688TuJQKKsjL+YdA+Gw" + ] + }, + { + "__type__": "cc.SphereCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 33 + } + }, + "node": { + "__id__": 33 + }, + "_enabled": false, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0.095, + "z": 0 + }, + "_radius": 0.093, + "_id": "0605pE6/RGNar12y64eHxQ" + }, + { + "__type__": "3aeceOCxu1JcYKgz0BQc2j3", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 33 + } + }, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": null, + "magnusK": 0.05, + "dragK": 0.002, + "windStrength": 0, + "windDir": { + "__type__": "cc.Vec3", + "x": 1, + "y": 0, + "z": 0 + }, + "resetY": -2, + "spawnPoint": { + "__id__": 40 + }, + "ball": { + "__id__": 33 + }, + "_id": "3cUETFwAVAlaqbYE6ui6VD" + }, + { + "__type__": "cc.Node", + "_name": "spawnPoint", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -0.042, + "y": 0.097, + "z": 3.743 + }, + "_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": "ba1HK+lVtBXo2npxYshACH" + }, + { + "__type__": "cc.MeshCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 33 + } + }, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_mesh": { + "__uuid__": "08b00b93-6f70-457d-a520-a2aa23678481@e94cd", + "__expectedType__": "cc.Mesh" + }, + "_convex": false, + "_id": "b9Jh9ACapFypqCg48ZGC6c" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 33 + } + }, + "node": { + "__id__": 33 + }, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 1, + "_mass": 1, + "_allowSleep": false, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "bdixj+AQROIYJU2FJYSonp" + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 44 + }, + "propertyPath": [ + "_name" + ], + "value": "football" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "b2x688TuJQKKsjL+YdA+Gw" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 46 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0.028, + "y": 0.597, + "z": 8.764 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "b2x688TuJQKKsjL+YdA+Gw" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 48 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "b2x688TuJQKKsjL+YdA+Gw" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 50 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "b2x688TuJQKKsjL+YdA+Gw" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 50 + }, + "propertyPath": [ + "_mobility" + ], + "value": 0 + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 50 + }, + "propertyPath": [ + "_lscale" + ], + "value": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + } + }, + { + "__type__": "cc.Node", + "_name": "TrajectoryPreview", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + }, + { + "__id__": 55 + } + ], + "_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": "7fVUys6PtLg6utUZNjf3QM" + }, + { + "__type__": "4210fpeTUNL771Ix5SdzPB0", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 53 + }, + "_enabled": false, + "__prefab": null, + "pointPrefab": { + "__uuid__": "facfb653-dd5b-448a-8240-ac3d1cf41068", + "__expectedType__": "cc.Prefab" + }, + "maxPoints": 20, + "timeStep": 0.1, + "gravity": -9.8, + "_id": "0cMYiTPT9OH4e4PBZpuP45" + }, + { + "__type__": "27452TPVnhJipSGEiqwdxsE", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 53 + }, + "_enabled": true, + "__prefab": null, + "pointPrefab": { + "__uuid__": "facfb653-dd5b-448a-8240-ac3d1cf41068", + "__expectedType__": "cc.Prefab" + }, + "goal": null, + "maxPoints": 30, + "timeStep": 0.05, + "ballPhys": { + "__id__": 39 + }, + "_id": "6eV8934NxDcomc8TxQqYeu" + }, + { + "__type__": "cc.Node", + "_name": "InputHandler", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 57 + }, + { + "__id__": 58 + } + ], + "_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": "a0mgK29mZFPb0+T2hpbEUm" + }, + { + "__type__": "4e90fXtO5VNHZC3O5612MEw", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 56 + }, + "_enabled": true, + "__prefab": null, + "ball": { + "__id__": 33 + }, + "maxSpeed": 20, + "minPitchDeg": 8, + "maxPitchDeg": 18, + "spinFactor": 20, + "preview": { + "__id__": 55 + }, + "_id": "39/iA48oVF47ZFvLYzHarW" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 56 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "01Bcql3XZF3ZUllGz3KHhd" + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 7 + }, + "_prefab": { + "__id__": 60 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 59 + }, + "asset": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@364f4", + "__expectedType__": "cc.Prefab" + }, + "fileId": "fauggyiUtYuL5EQfZqatUs", + "instance": { + "__id__": 61 + }, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "edNEtuubBNEIQOn4w/Rcd2", + "prefabRootNode": null, + "mountedChildren": [], + "mountedComponents": [ + { + "__id__": 62 + }, + { + "__id__": 65 + }, + { + "__id__": 69 + }, + { + "__id__": 72 + }, + { + "__id__": 76 + } + ], + "propertyOverrides": [ + { + "__id__": 80 + }, + { + "__id__": 82 + }, + { + "__id__": 83 + }, + { + "__id__": 84 + }, + { + "__id__": 85 + }, + { + "__id__": 87 + }, + { + "__id__": 89 + }, + { + "__id__": 90 + }, + { + "__id__": 92 + }, + { + "__id__": 94 + }, + { + "__id__": 96 + }, + { + "__id__": 98 + }, + { + "__id__": 100 + }, + { + "__id__": 101 + }, + { + "__id__": 102 + }, + { + "__id__": 103 + }, + { + "__id__": 105 + }, + { + "__id__": 107 + }, + { + "__id__": 109 + } + ], + "removedComponents": [] + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 63 + }, + "components": [ + { + "__id__": 64 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "d05Qi0ygNc+5fy8EHDLSk+" + ] + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1.936, + "z": 1 + }, + "_id": "52bqug2yJEGIzxVAkfMoGG" + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 66 + }, + "components": [ + { + "__id__": 67 + }, + { + "__id__": 68 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "c4hxSBlkZVuYRsU0Zkgo2s" + ] + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": -0.6 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 1.997, + "y": 4.574, + "z": 3.157 + }, + "_id": "2cLB1PRzFF855Mxa+yH75E" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "60eGCYQjJMzY55acWDCnr2" + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 70 + }, + "components": [ + { + "__id__": 71 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "deyZzM+RJfcqyrNfOhDdmY" + ] + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": -0.3, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 1.974, + "y": 1, + "z": 1.852 + }, + "_id": "05V0x/6X5F14LGl/RZYR/c" + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 73 + }, + "components": [ + { + "__id__": 74 + }, + { + "__id__": 75 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "83FoLFUZhZwLSykhjgb/yD" + ] + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0.3, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 2.003, + "y": 1, + "z": 1.892 + }, + "_id": "05DAoaUG1Dmr1RPC8DTMYo" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "53FOUtfh9Karft9raCNDq8" + }, + { + "__type__": "cc.MountedComponentsInfo", + "targetInfo": { + "__id__": 77 + }, + "components": [ + { + "__id__": 78 + }, + { + "__id__": 79 + } + ] + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "48mCS8gAdTVol0H+sU+sty" + ] + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 1.971, + "y": 1.603, + "z": 1.851 + }, + "_id": "410aRA6l5PVo7pgzb4ebAO" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": { + "mountedRoot": { + "__id__": 59 + } + }, + "node": null, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "e924z1ywhJIJyBNZ1k0Hhn" + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 81 + }, + "propertyPath": [ + "_name" + ], + "value": "goal_new4" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "fauggyiUtYuL5EQfZqatUs" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 81 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -0.196, + "y": 0.484, + "z": 17.466 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 81 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": -1, + "z": 0, + "w": 6.123233995736766e-17 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 81 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": -180, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 86 + }, + "propertyPath": [ + "_mesh" + ], + "value": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@bbd92", + "__expectedType__": "cc.Mesh" + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "5c8r8lUpVYCJseDzibv1Ol" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 88 + }, + "propertyPath": [ + "_materials", + "0" + ], + "value": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@551ec", + "__expectedType__": "cc.Material" + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "242FghpuZWTIj7lq1+7rhB" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 86 + }, + "propertyPath": [ + "_materials", + "0" + ], + "value": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@551ec", + "__expectedType__": "cc.Material" + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 91 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -0.2716171145439148, + "y": 2.006625175476074, + "z": 0.9410511255264282 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "c4hxSBlkZVuYRsU0Zkgo2s" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 93 + }, + "propertyPath": [ + "_materials", + "0" + ], + "value": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@99380", + "__expectedType__": "cc.Material" + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "8eDnh1GcNXOJUj5nAG3+2l" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 95 + }, + "propertyPath": [ + "_materials", + "0" + ], + "value": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@99380", + "__expectedType__": "cc.Material" + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "39qGtAI8RbVb/r1z6g31nW" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 97 + }, + "propertyPath": [ + "_materials", + "0" + ], + "value": { + "__uuid__": "299a2b65-c675-485f-860f-fa566ac3f326@99380", + "__expectedType__": "cc.Material" + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "07wxrmhNZcvqspnJhWw0EW" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 99 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 6.123234458028065e-17, + "y": 6.123234458028065e-17, + "z": -0.9999999999999971, + "w": -7.549790126404314e-8 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "48mCS8gAdTVol0H+sU+sty" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 99 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 180, + "y": 180, + "z": 0.000008651422209050159 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 81 + }, + "propertyPath": [ + "_lscale" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 0.442, + "z": 0.6 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 81 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 104 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -4.836994171142578, + "y": 1.9649147987365723, + "z": 1.8468440771102905 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "deyZzM+RJfcqyrNfOhDdmY" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 106 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 4.3702826499938965, + "y": 1.9649147987365723, + "z": 1.8468440771102905 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "6fqSWEgIRY9IDgbf6RoFzT" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 108 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 4.281408786773682, + "y": 1.9649147987365723, + "z": 1.8468440771102905 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "83FoLFUZhZwLSykhjgb/yD" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 99 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -0.252, + "y": 3.643, + "z": 1.847 + } + }, + { + "__type__": "cc.Node", + "_name": "Wall", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 7 + }, + "_children": [ + { + "__id__": 111 + }, + { + "__id__": 114 + }, + { + "__id__": 117 + }, + { + "__id__": 120 + } + ], + "_active": false, + "_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": "1fQU6rhzZHAYBWuI2zruh7" + }, + { + "__type__": "cc.Node", + "_name": "top", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 110 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 112 + }, + { + "__id__": 113 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0.043, + "y": 4.131, + "z": -5.868 + }, + "_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": "7e9gCLOUVF6Jxy3kDlT+nL" + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 111 + }, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 8.141, + "y": 7.711, + "z": 0.108 + }, + "_id": "c7ZjcBcdpOxLXoLryEOT9h" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 111 + }, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "06orwZ2z9GG7rqL/PuTNhs" + }, + { + "__type__": "cc.Node", + "_name": "left", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 110 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 115 + }, + { + "__id__": 116 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -4.294, + "y": 3.317, + "z": 0.085 + }, + "_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": "4fO6lqzOZFtZI6XJAK7417" + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 114 + }, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 0.383, + "y": 6.819, + "z": 12.317 + }, + "_id": "f5niB1VTBCFpqtNkgiDpL+" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 114 + }, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "cc3Uj9jEhJD4Vuq4/08Ipp" + }, + { + "__type__": "cc.Node", + "_name": "bottom", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 110 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 118 + }, + { + "__id__": 119 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0.043, + "y": 4.005, + "z": 5.834 + }, + "_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": "5aAlLfS6BOxYXuDlvrBtzB" + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 117 + }, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 8.141, + "y": 7.285, + "z": 0.108 + }, + "_id": "11riWfGa9B0bEv/YzPloOm" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 117 + }, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "07IXlBRJ1I75ToOu1TWb1T" + }, + { + "__type__": "cc.Node", + "_name": "right", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 110 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 121 + }, + { + "__id__": 122 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 3.715, + "y": 3.317, + "z": 0.085 + }, + "_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": "05Dm/t/1hPvZpl0ulecLJe" + }, + { + "__type__": "cc.BoxCollider", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 120 + }, + "_enabled": true, + "__prefab": null, + "_material": null, + "_isTrigger": false, + "_center": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_size": { + "__type__": "cc.Vec3", + "x": 0.383, + "y": 6.819, + "z": 12.317 + }, + "_id": "7bf69f3DpK87uLG4FlVTDb" + }, + { + "__type__": "cc.RigidBody", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 120 + }, + "_enabled": true, + "__prefab": null, + "_group": 1, + "_type": 2, + "_mass": 1, + "_allowSleep": true, + "_linearDamping": 0.1, + "_angularDamping": 0.1, + "_useGravity": true, + "_linearFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_angularFactor": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_id": "5fqUs36qhPLrSpaztNg49P" + }, + { + "__type__": "cb6a4GETBhAX44Y8NWClRfN", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": false, + "__prefab": null, + "rigidBody": null, + "trajectory": { + "__id__": 54 + }, + "maxPower": 25, + "_id": "8c+mEEJlpH6YKBJKLNKBmr" + }, + { + "__type__": "81883gXnx1NKIEJ9ioNwjKF", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 7 + }, + "_enabled": true, + "__prefab": null, + "ball": { + "__id__": 33 + }, + "_id": "74MTghcQNIzI+6Npf3heKc" + }, + { + "__type__": "cc.PrefabInfo", + "root": null, + "asset": null, + "fileId": "d44d2cda-5afd-4fb6-b898-0fba09a6dde5", + "instance": null, + "targetOverrides": [ + { + "__id__": 126 + } + ], + "nestedPrefabInstanceRoots": [ + { + "__id__": 8 + }, + { + "__id__": 33 + }, + { + "__id__": 59 + } + ] + }, + { + "__type__": "cc.TargetOverrideInfo", + "source": { + "__id__": 57 + }, + "sourceInfo": null, + "propertyPath": [ + "goal" + ], + "target": null, + "targetInfo": { + "__id__": 127 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "3eZr844thatqaDArVkVAds" + ] + }, + { + "__type__": "cc.SceneGlobals", + "ambient": { + "__id__": 129 + }, + "shadows": { + "__id__": 130 + }, + "_skybox": { + "__id__": 131 + }, + "fog": { + "__id__": 132 + }, + "octree": { + "__id__": 133 + }, + "skin": { + "__id__": 134 + }, + "lightProbeInfo": { + "__id__": 135 + }, + "postSettings": { + "__id__": 136 + }, + "bakedWithStationaryMainLight": false, + "bakedWithHighpLightmap": false + }, + { + "__type__": "cc.AmbientInfo", + "_skyColorHDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.5, + "z": 0.8, + "w": 0.520833125 + }, + "_skyColor": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.5, + "z": 0.8, + "w": 0.520833125 + }, + "_skyIllumHDR": 20000, + "_skyIllum": 20000, + "_groundAlbedoHDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.2, + "z": 0.2, + "w": 1 + }, + "_groundAlbedo": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.2, + "z": 0.2, + "w": 1 + }, + "_skyColorLDR": { + "__type__": "cc.Vec4", + "x": 0.452588, + "y": 0.607642, + "z": 0.755699, + "w": 0 + }, + "_skyIllumLDR": 0.8, + "_groundAlbedoLDR": { + "__type__": "cc.Vec4", + "x": 0.618555, + "y": 0.577848, + "z": 0.544564, + "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": 1024, + "y": 1024 + } + }, + { + "__type__": "cc.SkyboxInfo", + "_envLightingType": 0, + "_envmapHDR": { + "__uuid__": "d032ac98-05e1-4090-88bb-eb640dcb5fc1@b47c0", + "__expectedType__": "cc.TextureCube" + }, + "_envmap": { + "__uuid__": "d032ac98-05e1-4090-88bb-eb640dcb5fc1@b47c0", + "__expectedType__": "cc.TextureCube" + }, + "_envmapLDR": { + "__uuid__": "6f01cf7f-81bf-4a7e-bd5d-0afc19696480@b47c0", + "__expectedType__": "cc.TextureCube" + }, + "_diffuseMapHDR": null, + "_diffuseMapLDR": null, + "_enabled": true, + "_useHDR": true, + "_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/game.scene.meta b/assets/scene/game.scene.meta new file mode 100644 index 0000000..db6d8fd --- /dev/null +++ b/assets/scene/game.scene.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.1.50", + "importer": "scene", + "imported": true, + "uuid": "4e8dc402-8873-4978-9793-a1b2e7b8b766", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts.meta b/assets/scripts.meta new file mode 100644 index 0000000..2408d87 --- /dev/null +++ b/assets/scripts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "d86bbf2e-0f81-47b2-a0ac-8d514c49e8d7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/BallPhysics.ts b/assets/scripts/BallPhysics.ts new file mode 100644 index 0000000..710704e --- /dev/null +++ b/assets/scripts/BallPhysics.ts @@ -0,0 +1,133 @@ +// assets/scripts/BallPhysics.ts +import { + _decorator, + Component, + Node, + RigidBody, + Vec3, + math, + SphereCollider, + Contact2DType, + MeshCollider, + ICollisionEvent, + ITriggerEvent, +} from "cc"; +const { ccclass, property } = _decorator; + +@ccclass("BallPhysics") +export class BallPhysics extends Component { + @property({ tooltip: "马格努斯系数(越大弧线越明显)" }) magnusK = 0.1; + @property({ tooltip: "空气阻力" }) dragK = 0.001; + @property({ tooltip: "风力(m/s^2)" }) windStrength = 0; + @property({ tooltip: "风向" }) windDir: Vec3 = new Vec3(1, 0, 0); + + @property({ tooltip: "自动重置高度阈值(低于视为无效球)" }) resetY = -2; + @property(Node) spawnPoint!: Node; + + @property(Node) ball!: Node; + + private rb!: RigidBody; + private tmpF = new Vec3(); + private v = new Vec3(); + private w = new Vec3(); + private wind = new Vec3(); + private pos = new Vec3(); + + // ⚽ 保存 spin(KickInput 设置进来) + private spin = new Vec3(); + + onLoad() { + this.rb = this.ball.getComponent(RigidBody)!; + const col = this.ball.getComponent(MeshCollider); + if (col) { + console.log(22223333, col); + col.on("onTriggerEnter", this.onTriggerEnter, this); + col.on("onTriggerStay", this.onTriggerStay, this); + col.on("onCollisionEnter", this.onCollisionEnter, this); + } + this.wind.set(this.windDir).normalize(); + } + + private onTriggerStay(event: ITriggerEvent) { + console.log(event.type, event); + } + + onTriggerEnter(event: ICollisionEvent) { + console.log("⚽ 触发器进入:", event.otherCollider.node.name); + } + + onCollisionEnter(event: ICollisionEvent) { + console.log("⚽ 碰撞进入:", event.otherCollider.node.name); + } + + init() { + this.rb = this.node.getComponent(RigidBody)!; + this.wind.set(this.windDir).normalize(); + this.pos = this.node.worldPosition.clone(); + } + + setWind(direction: Vec3, strength: number) { + this.wind.set(direction).normalize(); + this.windStrength = strength; + } + + resetBall() { + if (!this.spawnPoint) return; + this.rb.clearState(); + this.node.worldPosition = this.pos; //this.spawnPoint.worldPosition.clone(); + this.rb.setLinearVelocity(new Vec3()); + this.rb.setAngularVelocity(new Vec3()); + } + + /** 设置自旋(由 KickInput 调用) */ + public setSpin(spin: Vec3) { + this.spin.set(spin); + } + + /** 发射足球 */ + shootBall(dir: Vec3, speed: number) { + this.rb.clearState(); + this.rb.setLinearVelocity(dir.clone().multiplyScalar(speed)); + this.rb.setAngularVelocity(this.spin); // 应用横向旋转 + } + + update(dt: number) { + if (!this.rb) return; + + this.rb.getLinearVelocity(this.v); + + // 1. 空气阻力(与预测保持一致: -k * v * |v|) + const speed = this.v.length(); + if (speed > 0.01) { + const drag = this.v.clone().multiplyScalar(-this.dragK * speed); + this.rb.applyForce(drag); + } + + // 2. 马格努斯力: F = k * (spin × v) + if (!this.spin.equals(Vec3.ZERO) && speed > 0.01) { + const magnus = new Vec3(); + Vec3.cross(magnus, this.spin, this.v); + magnus.multiplyScalar(this.magnusK); + this.rb.applyForce(magnus); + } + + // if (!this.spin.equals(Vec3.ZERO) && speed > 0.01) { + // const magnus = new Vec3(); + // const vNorm = this.v.clone().normalize(); + // Vec3.cross(magnus, this.spin, vNorm); + // magnus.multiplyScalar(this.magnusK * Math.sqrt(speed)); + // this.rb.applyForce(magnus); + // } + + // 3. 风 + if (this.windStrength > 0.0001) { + this.tmpF.set(this.wind).multiplyScalar(this.windStrength); + this.rb.applyForce(this.tmpF); + } + + // 4. 掉出场地自动重置 + if (this.node.worldPosition.y < this.resetY && this.spawnPoint) { + this.resetBall(); + } + } +} diff --git a/assets/scripts/BallPhysics.ts.meta b/assets/scripts/BallPhysics.ts.meta new file mode 100644 index 0000000..80a9455 --- /dev/null +++ b/assets/scripts/BallPhysics.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "3aece382-c6ed-4971-82a0-cf40507368f7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/CameraRig.ts b/assets/scripts/CameraRig.ts new file mode 100644 index 0000000..5575a47 --- /dev/null +++ b/assets/scripts/CameraRig.ts @@ -0,0 +1,32 @@ +// assets/scripts/CameraRig.ts +import { _decorator, Component, Node, Vec3, math } from "cc"; +const { ccclass, property } = _decorator; + +@ccclass("CameraRig") +export class CameraRig extends Component { + @property(Node) ball!: Node; + @property({ tooltip: "跟随平滑(0~1,越小越平滑)" }) smooth = 0.1; + @property(Vec3) offset = new Vec3(0, 2.5, -5); + + private _mode: "static" | "follow" = "static"; + + setModeFollow() { + this._mode = "follow"; + } + setModeStatic() { + this._mode = "static"; + } + + lateUpdate(dt: number) { + if (this._mode !== "follow" || !this.ball) return; + const target = this.ball.worldPosition.clone().add(this.offset); + const p = this.node.worldPosition.clone(); + const lerp = new Vec3( + math.lerp(p.x, target.x, 1 - this.smooth), + math.lerp(p.y, target.y, 1 - this.smooth), + math.lerp(p.z, target.z, 1 - this.smooth) + ); + this.node.setWorldPosition(lerp); + this.node.lookAt(this.ball.worldPosition); + } +} diff --git a/assets/scripts/CameraRig.ts.meta b/assets/scripts/CameraRig.ts.meta new file mode 100644 index 0000000..2f7a829 --- /dev/null +++ b/assets/scripts/CameraRig.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "ffb4877f-b15c-46cd-b252-dedbe7540235", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/GameManager.ts b/assets/scripts/GameManager.ts new file mode 100644 index 0000000..add748e --- /dev/null +++ b/assets/scripts/GameManager.ts @@ -0,0 +1,58 @@ +// assets/scripts/GameManager.ts +import { _decorator, Component, Node, Label, Vec3 } from "cc"; +import { BallPhysics } from "./BallPhysics"; +// import { CameraRig } from "./CameraRig"; +const { ccclass, property } = _decorator; + +@ccclass("GameManager") +export class GameManager extends Component { + @property(Node) ball!: Node; + // @property(Node) cameraRig!: Node; + // @property(Label) scoreLabel!: Label; + // @property(Label) windLabel!: Label; + + private score = 0; + private ballPhys!: BallPhysics; + // private cam!: CameraRig; + + onLoad() { + this.ballPhys = this.ball.getComponent(BallPhysics)!; + this.ballPhys.init(); + // this.cam = this.cameraRig.getComponent(CameraRig)!; + + // 监听进球 + this.node.on("GOAL", this.onGoal, this); + + this.newRound(); + } + + onGoal() { + this.score += 1; + this.updateScore(); + this.scheduleOnce(() => { + this.newRound(); + }, 1.0); + } + + private updateScore() { + // if (this.scoreLabel) this.scoreLabel.string = `${this.score}`; + } + + private newRound() { + // 重置球与镜头 + this.ballPhys.resetBall(); + // this.cam.setModeStatic(); + + // 随机风 + // const dir = new Vec3(Math.random() - 0.5, 0, Math.random() - 0.5); + // const strength = 4 * Math.random(); // 0~4 + // this.ballPhys.setWind(dir, strength); + // if (this.windLabel) { + // const a = (Math.atan2(dir.x, dir.z) * 180) / Math.PI; // 粗略角度显示 + // this.windLabel.string = `Wind ${strength.toFixed(1)} @ ${a.toFixed(0)}°`; + // } + + // 几百毫秒后把镜头切为跟随(等玩家射门后也可在 KickInput 里触发) + // this.scheduleOnce(() => this.cam.setModeFollow(), 0.6); + } +} diff --git a/assets/scripts/GameManager.ts.meta b/assets/scripts/GameManager.ts.meta new file mode 100644 index 0000000..a5e58d5 --- /dev/null +++ b/assets/scripts/GameManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "81883817-9f1d-4d28-8109-f62a0dc23285", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/GameMrg.ts b/assets/scripts/GameMrg.ts new file mode 100644 index 0000000..4288d6d --- /dev/null +++ b/assets/scripts/GameMrg.ts @@ -0,0 +1,109 @@ +import { + _decorator, + Component, + Vec3, + RigidBody, + input, + Input, + EventTouch, +} from "cc"; +import { TrajectoryPreview } from "./TrajectoryPreview"; +const { ccclass, property } = _decorator; + +@ccclass("GameMrg") +export class GameMrg extends Component { + @property(RigidBody) + rigidBody: RigidBody = null!; + + @property(TrajectoryPreview) + trajectory: TrajectoryPreview = null!; + + @property + maxPower: number = 25; + + private startPos: Vec3 = new Vec3(); + private endPos: Vec3 = new Vec3(); + private isDragging: boolean = false; + + start() { + input.on(Input.EventType.TOUCH_START, this.onTouchStart, this); + input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); + input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this); + input.on(Input.EventType.TOUCH_CANCEL, this.onTouchEnd, this); + } + + onDestroy() { + input.off(Input.EventType.TOUCH_START, this.onTouchStart, this); + input.off(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); + input.off(Input.EventType.TOUCH_END, this.onTouchEnd, this); + input.off(Input.EventType.TOUCH_CANCEL, this.onTouchEnd, this); + } + + onTouchStart(e: EventTouch) { + this.startPos.set(e.getLocation().x, e.getLocation().y, 0); + this.isDragging = true; + } + + onTouchMove(e: EventTouch) { + if (!this.isDragging) return; + this.endPos.set(e.getLocation().x, e.getLocation().y, 0); + const dragVec = new Vec3( + this.startPos.x - this.endPos.x, + this.startPos.y - this.endPos.y, + 0 + ); + if (dragVec.length() < 10) { + this.trajectory.hideTrajectory(); + return; + } + + // 主方向(始终向前 + 抬升) + const forward = new Vec3(0, 0.5, 1).normalize(); + + // 力度 + const power = Math.min(dragVec.y * 0.05 + 10, this.maxPower); + + // 左右弧线 + const sideForce = dragVec.x * 0.02; + + // 显示轨迹 + this.trajectory.showTrajectory( + // this.rigidBody.node.worldPosition, + this.startPos.clone(), + forward, + power, + sideForce + ); + } + + onTouchEnd(e: EventTouch) { + if (!this.isDragging) return; + this.isDragging = false; + this.trajectory.hideTrajectory(); + + this.endPos.set(e.getLocation().x, e.getLocation().y, 0); + + const dragVec = new Vec3( + this.startPos.x - this.endPos.x, + this.startPos.y - this.endPos.y, + 0 + ); + + if (dragVec.length() < 10) return; + + // 主方向 + const forward = new Vec3(0, 0.5, 1).normalize(); + + // 力度 + const power = Math.min(dragVec.y * 0.05 + 10, this.maxPower); + + // 左右弧线 + const sideForce = dragVec.x * 0.02; + + // 发射冲量 + const impulse = forward.multiplyScalar(power); + impulse.x += sideForce; + + this.rigidBody.applyImpulse(impulse); + } +} diff --git a/assets/scripts/GameMrg.ts.meta b/assets/scripts/GameMrg.ts.meta new file mode 100644 index 0000000..f6f5d78 --- /dev/null +++ b/assets/scripts/GameMrg.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "cb6a4184-4c18-405f-8e18-f0d5829517cd", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/GoalDetector.ts b/assets/scripts/GoalDetector.ts new file mode 100644 index 0000000..1546178 --- /dev/null +++ b/assets/scripts/GoalDetector.ts @@ -0,0 +1,19 @@ +// assets/scripts/GoalDetector.ts +import { _decorator, Component, ITriggerEvent } from "cc"; +const { ccclass, property } = _decorator; + +@ccclass("GoalDetector") +export class GoalDetector extends Component { + @property({ tooltip: "GameManager 节点(接收进球事件)" }) gameManagerPath = + ""; + + onTriggerEnter(event: ITriggerEvent) { + const other = event.otherCollider?.node; + if (!other) return; + if (other.name.includes("Ball")) { + // 简单通知 + const gm = this.node.scene.getChildByPath(this.gameManagerPath); + gm?.emit("GOAL"); + } + } +} diff --git a/assets/scripts/GoalDetector.ts.meta b/assets/scripts/GoalDetector.ts.meta new file mode 100644 index 0000000..ab37281 --- /dev/null +++ b/assets/scripts/GoalDetector.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "85ff5590-99dd-47f5-8422-0702fc260fb3", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/GoalkeeperAI.ts b/assets/scripts/GoalkeeperAI.ts new file mode 100644 index 0000000..9fed01b --- /dev/null +++ b/assets/scripts/GoalkeeperAI.ts @@ -0,0 +1,45 @@ +// assets/scripts/GoalkeeperAI.ts +import { _decorator, Component, Node, RigidBody, Vec3, math } from "cc"; +const { ccclass, property } = _decorator; + +@ccclass("GoalkeeperAI") +export class GoalkeeperAI extends Component { + @property(Node) ball!: Node; + @property({ tooltip: "球门线Z(世界坐标)" }) goalLineZ = 10; + @property({ tooltip: "守门员水平活动范围X" }) rangeX = 3.5; + @property({ tooltip: "移动速度(m/s)" }) speed = 6; + @property({ tooltip: "反应延迟(秒)" }) reactDelay = 0.15; + + private targetX = 0; + private tAcc = 0; + private tmp = new Vec3(); + + update(dt: number) { + if (!this.ball) return; + + // 简化预测:用当前速度线性外推到球门线的交点 + const rb = this.ball.getComponent(RigidBody); + if (!rb) return; + rb.getLinearVelocity(this.tmp); + const v = this.tmp.clone(); + const bp = this.ball.worldPosition.clone(); + + if (Math.abs(v.z) < 0.1) return; // 几乎不朝球门方向飞 + + const timeToLine = (this.goalLineZ - bp.z) / v.z; // z 轴朝向球门 + if (timeToLine < 0) return; // 已过线或背离 + + this.tAcc += dt; + if (this.tAcc >= this.reactDelay) { + const predictX = bp.x + v.x * timeToLine; + this.targetX = math.clamp(predictX, -this.rangeX, this.rangeX); + this.tAcc = 0; // 下次再延迟 + } + + // 移动守门员 + const p = this.node.worldPosition; + const dx = this.targetX - p.x; + const step = math.clamp(dx, -this.speed * dt, this.speed * dt); + this.node.setWorldPosition(p.x + step, p.y, p.z); + } +} diff --git a/assets/scripts/GoalkeeperAI.ts.meta b/assets/scripts/GoalkeeperAI.ts.meta new file mode 100644 index 0000000..f778352 --- /dev/null +++ b/assets/scripts/GoalkeeperAI.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "30f1b3d4-4345-4002-a1ae-d9a745976704", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/KickInput.ts b/assets/scripts/KickInput.ts new file mode 100644 index 0000000..7d15018 --- /dev/null +++ b/assets/scripts/KickInput.ts @@ -0,0 +1,172 @@ +import { + _decorator, + Component, + Node, + EventTouch, + Input, + input, + Vec2, + Vec3, + RigidBody, + math, + Graphics, + MeshRenderer, + geometry, +} from "cc"; +import { TrajectoryPreview } from "./TrajectoryPreview"; +import { Preview } from "./Preview"; +import { BallPhysics } from "./BallPhysics"; +const { ccclass, property } = _decorator; + +@ccclass("KickInput") +export class KickInput extends Component { + @property(Node) ball!: Node; + // @property(Node) goal!: Node; + + @property(Node) cameraRig!: Node; + + // 力度与角度控制 + @property({ tooltip: "最大初速度(m/s)" }) maxSpeed = 20; + @property({ tooltip: "最小仰角(度)" }) minPitchDeg = 8; + @property({ tooltip: "最大仰角(度)" }) maxPitchDeg = 18; + + // 自旋与弧线 + @property({ tooltip: "自旋强度系数" }) spinFactor = 20; + + @property(Preview) preview: Preview = null!; + + private startPos = new Vec2(); + private dragging = false; + private lastPos = new Vec2(); + private trail: Vec2[] = []; + + private ballPhys: BallPhysics = null; + + protected onLoad(): void { + this.ballPhys = this.ball.getComponent(BallPhysics)!; + } + + onEnable() { + input.on(Input.EventType.TOUCH_START, this.onStart, this); + input.on(Input.EventType.TOUCH_MOVE, this.onMove, this); + input.on(Input.EventType.TOUCH_END, this.onEnd, this); + input.on(Input.EventType.TOUCH_CANCEL, this.onEnd, this); + } + onDisable() { + input.off(Input.EventType.TOUCH_START, this.onStart, this); + input.off(Input.EventType.TOUCH_MOVE, this.onMove, this); + input.off(Input.EventType.TOUCH_END, this.onEnd, this); + input.off(Input.EventType.TOUCH_CANCEL, this.onEnd, this); + } + + private onStart(e: EventTouch) { + this.dragging = true; + e.getLocation(this.startPos); + e.getLocation(this.lastPos); + this.trail.length = 0; + this.trail.push(this.startPos.clone()); + } + + private onMove(e: EventTouch) { + if (!this.dragging) return; + const p = e.getLocation(); + this.trail.push(p.clone()); + this.lastPos.set(p); + + // 1) 拖拽向量 + const drag = this.lastPos.clone().subtract(this.startPos); + const dragLen = drag.length(); + + // 2) 速度(映射拖拽长度) + const speed = math.clamp(dragLen / 8, 5, this.maxSpeed); + // const speed = 12; + + // 3) 仰角 pitch(映射拖拽的纵向) + const t = math.clamp(drag.y / 300, 0, 1); + const pitchDeg = math.lerp(this.minPitchDeg, this.maxPitchDeg, t); + + // 4) 偏航角 yaw(映射拖拽的横向) + const yawDeg = math.clamp(-drag.x / 8, -45, 45); + + // 5) 得到方向向量 + const dir = this.dirFromAngles(yawDeg, pitchDeg); + + // 6) 自旋(用轨迹估计) + const spin = this.estimateSpin(this.trail, drag).multiplyScalar( + this.spinFactor + ); + + this.preview.showTrajectory(this.ball.worldPosition, dir, speed, spin); + } + + private onEnd() { + if (!this.dragging) return; + this.dragging = false; + + this.preview.clear(); + + // 拖拽向量 + const drag = this.lastPos.clone().subtract(this.startPos); + const dragLen = drag.length(); + + if (!this.ball || !this.ballPhys) return; + + // 1) 计算初速度 + const speed = math.clamp(dragLen / 8, 5, this.maxSpeed); + // const speed = 12; + // 2) 仰角 pitch + const t = math.clamp(drag.y / 300, 0, 1); + const pitchDeg = math.lerp(this.minPitchDeg, this.maxPitchDeg, t); + + // 3) 偏航 yaw + const yawDeg = math.clamp(-drag.x / 8, -45, 45); + + // 4) 方向向量 + const dir = this.dirFromAngles(yawDeg, pitchDeg); + + // 5) 自旋 + const spin = this.estimateSpin(this.trail, drag).multiplyScalar( + this.spinFactor + ); + this.ballPhys.setSpin(spin); + console.log(`t: ${t}, pitchDeg:${pitchDeg}`); + // 6) 发射 + this.ballPhys.shootBall(dir, speed); + } + + private dirFromAngles(yawDeg: number, pitchDeg: number) { + const yaw = math.toRadian(yawDeg); + const pitch = math.toRadian(pitchDeg); + // 水平前方Z轴,右手坐标:根据你场景轴向可能需调整 + const x = Math.sin(yaw) * Math.cos(pitch); + const y = Math.sin(pitch); + const z = Math.cos(yaw) * Math.cos(pitch); + return new Vec3(x, y, z).normalize(); + } + + // 简单估计自旋方向:用拖拽路径的“弯曲方向” + private estimateSpin(path: Vec2[], drag: Vec2): Vec3 { + if (path.length < 4) return new Vec3(0, 0, 0); + // 取开始、中点、终点,计算平面曲率符号,映射为Y轴为主或Z轴自旋 + const a = path[0], + b = path[Math.floor(path.length / 2)], + c = path[path.length - 1]; + // 2D 叉积 z 分量(曲率方向) + const ab = new Vec2(b.x - a.x, b.y - a.y); + const bc = new Vec2(c.x - b.x, c.y - b.y); + const cross = ab.x * bc.y - ab.y * bc.x; // >0 逆时针弯曲 + + // 横向弯 -> 绕Y轴的自旋(产生左右弧线) + + const spinY = math.clamp(drag.x / 200, -3.5, 3.5); + return new Vec3(0, spinY, 0); // 只绕Y轴,产生左右弧度 + + // const spinY = math.clamp(cross / 20000, -1.5, 1.5) * 2.0; // 横向弧度提前 + + // // 竖向弯 -> 绕X轴/或Z轴的自旋(下坠/挑球),这里简单给点Z + // const dy = c.y - a.y; + // const spinZ = math.clamp(dy / 1500, -1.0, 1.0); + + // return new Vec3(0, spinY, spinZ); + } +} diff --git a/assets/scripts/KickInput.ts.meta b/assets/scripts/KickInput.ts.meta new file mode 100644 index 0000000..310ecfe --- /dev/null +++ b/assets/scripts/KickInput.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "4e90f5ed-3b95-4d1d-90b7-3b9eb5d8c130", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/Preview.ts b/assets/scripts/Preview.ts new file mode 100644 index 0000000..2e43fdd --- /dev/null +++ b/assets/scripts/Preview.ts @@ -0,0 +1,82 @@ +// assets/scripts/Preview.ts +import { _decorator, Component, Node, Prefab, instantiate, Vec3 } from "cc"; +import { BallPhysics } from "./BallPhysics"; +const { ccclass, property } = _decorator; + +@ccclass("Preview") +export class Preview extends Component { + @property(Prefab) pointPrefab: Prefab = null!; + @property(Node) goal: Node = null!; + + @property({ tooltip: "轨迹点数量" }) maxPoints = 30; + @property({ tooltip: "步长时间(秒)" }) timeStep = 0.05; + + @property(BallPhysics) ballPhys: BallPhysics = null!; + + private points: Node[] = []; + + clear() { + for (const p of this.points) p.destroy(); + this.points.length = 0; + } + + /** 显示预测轨迹 */ + showTrajectory(startPos: Vec3, dir: Vec3, speed: number, spin: Vec3) { + this.clear(); + if (!this.pointPrefab || !this.ballPhys) return; + + const goalZ = this.goal?.worldPosition?.z; + + // 初始状态 + let pos = startPos.clone(); + let v = dir.clone().multiplyScalar(speed); + let w = spin.clone(); // 自旋 + + // 迭代预测 + // let age = 0; + for (let i = 0; i < this.maxPoints; i++) { + // age += this.timeStep; + // 保存点 + const p = instantiate(this.pointPrefab); + p.setWorldPosition(pos); + p.setParent(this.node); + this.points.push(p); + + // === 模拟 BallPhysics.update(dt) === + // const dt = this.timeStep; + const dt = this.timeStep * 0.5; + + // 空气阻力 + const speedNow = v.length(); + if (speedNow > 0.01) { + const drag = v.clone().multiplyScalar(-this.ballPhys.dragK * speedNow); + v.add(drag.multiplyScalar(dt)); + } + + // 马格努斯效应:F = k * (ω × v) + if (w.lengthSqr() > 0.0001 && v.lengthSqr() > 0.0001) { + // const tFactor = 1.0 / (1.0 + age * 2.0); // age 是飞行时间,越久衰减越快 + // const magnus = w + // .clone() + // .cross(v) + // .multiplyScalar(this.ballPhys.magnusK * tFactor); + // v.add(magnus.multiplyScalar(dt)); + const magnus = w.clone().cross(v).multiplyScalar(this.ballPhys.magnusK); + v.add(magnus.multiplyScalar(dt)); + } + + // 重力 + v.y += -9.8 * dt; + + // 移动 + pos = pos.add(v.clone().multiplyScalar(dt)); + + if ( + (startPos.z > goalZ && pos.z <= goalZ) || + (startPos.z < goalZ && pos.z >= goalZ) + ) { + break; + } + } + } +} diff --git a/assets/scripts/Preview.ts.meta b/assets/scripts/Preview.ts.meta new file mode 100644 index 0000000..5a4a7d7 --- /dev/null +++ b/assets/scripts/Preview.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "274524cf-5678-498a-9486-122ab0771b04", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/scripts/TrajectoryPreview.ts b/assets/scripts/TrajectoryPreview.ts new file mode 100644 index 0000000..b7f8f61 --- /dev/null +++ b/assets/scripts/TrajectoryPreview.ts @@ -0,0 +1,63 @@ +import { _decorator, Component, Node, Prefab, instantiate, Vec3 } from "cc"; +const { ccclass, property } = _decorator; + +@ccclass("TrajectoryPreview") +export class TrajectoryPreview extends Component { + @property(Prefab) + pointPrefab: Prefab = null!; + + @property + maxPoints: number = 20; + + @property + timeStep: number = 0.1; + + @property + gravity: Vec3 = new Vec3(0, -9.8, 0); + + private points: Node[] = []; + + onLoad() { + for (let i = 0; i < this.maxPoints; i++) { + const p = instantiate(this.pointPrefab); + p.active = false; + this.node.addChild(p); // 确保挂在场景下的空节点 + this.points.push(p); + } + } + + showTrajectory( + startPos: Vec3, + forward: Vec3, + power: number, + sideForce: number + ) { + const velocity = forward.multiplyScalar(power); + velocity.x += sideForce; + + const ballRadius = 0.01; // ⚽ 球半径 + const groundY = 0; // 🟩 地面高度 + + for (let i = 0; i < this.maxPoints; i++) { + const t = i * this.timeStep; + + const pos = new Vec3( + startPos.x + velocity.x * t, + startPos.y + velocity.y * t + 0.5 * this.gravity.y * t * t, + startPos.z + velocity.z * t + ); + + // ⭐ 限制最低不低于地面 + if (pos.y < groundY + ballRadius * 0.5) { + pos.y = groundY + ballRadius * 0.5; + } + + this.points[i].setWorldPosition(pos); + this.points[i].active = true; + } + } + + hideTrajectory() { + this.points.forEach((p) => (p.active = false)); + } +} diff --git a/assets/scripts/TrajectoryPreview.ts.meta b/assets/scripts/TrajectoryPreview.ts.meta new file mode 100644 index 0000000..7ca8719 --- /dev/null +++ b/assets/scripts/TrajectoryPreview.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "4210fa5e-4d43-4bef-bd48-c7949dccf074", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/engine-mangle-config.json b/engine-mangle-config.json new file mode 100644 index 0000000..822434f --- /dev/null +++ b/engine-mangle-config.json @@ -0,0 +1,132 @@ +{ + "__doc_url__": "https://docs.cocos.com/creator/3.8/manual/zh/advanced-topics/mangle-properties.html", + "COMMON": { + "mangleProtected": false, + "mangleList": [ + "UITransform._sortSiblings", + "UITransform._cleanChangeMap", + "Node._findComponents", + "Node._findChildComponent", + "Node._findChildComponents", + "Node.idGenerator", + "Node._stacks", + "Node._stackId", + "Node._setScene", + "EffectAsset._layoutValid", + "EffectAsset._effects", + "ReflectionProbe.DEFAULT_CUBE_SIZE", + "ReflectionProbe.DEFAULT_PLANER_SIZE", + "WebGLDeviceManager.setInstance", + "WebGL2DeviceManager.setInstance", + "CanvasPool" + ], + "dontMangleList": [ + "Component" + ] + }, + "HTML5": { + "extends": "COMMON", + "mangleList": [], + "dontMangleList": [] + }, + "NATIVE": { + "extends": "COMMON", + "mangleList": [], + "dontMangleList": [] + }, + "MINIGAME": { + "extends": "COMMON", + "mangleList": [], + "dontMangleList": [] + }, + "WECHAT": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "BYTEDANCE": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "XIAOMI": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "ALIPAY": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "TAOBAO_MINIGAME": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "OPPO": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "VIVO": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "HUAWEI": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "MIGU": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "HONOR": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "COCOS_RUNTIME": { + "extends": "MINIGAME", + "mangleList": [], + "dontMangleList": [] + }, + "ANDROID": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + }, + "WINDOWS": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + }, + "IOS": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + }, + "MAC": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + }, + "OHOS": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + }, + "OPEN_HARMONY": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + }, + "LINUX": { + "extends": "NATIVE", + "mangleList": [], + "dontMangleList": [] + } +} diff --git a/package.json b/package.json new file mode 100755 index 0000000..da08c69 --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "ball", + "uuid": "914b0113-8a31-4950-8cf8-b48f4361d291", + "creator": { + "version": "3.8.6" + } +} diff --git a/settings/v2/packages/builder.json b/settings/v2/packages/builder.json new file mode 100644 index 0000000..7526e40 --- /dev/null +++ b/settings/v2/packages/builder.json @@ -0,0 +1,3 @@ +{ + "__version__": "1.3.9" +} diff --git a/settings/v2/packages/cocos-service.json b/settings/v2/packages/cocos-service.json new file mode 100644 index 0000000..0b9f262 --- /dev/null +++ b/settings/v2/packages/cocos-service.json @@ -0,0 +1,23 @@ +{ + "__version__": "3.0.9", + "game": { + "name": "未知游戏", + "app_id": "UNKNOW", + "c_id": "0" + }, + "appConfigMaps": [ + { + "app_id": "UNKNOW", + "config_id": "f5b105" + } + ], + "configs": [ + { + "app_id": "UNKNOW", + "config_id": "f5b105", + "config_name": "Default", + "config_remarks": "", + "services": [] + } + ] +} diff --git a/settings/v2/packages/device.json b/settings/v2/packages/device.json new file mode 100644 index 0000000..70e599e --- /dev/null +++ b/settings/v2/packages/device.json @@ -0,0 +1,3 @@ +{ + "__version__": "1.0.1" +} diff --git a/settings/v2/packages/engine.json b/settings/v2/packages/engine.json new file mode 100644 index 0000000..32adabd --- /dev/null +++ b/settings/v2/packages/engine.json @@ -0,0 +1,234 @@ +{ + "__version__": "1.0.12", + "modules": { + "configs": { + "defaultConfig": { + "name": "默认配置", + "cache": { + "base": { + "_value": true + }, + "gfx-webgl": { + "_value": true + }, + "gfx-webgl2": { + "_value": false + }, + "gfx-webgpu": { + "_value": false + }, + "animation": { + "_value": true + }, + "skeletal-animation": { + "_value": true + }, + "3d": { + "_value": true + }, + "meshopt": { + "_value": false + }, + "2d": { + "_value": true + }, + "xr": { + "_value": false + }, + "rich-text": { + "_value": true + }, + "mask": { + "_value": true + }, + "graphics": { + "_value": true + }, + "ui-skew": { + "_value": true + }, + "affine-transform": { + "_value": true + }, + "ui": { + "_value": true + }, + "particle": { + "_value": true + }, + "physics": { + "_value": true, + "_option": "physics-ammo" + }, + "physics-ammo": { + "_value": true, + "_flags": { + "LOAD_BULLET_MANUALLY": false + } + }, + "physics-cannon": { + "_value": false + }, + "physics-physx": { + "_value": false, + "_flags": { + "LOAD_PHYSX_MANUALLY": false + } + }, + "physics-builtin": { + "_value": false + }, + "physics-2d": { + "_value": true, + "_option": "physics-2d-box2d" + }, + "physics-2d-box2d": { + "_value": true + }, + "physics-2d-box2d-wasm": { + "_value": false, + "_flags": { + "LOAD_BOX2D_MANUALLY": false + } + }, + "physics-2d-builtin": { + "_value": false + }, + "physics-2d-box2d-jsb": { + "_value": false + }, + "intersection-2d": { + "_value": true + }, + "primitive": { + "_value": true + }, + "profiler": { + "_value": true + }, + "occlusion-query": { + "_value": false + }, + "geometry-renderer": { + "_value": false + }, + "debug-renderer": { + "_value": false + }, + "particle-2d": { + "_value": true + }, + "audio": { + "_value": true + }, + "video": { + "_value": true + }, + "webview": { + "_value": true + }, + "tween": { + "_value": true + }, + "websocket": { + "_value": true + }, + "websocket-server": { + "_value": false + }, + "terrain": { + "_value": true + }, + "light-probe": { + "_value": true + }, + "tiled-map": { + "_value": true + }, + "vendor-google": { + "_value": false + }, + "spine": { + "_value": true, + "_option": "spine-3.8" + }, + "spine-3.8": { + "_value": true, + "_flags": { + "LOAD_SPINE_MANUALLY": false + } + }, + "spine-4.2": { + "_value": false, + "_flags": { + "LOAD_SPINE_MANUALLY": false + } + }, + "dragon-bones": { + "_value": true + }, + "marionette": { + "_value": true + }, + "procedural-animation": { + "_value": false + }, + "custom-pipeline-post-process": { + "_value": false + }, + "render-pipeline": { + "_value": true, + "_option": "custom-pipeline" + }, + "custom-pipeline": { + "_value": true + }, + "legacy-pipeline": { + "_value": false + } + }, + "flags": { + "LOAD_SPINE_MANUALLY": false, + "LOAD_BULLET_MANUALLY": false + }, + "includeModules": [ + "2d", + "3d", + "affine-transform", + "animation", + "audio", + "base", + "custom-pipeline", + "dragon-bones", + "gfx-webgl", + "graphics", + "intersection-2d", + "light-probe", + "marionette", + "mask", + "particle", + "particle-2d", + "physics-2d-box2d", + "physics-ammo", + "primitive", + "profiler", + "rich-text", + "skeletal-animation", + "spine-3.8", + "terrain", + "tiled-map", + "tween", + "ui", + "ui-skew", + "video", + "websocket", + "webview" + ], + "noDeprecatedFeatures": { + "value": false, + "version": "" + } + } + } + } +} diff --git a/settings/v2/packages/information.json b/settings/v2/packages/information.json new file mode 100644 index 0000000..94848de --- /dev/null +++ b/settings/v2/packages/information.json @@ -0,0 +1,23 @@ +{ + "__version__": "1.0.1", + "information": { + "customSplash": { + "id": "customSplash", + "label": "customSplash", + "enable": false, + "customSplash": { + "complete": false, + "form": "https://creator-api.cocos.com/api/form/show?" + } + }, + "removeSplash": { + "id": "removeSplash", + "label": "removeSplash", + "enable": false, + "removeSplash": { + "complete": false, + "form": "https://creator-api.cocos.com/api/form/show?" + } + } + } +} diff --git a/settings/v2/packages/program.json b/settings/v2/packages/program.json new file mode 100644 index 0000000..916c1b2 --- /dev/null +++ b/settings/v2/packages/program.json @@ -0,0 +1,3 @@ +{ + "__version__": "1.0.4" +} diff --git a/settings/v2/packages/project.json b/settings/v2/packages/project.json new file mode 100644 index 0000000..4257805 --- /dev/null +++ b/settings/v2/packages/project.json @@ -0,0 +1,13 @@ +{ + "__version__": "1.0.6", + "general": { + "designResolution": { + "width": 1334, + "height": 750, + "fitWidth": false + } + }, + "physics": { + "allowSleep": true + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..7dc649a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + /* Base configuration. Do not edit this field. */ + "extends": "./temp/tsconfig.cocos.json", + + /* Add your custom configuration here. */ + "compilerOptions": { + "strict": false + } +}