commit 1a27f478d025de497a7f0403c5123021dd1441ec Author: sli97 <775303361@qq.com> Date: Sun Nov 27 23:23:47 2022 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..362d2e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,160 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +.DS_Store + +package-lock.json + +#///////////////////////////////////////////////////////////////////////////// +# Fireball Projects +#///////////////////////////////////////////////////////////////////////////// + +/library/ +/temp/ +/local/ +/build/ + +#///////////////////////////////////////////////////////////////////////////// +# npm files +#///////////////////////////////////////////////////////////////////////////// + +npm-debug.log +node_modules/ + +#///////////////////////////////////////////////////////////////////////////// +# Logs and databases +#///////////////////////////////////////////////////////////////////////////// + +*.log +*.sql +*.sqlite + +#///////////////////////////////////////////////////////////////////////////// +# files for debugger +#///////////////////////////////////////////////////////////////////////////// + +*.sln +*.pidb +*.suo + +#///////////////////////////////////////////////////////////////////////////// +# OS generated files +#///////////////////////////////////////////////////////////////////////////// + +.DS_Store +ehthumbs.db +Thumbs.db + +#///////////////////////////////////////////////////////////////////////////// +# WebStorm files +#///////////////////////////////////////////////////////////////////////////// + +.idea/ + +#////////////////////////// +# VS Code files +#////////////////////////// + +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..9284c26 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# 实时对战 +# IO +# 帧同步 +# Cocos Creator +# Node.js \ No newline at end of file diff --git a/client/.creator/asset-template/typescript/Custom Script Template Help Documentation.url b/client/.creator/asset-template/typescript/Custom Script Template Help Documentation.url new file mode 100644 index 0000000..7606df0 --- /dev/null +++ b/client/.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/client/.creator/default-meta.json b/client/.creator/default-meta.json new file mode 100644 index 0000000..abb1239 --- /dev/null +++ b/client/.creator/default-meta.json @@ -0,0 +1,5 @@ +{ + "image": { + "type": "sprite-frame" + } +} diff --git a/client/.eslintrc b/client/.eslintrc new file mode 100644 index 0000000..e0a4c31 --- /dev/null +++ b/client/.eslintrc @@ -0,0 +1,11 @@ +{ + "extends": "@antfu", + "rules": { + "curly": "off", + "no-console": "off", + "no-cond-assign": "off", + "no-useless-call": "off", + "@typescript-eslint/brace-style": "off", + "@typescript-eslint/consistent-type-imports": "off" + } +} \ No newline at end of file diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 0000000..3fb6012 --- /dev/null +++ b/client/.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/client/assets/Animations.meta b/client/assets/Animations.meta new file mode 100644 index 0000000..f523938 --- /dev/null +++ b/client/assets/Animations.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "2d541e68-a3ab-45a5-a30d-ffc21e6aa37f", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scenes.meta b/client/assets/Scenes.meta new file mode 100644 index 0000000..f910e3e --- /dev/null +++ b/client/assets/Scenes.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "e4b93ee1-f734-42e9-8468-c45a928b7b58", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scenes/Batle.scene b/client/assets/Scenes/Batle.scene new file mode 100644 index 0000000..206316b --- /dev/null +++ b/client/assets/Scenes/Batle.scene @@ -0,0 +1,2214 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_name": "Batle", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 62 + }, + "autoReleaseAssets": false, + "_globals": { + "__id__": 63 + }, + "_id": "c6ff3dfa-c3a9-4c47-abc2-690531911090" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 35 + } + ], + "_active": true, + "_components": [ + { + "__id__": 58 + }, + { + "__id__": 59 + }, + { + "__id__": 60 + }, + { + "__id__": 61 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 480.00000000000006, + "y": 320, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "beI88Z2HpFELqR4T5EMHpg" + }, + { + "__type__": "cc.Node", + "_name": "Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 1000 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "ebFwiq8gBFaYpqYbdoDODe" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": null, + "_projection": 0, + "_priority": 1073741824, + "_fov": 45, + "_fovAxis": 0, + "_orthoHeight": 320, + "_near": 0, + "_far": 2000, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 1, + "_stencil": 0, + "_clearFlags": 7, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_aperture": 19, + "_shutter": 7, + "_iso": 0, + "_screenScale": 1, + "_visibility": 41943040, + "_targetTexture": null, + "_id": "63WIch3o5BEYRlXzTT0oWc" + }, + { + "__type__": "cc.Node", + "_name": "Stage", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 33 + }, + { + "__id__": 34 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "4f+jPWeFhNc4ZCA6gQJjOM" + }, + { + "__type__": "cc.Node", + "_name": "Map", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + }, + { + "__id__": 8 + }, + { + "__id__": 9 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "6e6eG+5W9FZLM1PayqTYFl" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "82kSgoYHRBA7gbWlLce5ZX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 2, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "fdv58HjL5ByJt2WmRvLEEm" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1000, + "_originalHeight": 1000, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "c3luvolqVEm67OP00sYOAo" + }, + { + "__type__": "cc.Node", + "_name": "Player", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 11 + }, + { + "__id__": 18 + }, + { + "__id__": 28 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + }, + { + "__id__": 31 + }, + { + "__id__": 32 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "3eWigPOMpN8KYLJnYZ+s+k" + }, + { + "__type__": "cc.Node", + "_name": "Weapon", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 10 + }, + "_children": [ + { + "__id__": 12 + } + ], + "_active": false, + "_components": [ + { + "__id__": 17 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "4acUt26XNNrIoenPn917EQ" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 11 + }, + "_children": [ + { + "__id__": 13 + } + ], + "_active": true, + "_components": [ + { + "__id__": 15 + }, + { + "__id__": 16 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 40, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "3chGu54kdCiryCGOn9MNk1" + }, + { + "__type__": "cc.Node", + "_name": "BulletPoint", + "_objFlags": 0, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 55.11, + "y": 5, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "7fo88SUhZF/qLavMZSyMrA" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "04DzjI94xMiLSVYxmPLqKc" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "0f1osiWUpAJYLTMppMb3lm" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "0a0fBlOAdARql4Yi+gYYei" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "f88//t3OVM0bUTvqxiCwTF" + }, + { + "__type__": "cc.Node", + "_name": "Weapon2", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 10 + }, + "_children": [ + { + "__id__": 19 + } + ], + "_active": true, + "_components": [ + { + "__id__": 27 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "8aVXWZ+MpH/Yz560HNrpTf" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 18 + }, + "_children": [ + { + "__id__": 20 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 26 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 50, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "18iRoolShDLrG3xcHinuOK" + }, + { + "__type__": "cc.Node", + "_name": "BulletPoint", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [ + { + "__id__": 21 + } + ], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 70, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "0avhwJaSRMBpgQLnPoCjlw" + }, + { + "__type__": "cc.Node", + "_name": "Bullet1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 23 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -4.889999999999986, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "f9G0I2mVFD8ZclECxVPz/p" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "2aQAM5mP9DSZxFSlga2yO5" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "97tJNL0sxPuYwNaY5Ihrac" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "d85f+mrI9MQpkt6AOemueG" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "14ANzS4gRMMo3ZiAV00Flj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "c6KUs0DCBEdY63tdUh4m0f" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "c4GdDuvE5HE4GdAEVHtDrM" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 29 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "7ftqoPPUdO+pVMIpEzXwsX" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 70, + "height": 70 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "b9kTLaK3xC7rD1roBVJGLP" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "6bcfOJGTREvo8F5RiCwmua" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "01s6izKf5CH4OyC7K0Ayc3" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": null, + "enabledContactListener": false, + "bullet": false, + "awakeOnLoad": true, + "_group": 1, + "_type": 1, + "_allowSleep": true, + "_gravityScale": 1, + "_linearDamping": 0, + "_angularDamping": 0, + "_linearVelocity": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_angularVelocity": 0, + "_fixedRotation": true, + "_id": "bbIfC0Mn9AcZxmQDRKIfwE" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "84q/T/oEZLxZ52jxDB5Nea" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "acvU7K+3tASIxzNR1znXTr" + }, + { + "__type__": "cc.Node", + "_name": "UI", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 36 + }, + { + "__id__": 50 + } + ], + "_active": true, + "_components": [ + { + "__id__": 56 + }, + { + "__id__": 57 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "14eV9+ichBfb0LyCZk8y+k" + }, + { + "__type__": "cc.Node", + "_name": "JoyStick", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 35 + }, + "_children": [ + { + "__id__": 37 + } + ], + "_active": true, + "_components": [ + { + "__id__": 47 + }, + { + "__id__": 48 + }, + { + "__id__": 49 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": -480, + "y": -320, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "d0Km2BWD5NF7BGVqabNjGL" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 36 + }, + "_children": [ + { + "__id__": 38 + }, + { + "__id__": 42 + } + ], + "_active": true, + "_components": [ + { + "__id__": 45 + }, + { + "__id__": 46 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 150, + "y": 150, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "5ePE1IffNNEIHGIq8+onPl" + }, + { + "__type__": "cc.Node", + "_name": "Base", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 39 + }, + { + "__id__": 40 + }, + { + "__id__": 41 + } + ], + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "ecWC23pUZEwZYS+ALUi9f3" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "c2Te1tDzREy6zf7vhgxqmx" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "0bhaevCENLfrMOFHPWQXyR" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 256, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "41VrempLhHG5QVxuuJZ28W" + }, + { + "__type__": "cc.Node", + "_name": "Stick", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 43 + }, + { + "__id__": 44 + } + ], + "_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": 0.3, + "y": 0.3, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "e7hbpmSqBEaY1A28Hpjc4G" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 42 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "fcJkQUSNdMl4HT7DqpBwEz" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 42 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@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": "1ck38AkLhAMq0Fbr8rL01H" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "0cwEKsJ/RJ97DxVaBjLDr8" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 12, + "_target": null, + "_left": 50, + "_right": 0, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "99Ie4JbrZOf7JF9TQqOtab" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_id": "8cFV1KKjZI5o68BpkJDf7H" + }, + { + "__type__": "bfc9abjfs9EIq9cZwv/Tsko", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": null, + "_id": "45lhKkgBtP86AoioWUIFyB" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 960, + "_originalHeight": 640, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "70Jbhs5wBGl7Wi14Ocx+tL" + }, + { + "__type__": "cc.Node", + "_name": "Fire", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 35 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 51 + }, + { + "__id__": 52 + }, + { + "__id__": 53 + }, + { + "__id__": 54 + } + ], + "_prefab": null, + "_lpos": { + "__type__": "cc.Vec3", + "x": 330, + "y": -170, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "32Z8x82bFLU6PIr+gkUn17" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "19/8SIXxRB3I5AxNeSdVT8" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "d6/njd4FZHv4j30KRMObzx" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 36, + "_target": null, + "_left": 0, + "_right": 50, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "9bS7inbQFJbZNKl6BzDVrI" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "__prefab": null, + "clickEvents": [ + { + "__id__": 55 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": null, + "_id": "7fXcpjJjhP0oWUAOX/WgeL" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 50 + }, + "component": "", + "_componentId": "407c9ThQI1IiKmZWhM7VQ4l", + "handler": "fire", + "customEventData": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 35 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "bbpZpj0UBHH5vf6VzRHY/m" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 35 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "88qaZ4KIlJWo+1BSIXMklG" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "d6rUX5yfhMlKoWX2bSbawx" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_cameraComponent": { + "__id__": 4 + }, + "_alignCanvasWithScreen": true, + "_id": "12O/ljcVlEqLmVm3U2gEOQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_alignFlags": 45, + "_target": null, + "_left": 5.684341886080802e-14, + "_right": 5.684341886080802e-14, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "c5V1EV8IpMtrIvY1OE9t2u" + }, + { + "__type__": "d8c46Qk5qtNIq8HKTzpjYtb", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": null, + "_id": "dfD/HdXx1HYapAjrwsefWt" + }, + { + "__type__": "cc.PrefabInfo", + "fileId": "c6ff3dfa-c3a9-4c47-abc2-690531911090" + }, + { + "__type__": "cc.SceneGlobals", + "ambient": { + "__id__": 64 + }, + "shadows": { + "__id__": 65 + }, + "_skybox": { + "__id__": 66 + }, + "fog": { + "__id__": 67 + }, + "octree": { + "__id__": 68 + } + }, + { + "__type__": "cc.AmbientInfo", + "_skyColorHDR": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0.520833125 + }, + "_skyColor": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0.520833125 + }, + "_skyIllumHDR": 20000, + "_skyIllum": 20000, + "_groundAlbedoHDR": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "_groundAlbedo": { + "__type__": "cc.Vec4", + "x": 0, + "y": 0, + "z": 0, + "w": 0 + }, + "_skyColorLDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.5, + "z": 0.8, + "w": 1 + }, + "_skyIllumLDR": 20000, + "_groundAlbedoLDR": { + "__type__": "cc.Vec4", + "x": 0.2, + "y": 0.2, + "z": 0.2, + "w": 1 + } + }, + { + "__type__": "cc.ShadowsInfo", + "_enabled": false, + "_type": 0, + "_normal": { + "__type__": "cc.Vec3", + "x": 0, + "y": 1, + "z": 0 + }, + "_distance": 0, + "_shadowColor": { + "__type__": "cc.Color", + "r": 76, + "g": 76, + "b": 76, + "a": 255 + }, + "_maxReceived": 4, + "_size": { + "__type__": "cc.Vec2", + "x": 512, + "y": 512 + } + }, + { + "__type__": "cc.SkyboxInfo", + "_envLightingType": 0, + "_envmapHDR": null, + "_envmap": null, + "_envmapLDR": null, + "_diffuseMapHDR": null, + "_diffuseMapLDR": null, + "_enabled": false, + "_useHDR": true, + "_editableMaterial": null, + "_reflectionHDR": null, + "_reflectionLDR": null + }, + { + "__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 + } +] \ No newline at end of file diff --git a/client/assets/Scenes/Batle.scene.meta b/client/assets/Scenes/Batle.scene.meta new file mode 100644 index 0000000..9bee8a4 --- /dev/null +++ b/client/assets/Scenes/Batle.scene.meta @@ -0,0 +1,11 @@ +{ + "ver": "1.1.39", + "importer": "scene", + "imported": true, + "uuid": "c6ff3dfa-c3a9-4c47-abc2-690531911090", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts.meta b/client/assets/Scripts.meta new file mode 100644 index 0000000..1fcf96b --- /dev/null +++ b/client/assets/Scripts.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "a5ff1131-2769-49ad-92d3-4d7f4b7c2b24", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Base.meta b/client/assets/Scripts/Base.meta new file mode 100644 index 0000000..fa60401 --- /dev/null +++ b/client/assets/Scripts/Base.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b9842cc1-d805-42af-b6b9-b15d5dd32f65", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Base/EntityManager.ts b/client/assets/Scripts/Base/EntityManager.ts new file mode 100644 index 0000000..1e58033 --- /dev/null +++ b/client/assets/Scripts/Base/EntityManager.ts @@ -0,0 +1,23 @@ +import { _decorator, Component, Node, Layers, UITransform, Sprite, KeyCode, Vec2, RigidBody2D, BoxCollider2D, Size, ERigidBody2DType } from 'cc'; +import { EntityEnum, EntityStateEnum } from '../Enum'; +import StateMachine from './StateMachine'; +const { ccclass, property } = _decorator; + +@ccclass('EntityManager') +export abstract class EntityManager extends Component { + fsm: StateMachine + private _state: EntityStateEnum + + + get state() { + return this._state + } + + set state(newState) { + this._state = newState + this.fsm.setParams(newState, true) + } + + abstract init(...args: any[]): void +} + diff --git a/client/assets/Scripts/Base/EntityManager.ts.meta b/client/assets/Scripts/Base/EntityManager.ts.meta new file mode 100644 index 0000000..8ed593d --- /dev/null +++ b/client/assets/Scripts/Base/EntityManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "2e4eed53-d1b9-42ef-97aa-8d0a8da927f7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/Singleton.ts b/client/assets/Scripts/Base/Singleton.ts new file mode 100644 index 0000000..afad114 --- /dev/null +++ b/client/assets/Scripts/Base/Singleton.ts @@ -0,0 +1,17 @@ +/*** + * 泛型单例模式接口 + */ + +export default class Singleton { + private static _instance: any = null + + static GetInstance(): T { + if (this._instance === null) { + this._instance = new this() + } + return this._instance + } + + protected constructor() { + } +} diff --git a/client/assets/Scripts/Base/Singleton.ts.meta b/client/assets/Scripts/Base/Singleton.ts.meta new file mode 100644 index 0000000..001b808 --- /dev/null +++ b/client/assets/Scripts/Base/Singleton.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "0ee5b84a-8971-410f-a39d-2cf96597dd45", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/State.ts b/client/assets/Scripts/Base/State.ts new file mode 100644 index 0000000..02a7d48 --- /dev/null +++ b/client/assets/Scripts/Base/State.ts @@ -0,0 +1,48 @@ +import { animation, AnimationClip, Sprite, SpriteFrame } from 'cc' +import DataManager from '../Global/DataManager' +import { ResourceManager } from '../Global/ResourceManager' +import { sortSpriteFrame } from '../Utils' +import StateMachine from './StateMachine' + +/*** + * unit:milisecond + */ +export const ANIMATION_SPEED = 1 / 10 + +/*** + * 状态(每组动画的承载容器,持有SpriteAnimation组件执行播放) + */ +export default class State { + private animationClip: AnimationClip + constructor( + private fsm: StateMachine, + private path: string, + private wrapMode: AnimationClip.WrapMode = AnimationClip.WrapMode.Normal, + private force: boolean = false, + ) { + //生成动画轨道属性 + const track = new animation.ObjectTrack() + track.path = new animation.TrackPath().toComponent(Sprite).toProperty('spriteFrame') + const spriteFrames = DataManager.Instance.textureMap.get(this.path) + const frames: Array<[number, SpriteFrame]> = sortSpriteFrame(spriteFrames).map((item, index) => [ + index * ANIMATION_SPEED, + item, + ]) + track.channel.curve.assignSorted(frames) + + //动画添加轨道 + this.animationClip = new AnimationClip() + this.animationClip.name = this.path + this.animationClip.duration = frames.length * ANIMATION_SPEED + this.animationClip.addTrack(track) + this.animationClip.wrapMode = this.wrapMode + } + + run() { + if (this.fsm.animationComponent.defaultClip?.name === this.animationClip.name && !this.force) { + return + } + this.fsm.animationComponent.defaultClip = this.animationClip + this.fsm.animationComponent.play() + } +} diff --git a/client/assets/Scripts/Base/State.ts.meta b/client/assets/Scripts/Base/State.ts.meta new file mode 100644 index 0000000..8aea51d --- /dev/null +++ b/client/assets/Scripts/Base/State.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "226c1921-1459-4764-82e6-b1a11c5a73c2", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/StateMachine.ts b/client/assets/Scripts/Base/StateMachine.ts new file mode 100644 index 0000000..d6e16ac --- /dev/null +++ b/client/assets/Scripts/Base/StateMachine.ts @@ -0,0 +1,90 @@ +import { _decorator, Animation, Component, SpriteFrame } from 'cc' +import { FsmParamTypeEnum } from '../Enum' +const { ccclass } = _decorator +import State from './State' +import SubStateMachine from './SubStateMachine' + +type ParamsValueType = boolean | number + +export interface IParamsValue { + type: FsmParamTypeEnum + value: ParamsValueType +} + +export const getInitParamsTrigger = () => { + return { + type: FsmParamTypeEnum.Trigger, + value: false, + } +} + +export const getInitParamsNumber = () => { + return { + type: FsmParamTypeEnum.Number, + value: 0, + } +} + +/*** + * 流动图 + * 1.entity的state或者direction改变触发setter + * 2.setter里触发fsm的setParams方法 + * 3.setParams执行run方法(run方法由子类重写) + * 4.run方法会更改currentState,然后触发currentState的setter + * 5-1.如果currentState是子状态机,继续执行他的run方法,run方法又会设置子状态机的currentState,触发子状态run方法 + * 5-2.如果是子状态,run方法就是播放动画 + */ + +/*** + * 有限状态机基类 + */ +@ccclass('StateMachine') +export default abstract class StateMachine extends Component { + private _currentState: State | SubStateMachine = null + params: Map = new Map() + stateMachines: Map = new Map() + animationComponent: Animation + + getParams(paramName: string) { + if (this.params.has(paramName)) { + return this.params.get(paramName).value + } + } + + setParams(paramName: string, value: ParamsValueType) { + if (this.params.has(paramName)) { + this.params.get(paramName).value = value + this.run() + this.resetTrigger() + } + } + + get currentState() { + return this._currentState + } + + set currentState(newState) { + if (!newState) { + return + } + this._currentState = newState + this._currentState.run() + } + + /*** + * 清空所有trigger + */ + resetTrigger() { + for (const [, value] of this.params) { + if (value.type === FsmParamTypeEnum.Trigger) { + value.value = false + } + } + } + + /*** + * 由子类重写,方法目标是根据当前状态和参数修改currentState + */ + abstract init(...args: any[]): void + abstract run(): void +} diff --git a/client/assets/Scripts/Base/StateMachine.ts.meta b/client/assets/Scripts/Base/StateMachine.ts.meta new file mode 100644 index 0000000..84df8da --- /dev/null +++ b/client/assets/Scripts/Base/StateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "66538d45-0fcf-4ed2-8e47-a0a688ddaf3c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Base/SubStateMachine.ts b/client/assets/Scripts/Base/SubStateMachine.ts new file mode 100644 index 0000000..6e6cbb3 --- /dev/null +++ b/client/assets/Scripts/Base/SubStateMachine.ts @@ -0,0 +1,30 @@ +import State from './State' +import StateMachine from './StateMachine' + +/*** + * 子有限状态机基类 + * 用处:例如有个idle的state,但是有多个方向,为了让主状态机更整洁,可以把同类型的但具体不同的state都封装在子状态机中 + */ +export default abstract class SubStateMachine { + private _currentState: State = null + stateMachines: Map = new Map() + + constructor(public fsm: StateMachine) {} + + get currentState() { + return this._currentState + } + + set currentState(newState) { + if (!newState) { + return + } + this._currentState = newState + this._currentState.run() + } + + /*** + * 具体类实现 + */ + abstract run(): void +} diff --git a/client/assets/Scripts/Base/SubStateMachine.ts.meta b/client/assets/Scripts/Base/SubStateMachine.ts.meta new file mode 100644 index 0000000..0eceebf --- /dev/null +++ b/client/assets/Scripts/Base/SubStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "7f9fac71-9820-41b2-8b4d-2dc4185414ef", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity.meta b/client/assets/Scripts/Entity.meta new file mode 100644 index 0000000..fda9f82 --- /dev/null +++ b/client/assets/Scripts/Entity.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b0c3f1a6-89a2-4921-bf10-22ae7925cf6e", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Bullet.meta b/client/assets/Scripts/Entity/Bullet.meta new file mode 100644 index 0000000..53d5649 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "9265fd0c-f1ae-471b-afa0-7f17e87d408f", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletManager.ts b/client/assets/Scripts/Entity/Bullet/BulletManager.ts new file mode 100644 index 0000000..4fe2b85 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletManager.ts @@ -0,0 +1,85 @@ +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, RigidBody2D, instantiate } from 'cc' +import { EntityManager } from '../../Base/EntityManager' +import { EntityTypeEnum, EntityStateEnum, EventEnum, PrefabPathEnum } from '../../Enum' +import DataManager, { IBullet, IVec2 } from '../../Global/DataManager' +import EventManager from '../../Global/EventManager' +import ObjectPoolManager from '../../Global/ObjectPoolManager' +import { rad2Angle } from '../../Utils' +import { ExplosionManager } from '../Explosion/ExplosionManager' +import { BulletStateMachine } from './BulletStateMachine' +const { ccclass, property } = _decorator + +@ccclass('BulletManager') +export class BulletManager extends EntityManager { + //静态数据 + id = 1 + owner = 1 + type = EntityTypeEnum.Bullet1 + + //动态数据 + position: IVec2 + direction: IVec2 + + private angle: number + + init({ id, owner, type }: IBullet) { + this.id = id + this.owner = owner + this.type = type + + this.fsm = this.addComponent(BulletStateMachine) + this.fsm.init(type) + this.state = EntityStateEnum.Idle + this.node.active = false + + EventManager.Instance.on(EventEnum.Explosion, this.handleExplosion, this) + } + + onDisable() { + EventManager.Instance.off(EventEnum.Explosion, this.handleExplosion, this) + } + + handleExplosion(id: number, { x, y }: IVec2) { + if (this.id !== id) { + return + } + + const explosion = ObjectPoolManager.Instance.getPoolObject(EntityTypeEnum.Explosion) + const explosionManager = explosion.getComponent(ExplosionManager) || explosion.addComponent(ExplosionManager) + explosionManager.init(EntityTypeEnum.Explosion, { + x, y, + }) + + ObjectPoolManager.Instance.returnPoolObject(this.node) + } + + render(data: IBullet) { + this.node.active = true + this.renderPosition(data) + this.renderDirection(data) + } + + renderPosition(data: IBullet) { + this.node.setPosition(data.position.x, data.position.y) + } + + renderDirection(data: IBullet) { + if (this.angle === undefined) { + const { x, y } = data.direction + const side = Math.sqrt(x * x + y * y) + this.angle = x > 0 ? rad2Angle(Math.asin(y / side)) : rad2Angle(Math.asin(- y / side)) + 180 + } + + this.node.setRotationFromEuler(0, 0, this.angle) + + // let angle: number, sign: number + // if (x !== 0) { + // angle = x > 0 ? rad2Angle(Math.atan(y / x)) : rad2Angle(Math.atan(-y / x)) + 180 + // sign = x > 0 ? 1 : -1 + // } else { + // angle = rad2Angle(Math.PI / 2) + // sign = y > 0 ? 1 : -1 + // } + // this.node.setRotationFromEuler(0, 0, sign * angle) + } +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta b/client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta new file mode 100644 index 0000000..523e643 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "3cb4bec9-dd63-4ffe-9a28-8f8347cd327b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts new file mode 100644 index 0000000..3f85759 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts @@ -0,0 +1,45 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityTypeEnum, TexturePathEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum' +const { ccclass, property } = _decorator + +@ccclass('BulletStateMachine') +export class BulletStateMachine extends StateMachine { + type: EntityTypeEnum + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`)) + } + + initAnimationEvent() { + + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta new file mode 100644 index 0000000..dc1d6f4 --- /dev/null +++ b/client/assets/Scripts/Entity/Bullet/BulletStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "531b884c-93b6-4d0e-a0fc-e8861eebf6e7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Explosion.meta b/client/assets/Scripts/Entity/Explosion.meta new file mode 100644 index 0000000..b1fcc7a --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "3302ce3a-fac5-42c6-8060-e3e8682cfcf1", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts new file mode 100644 index 0000000..16718e4 --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts @@ -0,0 +1,17 @@ +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, RigidBody2D } from 'cc' +import { EntityManager } from '../../Base/EntityManager' +import { EntityTypeEnum, EntityStateEnum, EventEnum } from '../../Enum' +import { IBullet, IVec2 } from '../../Global/DataManager' +import { ExplosionStateMachine } from './ExplosionStateMachine' +const { ccclass, property } = _decorator + +@ccclass('ExplosionManager') +export class ExplosionManager extends EntityManager { + + init(type: EntityTypeEnum, { x, y }: IVec2) { + this.node.setPosition(x, y) + this.fsm = this.addComponent(ExplosionStateMachine) + this.fsm.init(type) + this.state = EntityStateEnum.Idle + } +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta new file mode 100644 index 0000000..b880475 --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "34e9e358-082f-4674-9e38-a3c27f8b013b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts new file mode 100644 index 0000000..60738e2 --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts @@ -0,0 +1,52 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityTypeEnum, TexturePathEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum' +import ObjectPoolManager from '../../Global/ObjectPoolManager' +const { ccclass, property } = _decorator + +@ccclass('ExplosionStateMachine') +export class ExplosionStateMachine extends StateMachine { + type: EntityTypeEnum + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`)) + } + + initAnimationEvent() { + this.animationComponent.on(Animation.EventType.FINISHED, () => { + const whiteList = [EntityStateEnum.Idle] + const name = this.animationComponent.defaultClip.name + if (whiteList.some(v => name.includes(v))) { + ObjectPoolManager.Instance.returnPoolObject(this.node) + } + }) + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta new file mode 100644 index 0000000..55a003d --- /dev/null +++ b/client/assets/Scripts/Entity/Explosion/ExplosionStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "35a9f553-26d5-49c8-bcc0-d1011c07e124", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Player.meta b/client/assets/Scripts/Entity/Player.meta new file mode 100644 index 0000000..9007398 --- /dev/null +++ b/client/assets/Scripts/Entity/Player.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "5802fd2f-7823-4294-91c8-d71adca41319", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Player/PlayerManager.ts b/client/assets/Scripts/Entity/Player/PlayerManager.ts new file mode 100644 index 0000000..70dad68 --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerManager.ts @@ -0,0 +1,118 @@ +import { _decorator, Vec2, RigidBody2D, BoxCollider2D, Size, ERigidBody2DType, Prefab, instantiate, Input, ProgressBar, Label } from 'cc'; +import { EntityManager } from '../../Base/EntityManager'; +import { EntityTypeEnum, EntityStateEnum, EventEnum, InputType, PrefabPathEnum } from '../../Enum'; +import DataManager, { IPlayer, IVec2 } from '../../Global/DataManager'; +import EventManager from '../../Global/EventManager'; +import { ResourceManager } from '../../Global/ResourceManager'; +import { rad2Angle } from '../../Utils'; +import { WeaponManager } from '../Weapon/WeaponManager'; +import { PlayerStateMachine } from './PlayerStateMachine'; +const { ccclass, property } = _decorator; + +@ccclass('PlayerManager') +export class PlayerManager extends EntityManager { + //静态数据 + id = 1 + nickname = '' + type = EntityTypeEnum.Player1 + weaponType = EntityTypeEnum.Weapon1 + bulletType = EntityTypeEnum.Bullet1 + + //动态数据 + hp: number + position: IVec2 + direction: IVec2 + + private hpBar: ProgressBar + private nicknameLabel: Label + private weapon: WeaponManager + + get isSelf() { + return DataManager.Instance.myPlayerId === this.id + } + + init(data: IPlayer) { + const { id, nickname, type, weaponType, bulletType } = data + this.id = id + this.nickname = nickname + this.type = type + this.weaponType = weaponType + this.bulletType = bulletType + + this.hpBar = this.node.getComponentInChildren(ProgressBar) + this.nicknameLabel = this.node.getComponentInChildren(Label) + this.nicknameLabel.string = data.nickname + + this.fsm = this.addComponent(PlayerStateMachine) + this.fsm.init(type) + + const weaponPrefab = DataManager.Instance.prefabMap.get(this.weaponType) + const weapon = instantiate(weaponPrefab) + weapon.setParent(this.node) + this.weapon = weapon.addComponent(WeaponManager) + this.weapon.init(data) + } + + tick(dt: number) { + if (!this.isSelf) { + return + } + + // if (!DataManager.Instance.jm.input.length()) { + // return + // } + + const { x, y } = DataManager.Instance.jm.input + DataManager.Instance.applyInput({ + type: InputType.PlayerMove, + id: this.id, + direction: { + x, + y + }, + dt + }) + } + + render(data: IPlayer) { + this.renderHP(data) + this.renderPosition(data) + this.renderDirection(data) + } + + renderHP(data: IPlayer) { + this.hpBar.progress = data.hp / this.hpBar.totalLength + } + + renderPosition(data: IPlayer) { + this.node.setPosition(data.position.x, data.position.y) + } + + renderDirection(data: IPlayer) { + if (data.direction.x === 0 && data.direction.y === 0) { + this.state = EntityStateEnum.Idle + return + } + this.state = EntityStateEnum.Run + const { x, y } = data.direction + if (x !== 0) { + this.node.setScale(x > 0 ? 1 : -1, 1) + this.nicknameLabel.node.setScale(x > 0 ? 1 : -1, 1) + } + const side = Math.sqrt(x * x + y * y) + const angle = rad2Angle(Math.asin(y / side)) + this.weapon.node.setRotationFromEuler(0, 0, angle) + + // const { x, y } = joystick.input + // let angle: number, sign: number + // if (x !== 0) { + // angle = rad2Angle(Math.atan(y / x)) + // sign = joystick.input.x > 0 ? 1 : -1 + // } else { + // angle = rad2Angle(Math.PI / 2) + // sign = joystick.input.y > 0 ? 1 : -1 + // } + // this.node.setRotationFromEuler(0, 0, sign * angle) + } +} + diff --git a/client/assets/Scripts/Entity/Player/PlayerManager.ts.meta b/client/assets/Scripts/Entity/Player/PlayerManager.ts.meta new file mode 100644 index 0000000..b8cac2f --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "4cc81cda-b869-4eb8-855e-126f16aa7a12", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts new file mode 100644 index 0000000..c014448 --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts @@ -0,0 +1,49 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityTypeEnum, EntityStateEnum, ParamsNameEnum } from '../../Enum' +const { ccclass, property } = _decorator + +@ccclass('PlayerStateMachine') +export class PlayerStateMachine extends StateMachine { + type: EntityTypeEnum + + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + this.params.set(ParamsNameEnum.Run, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`, AnimationClip.WrapMode.Loop)) + this.stateMachines.set(ParamsNameEnum.Run, new State(this, `${this.type}${EntityStateEnum.Run}`, AnimationClip.WrapMode.Loop)) + } + + initAnimationEvent() { + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + case this.stateMachines.get(ParamsNameEnum.Run): + if (this.params.get(ParamsNameEnum.Run).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Run) + } else if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta new file mode 100644 index 0000000..7ea536c --- /dev/null +++ b/client/assets/Scripts/Entity/Player/PlayerStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "3bdb087b-0d43-4b85-81e4-e480cd43405d", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Weapon.meta b/client/assets/Scripts/Entity/Weapon.meta new file mode 100644 index 0000000..7eeeddd --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b8a46a8b-5505-436b-8870-2965599d2168", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponManager.ts b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts new file mode 100644 index 0000000..cc43014 --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts @@ -0,0 +1,73 @@ +import { _decorator, Animation, AnimationClip, Node, Sprite, Vec3, Vec2, UITransform } from 'cc' +import { EntityManager } from '../../Base/EntityManager' +import { EntityTypeEnum, EntityStateEnum, EventEnum, InputType } from '../../Enum' +import DataManager, { IPlayer } from '../../Global/DataManager' +import EventManager from '../../Global/EventManager' +import { WeaponStateMachine } from './WeaponStateMachine' +const { ccclass, property } = _decorator + +@ccclass('WeaponManager') +export class WeaponManager extends EntityManager { + owner = 1 + type = EntityTypeEnum.Weapon1 + + private body: Node + private anchor: Node + private point: Node + + get isSelf() { + return DataManager.Instance.myPlayerId === this.owner + } + + init({ id, weaponType }: IPlayer) { + this.owner = id + + this.type = weaponType + + this.node.setSiblingIndex(0) + this.body = this.node.getChildByName("Body") + this.anchor = this.body.getChildByName("Anchor") + this.point = this.anchor.getChildByName("Point") + + this.fsm = this.body.addComponent(WeaponStateMachine) + this.fsm.init(weaponType) + this.state = EntityStateEnum.Idle + + + EventManager.Instance.on(EventEnum.WeaponShoot, this.handleWeaponShoot, this) + this.isSelf && EventManager.Instance.on(EventEnum.ShootBtnClick, this.handleShootBtnClick, this) + } + + onDestroy() { + this.isSelf && EventManager.Instance.off(EventEnum.ShootBtnClick, this.handleShootBtnClick, this) + EventManager.Instance.off(EventEnum.WeaponShoot, this.handleWeaponShoot, this) + } + + handleWeaponShoot(id: number) { + if (this.owner !== id) { + return + } + + this.state = EntityStateEnum.Attack + } + + handleShootBtnClick() { + const pointWorldPos = this.point.getWorldPosition() + const pointStagePos = DataManager.Instance.gm.stage.getComponent(UITransform).convertToNodeSpaceAR(pointWorldPos); + const anchorWorldPos = this.anchor.getWorldPosition() + const directionVec2 = new Vec2(pointWorldPos.x - anchorWorldPos.x, pointWorldPos.y - anchorWorldPos.y).normalize() + + DataManager.Instance.applyInput({ + type: InputType.WeaponShoot, + owner: this.owner, + position: { + x: pointStagePos.x, + y: pointStagePos.y + }, + direction: { + x: directionVec2.x, + y: directionVec2.y + }, + }) + } +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta new file mode 100644 index 0000000..e3b8bff --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "eefb7dfd-3b96-46cc-a83a-c5bafe656d8a", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts new file mode 100644 index 0000000..4ee64eb --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts @@ -0,0 +1,58 @@ +import { _decorator, Animation, AnimationClip } from 'cc' +import State from '../../Base/State' +import StateMachine, { getInitParamsNumber, getInitParamsTrigger } from '../../Base/StateMachine' +import { EntityStateEnum, EntityTypeEnum, ParamsNameEnum } from '../../Enum' +import { WeaponManager } from './WeaponManager' +const { ccclass, property } = _decorator + +@ccclass('WeaponStateMachine') +export class WeaponStateMachine extends StateMachine { + type: EntityTypeEnum + + init(type: EntityTypeEnum) { + this.type = type + this.animationComponent = this.node.addComponent(Animation) + + this.initParams() + this.initStateMachines() + this.initAnimationEvent() + } + + initParams() { + this.params.set(ParamsNameEnum.Idle, getInitParamsTrigger()) + this.params.set(ParamsNameEnum.Attack, getInitParamsTrigger()) + } + + initStateMachines() { + this.stateMachines.set(ParamsNameEnum.Idle, new State(this, `${this.type}${EntityStateEnum.Idle}`)) + this.stateMachines.set(ParamsNameEnum.Attack, new State(this, `${this.type}${EntityStateEnum.Attack}`, AnimationClip.WrapMode.Normal, true)) + } + + initAnimationEvent() { + this.animationComponent.on(Animation.EventType.FINISHED, () => { + const whiteList = [EntityStateEnum.Attack] + const name = this.animationComponent.defaultClip.name + if (whiteList.some(v => name.includes(v))) { + this.node.parent.getComponent(WeaponManager).state = EntityStateEnum.Idle + } + }) + } + + run() { + switch (this.currentState) { + case this.stateMachines.get(ParamsNameEnum.Idle): + case this.stateMachines.get(ParamsNameEnum.Attack): + if (this.params.get(ParamsNameEnum.Attack).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Attack) + } if (this.params.get(ParamsNameEnum.Idle).value) { + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + } else { + this.currentState = this.currentState + } + break + default: + this.currentState = this.stateMachines.get(ParamsNameEnum.Idle) + break + } + } +} diff --git a/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta new file mode 100644 index 0000000..e9262ca --- /dev/null +++ b/client/assets/Scripts/Entity/Weapon/WeaponStateMachine.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "1eed66f0-cb8f-4cc9-9f91-aa21b5c2883c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Enum.meta b/client/assets/Scripts/Enum.meta new file mode 100644 index 0000000..8186b8c --- /dev/null +++ b/client/assets/Scripts/Enum.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "5b95c11b-0954-45ac-99ba-98df4825c906", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Enum/index.ts b/client/assets/Scripts/Enum/index.ts new file mode 100644 index 0000000..e7f54ed --- /dev/null +++ b/client/assets/Scripts/Enum/index.ts @@ -0,0 +1,68 @@ +export enum FsmParamTypeEnum { + Number = 'Number', + Trigger = 'Trigger', +} + +export enum EntityStateEnum { + Idle = 'Idle', + Run = 'Run', + Attack = 'Attack', +} + +export enum ParamsNameEnum { + Idle = 'Idle', + Run = 'Run', + Attack = 'Attack', +} + +export enum EventEnum { + ShootBtnClick = 'ShootBtnClick', + WeaponShoot = 'WeaponShoot', + Explosion = 'Explosion' +} + +export enum EntityTypeEnum { + Map1 = 'Map1', + Player1 = 'Player1', + Player2 = 'Player2', + Weapon1 = 'Weapon1', + Weapon2 = 'Weapon2', + Bullet1 = 'Bullet1', + Bullet2 = 'Bullet2', + Explosion = 'Explosion', + JoyStick = 'JoyStick', + Shoot = 'Shoot', +} + +export enum PrefabPathEnum { + Map1 = 'prefab/Map1', + Player1 = 'prefab/Player', + Player2 = 'prefab/Player', + Weapon1 = 'prefab/Weapon1', + Weapon2 = 'prefab/Weapon2', + Bullet1 = 'prefab/Bullet', + Bullet2 = 'prefab/Bullet', + Explosion = 'prefab/Explosion', + JoyStick = 'prefab/JoyStick', + Shoot = 'prefab/Shoot', +} + +export enum TexturePathEnum { + Player1Idle = 'texture/player/player1/idle', + Player1Run = 'texture/player/player1/run', + Player2Idle = 'texture/player/player2/idle', + Player2Run = 'texture/player/player2/run', + Weapon1Idle = 'texture/weapon/weapon1/idle', + Weapon1Attack = 'texture/weapon/weapon1/attack', + Weapon2Idle = 'texture/weapon/weapon2/idle', + Weapon2Attack = 'texture/weapon/weapon2/attack', + Bullet1Idle = 'texture/bullet/bullet1', + Bullet2Idle = 'texture/bullet/bullet2', + ExplosionIdle = 'texture/explosion', +} + +export enum InputType { + PlayerMove = 'PlayerMove', + WeaponShoot = 'WeaponShoot', + TimePast = 'TimePast', +} \ No newline at end of file diff --git a/client/assets/Scripts/Enum/index.ts.meta b/client/assets/Scripts/Enum/index.ts.meta new file mode 100644 index 0000000..1142982 --- /dev/null +++ b/client/assets/Scripts/Enum/index.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "393286c2-7b09-44d1-955f-049e7e5b36ea", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global.meta b/client/assets/Scripts/Global.meta new file mode 100644 index 0000000..21feef9 --- /dev/null +++ b/client/assets/Scripts/Global.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "6262be8a-effd-4208-89cd-6532b055b4a0", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Global/DataManager.ts b/client/assets/Scripts/Global/DataManager.ts new file mode 100644 index 0000000..5ccc704 --- /dev/null +++ b/client/assets/Scripts/Global/DataManager.ts @@ -0,0 +1,164 @@ +import { Input, Prefab, SpriteFrame } from 'cc' +import Singleton from '../Base/Singleton' +import { BulletManager } from '../Entity/Bullet/BulletManager' +import { PlayerManager } from '../Entity/Player/PlayerManager' +import { WeaponManager } from '../Entity/Weapon/WeaponManager' +import { EntityStateEnum, EntityTypeEnum, EventEnum, InputType } from '../Enum' +import { BattleManager } from '../Scene/BattleManager' +import { JoyStickManager } from '../UI/JoyStickManager' +import EventManager from './EventManager' +import ObjectPoolManager from './ObjectPoolManager' + +export type IPlayer = Pick +export type IBullet = Pick + +const PLAYER_SPEED = 100 +const BULLET_SPEED = 600 + +const WEAPON_DAMAGE = 5 + +const PLAYER_RADIUS = 50 +const BULLET_RADIUS = 10 + +export interface IVec2 { + x: number; + y: number +} + +interface IState { + players: IPlayer[], + bullets: IBullet[], + nextBulletId: number +} + +interface IPlayerMove { + type: InputType.PlayerMove + id: number; + direction: IVec2; + dt: number + +} + +interface IWeaponShoot { + type: InputType.WeaponShoot + owner: number; + position: IVec2; + direction: IVec2; +} + +interface ITimePast { + type: InputType.TimePast; + dt: number +} + +export default class DataManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + gm: BattleManager + jm: JoyStickManager + myPlayerId = 1 + + prefabMap: Map = new Map() + textureMap: Map = new Map() + + playerMap: Map = new Map() + bulletMap: Map = new Map() + + state: IState = { + players: [{ + id: 2, + nickname: "哈哈1", + position: { + x: -200, + y: -200 + }, + direction: { + x: 1, + y: 0 + }, + hp: 100, + type: EntityTypeEnum.Player1, + weaponType: EntityTypeEnum.Weapon1, + bulletType: EntityTypeEnum.Bullet1, + }, { + id: 1, + nickname: "哈哈2", + position: { + x: 200, + y: 200 + }, + direction: { + x: 0, + y: -1 + }, + hp: 100, + type: EntityTypeEnum.Player2, + weaponType: EntityTypeEnum.Weapon2, + bulletType: EntityTypeEnum.Bullet2, + }], + bullets: [], + nextBulletId: 1 + } + + applyInput(input: IPlayerMove | IWeaponShoot | ITimePast) { + switch (input.type) { + case InputType.PlayerMove: { + const { direction: { x, y }, dt, id } = input + const player = this.state.players.find(e => e.id === id) + if (!player) { + return + } + + player.position.x += x * PLAYER_SPEED * dt + player.position.y += y * PLAYER_SPEED * dt + + player.direction = { x, y } + + break + } + + case InputType.WeaponShoot: { + const { owner, position, direction } = input + const bullet: IBullet = { + id: this.state.nextBulletId++, + owner, + position, + direction, + type: this.playerMap.get(owner).bulletType + } + this.state.bullets.push(bullet) + + EventManager.Instance.emit(EventEnum.WeaponShoot, owner) + break + } + case InputType.TimePast: { + const { dt } = input + const { bullets, players } = this.state + + for (let i = bullets.length - 1; i >= 0; i--) { + const bullet = bullets[i]; + for (let j = players.length - 1; j >= 0; j--) { + const player = players[j]; + if (((player.position.x - bullet.position.x) ** 2 + (player.position.y - bullet.position.y) ** 2) < (PLAYER_RADIUS + BULLET_RADIUS) ** 2) { + EventManager.Instance.emit(EventEnum.Explosion, bullet.id, { + x: (player.position.x + bullet.position.x) / 2, + y: (player.position.y + bullet.position.y) / 2, + }) + + player.hp -= WEAPON_DAMAGE + bullets.splice(i, 1) + break + } + } + } + + for (const bullet of this.state.bullets) { + bullet.position.x += bullet.direction.x * BULLET_SPEED * dt + bullet.position.y += bullet.direction.y * BULLET_SPEED * dt + } + } + } + } +} diff --git a/client/assets/Scripts/Global/DataManager.ts.meta b/client/assets/Scripts/Global/DataManager.ts.meta new file mode 100644 index 0000000..59ef882 --- /dev/null +++ b/client/assets/Scripts/Global/DataManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "1682ed16-4e4f-46b3-8aca-92baecd30b9d", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/EventManager.ts b/client/assets/Scripts/Global/EventManager.ts new file mode 100644 index 0000000..12ff955 --- /dev/null +++ b/client/assets/Scripts/Global/EventManager.ts @@ -0,0 +1,42 @@ +import Singleton from '../Base/Singleton'; +import { EventEnum } from '../Enum'; + +interface IItem { + func: Function; + ctx: unknown; +} + +export default class EventManager extends Singleton { + static get Instance() { + return super.GetInstance(); + } + + private eventMap: Map> = new Map(); + + on(event: EventEnum, func: Function, ctx?: unknown) { + if (this.eventMap.has(event)) { + this.eventMap.get(event).push({ func, ctx }); + } else { + this.eventMap.set(event, [{ func, ctx }]); + } + } + + off(event: EventEnum, func: Function, ctx?: unknown) { + if (this.eventMap.has(event)) { + const index = this.eventMap.get(event).findIndex(i => func === i.func && i.ctx === ctx); + index > -1 && this.eventMap.get(event).splice(index, 1); + } + } + + emit(event: EventEnum, ...params: unknown[]) { + if (this.eventMap.has(event)) { + this.eventMap.get(event).forEach(({ func, ctx }) => { + ctx ? func.apply(ctx, params) : func(...params); + }); + } + } + + clear() { + this.eventMap.clear(); + } +} diff --git a/client/assets/Scripts/Global/EventManager.ts.meta b/client/assets/Scripts/Global/EventManager.ts.meta new file mode 100644 index 0000000..b29026a --- /dev/null +++ b/client/assets/Scripts/Global/EventManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "2aa2e7de-b014-4ee7-a537-4bc99dbf9164", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/NetworkManager.ts b/client/assets/Scripts/Global/NetworkManager.ts new file mode 100644 index 0000000..5534c34 --- /dev/null +++ b/client/assets/Scripts/Global/NetworkManager.ts @@ -0,0 +1,44 @@ +import Singleton from '../Base/Singleton' + +export default class NetworkManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + ws: WebSocket + port = 8888 + + connect() { + return new Promise((resolve, reject) => { + this.ws = new WebSocket(`ws://localhost:${this.port}`) + this.ws.onopen = () => { + console.log("ws onopen") + resolve(null) + } + + this.ws.onerror = () => { + console.log("ws onerror") + reject() + } + + this.ws.onclose = () => { + console.log("ws onclose") + reject() + } + + this.ws.onmessage = (data) => { + console.log("onmessage", data); + + } + }) + + } + + sendMsg(data) { + this.ws.send(data) + } + + async callApi(path: string) { + return await fetch(`http://localhost:${this.port}${path}`).then((res) => res.json()) + } +} diff --git a/client/assets/Scripts/Global/NetworkManager.ts.meta b/client/assets/Scripts/Global/NetworkManager.ts.meta new file mode 100644 index 0000000..c491434 --- /dev/null +++ b/client/assets/Scripts/Global/NetworkManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "588dfbf5-0456-472f-8382-746392fb1a06", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/ObjectPoolManager.ts b/client/assets/Scripts/Global/ObjectPoolManager.ts new file mode 100644 index 0000000..fa3f6cc --- /dev/null +++ b/client/assets/Scripts/Global/ObjectPoolManager.ts @@ -0,0 +1,52 @@ +import Singleton from '../Base/Singleton' +import { instantiate, Node, Prefab } from 'cc' +import { EntityTypeEnum } from '../Enum' +import DataManager from './DataManager' +import { ResourceManager } from './ResourceManager' + +export default class ObjectPoolManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + private objectPool: Node = null + private poolObjectMap: Map = new Map() + + private getObjectContainerName(objectName: EntityTypeEnum) { + return objectName + 'Pool' + } + + getPoolObject(objectName: EntityTypeEnum) { + if (this.objectPool === null) { + this.objectPool = new Node("ObjectPool") + this.objectPool.setParent(DataManager.Instance.gm.stage) + } + + if (!this.poolObjectMap.has(objectName)) { + this.poolObjectMap.set(objectName, []) + const container = new Node(this.getObjectContainerName(objectName)) + container.setParent(this.objectPool) + } + + let node: Node + const nodes = this.poolObjectMap.get(objectName) + const index = nodes.findIndex(node => node.active) + + if (index === -1) { + const prefab = DataManager.Instance.prefabMap.get(objectName) + node = instantiate(prefab) + node.name = objectName + node.setParent(this.objectPool.getChildByName(this.getObjectContainerName(objectName))) + } else { + node = nodes.splice(index, 1)[0] + } + node.active = true + return node + } + + returnPoolObject(object: Node) { + object.active = false + const objectName = object.name as EntityTypeEnum + this.poolObjectMap.get(objectName).push(object) + } +} diff --git a/client/assets/Scripts/Global/ObjectPoolManager.ts.meta b/client/assets/Scripts/Global/ObjectPoolManager.ts.meta new file mode 100644 index 0000000..b263a29 --- /dev/null +++ b/client/assets/Scripts/Global/ObjectPoolManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "01a37612-1a4a-45ee-8be8-3e3360996442", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Global/ResourceManager.ts b/client/assets/Scripts/Global/ResourceManager.ts new file mode 100644 index 0000000..af1b731 --- /dev/null +++ b/client/assets/Scripts/Global/ResourceManager.ts @@ -0,0 +1,32 @@ +import { _decorator, resources, SpriteFrame, Asset } from 'cc' +import Singleton from '../Base/Singleton' + +export class ResourceManager extends Singleton { + static get Instance() { + return super.GetInstance() + } + + loadRes(path: string, type: new (...args: any[]) => T) { + return new Promise((resolve, reject) => { + resources.load(path, type, (err, res) => { + if (err) { + reject(err) + return + } + resolve(res) + }) + }) + } + + loadDir(path: string, type: new (...args: any[]) => T) { + return new Promise((resolve, reject) => { + resources.loadDir(path, type, (err, res) => { + if (err) { + reject(err) + return + } + resolve(res) + }) + }) + } +} diff --git a/client/assets/Scripts/Global/ResourceManager.ts.meta b/client/assets/Scripts/Global/ResourceManager.ts.meta new file mode 100644 index 0000000..c70835e --- /dev/null +++ b/client/assets/Scripts/Global/ResourceManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "6278727d-3641-46d1-ae43-52b7829402d1", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Scene.meta b/client/assets/Scripts/Scene.meta new file mode 100644 index 0000000..93b167c --- /dev/null +++ b/client/assets/Scripts/Scene.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7129d004-4256-413c-a2e9-34ee8607d89d", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Scene/BattleManager.ts b/client/assets/Scripts/Scene/BattleManager.ts new file mode 100644 index 0000000..b26aa6c --- /dev/null +++ b/client/assets/Scripts/Scene/BattleManager.ts @@ -0,0 +1,156 @@ +import { _decorator, Component, Node, resources, Prefab, instantiate, Vec2, SpriteFrame } from 'cc'; +import { PlayerManager } from '../Entity/Player/PlayerManager'; +import DataManager from '../Global/DataManager'; +import { JoyStickManager } from '../UI/JoyStickManager'; +import { ResourceManager } from '../Global/ResourceManager'; +import { EntityTypeEnum, InputType, PrefabPathEnum, TexturePathEnum } from '../Enum'; +import NetworkManager from '../Global/NetworkManager'; +import ObjectPoolManager from '../Global/ObjectPoolManager'; +import { BulletManager } from '../Entity/Bullet/BulletManager'; + +const { ccclass, property, requireComponent } = _decorator; + +@ccclass('BattleManager') +export class BattleManager extends Component { + stage: Node + ui: Node + + isInited = false + + + onLoad() { + DataManager.Instance.gm = this + this.stage = this.node.getChildByName("Stage") + this.ui = this.node.getChildByName("UI") + } + + async start() { + this.clearGame() + await this.loadRes() + await this.initScene() + this.isInited = true + } + + clearGame() { + this.stage.destroyAllChildren() + this.ui.destroyAllChildren() + } + + async initScene() { + // await NetworkManager.Instance.connect() + // NetworkManager.Instance.sendMsg("我是客户端!!") + // const data = await NetworkManager.Instance.callApi("/join") + // console.log("data", data); + await Promise.all([ + this.initJoyStick(), + this.initFire(), + this.initMap(), + ]) + + } + + async loadRes() { + const list = [] + for (const type in PrefabPathEnum) { + const p = ResourceManager.Instance.loadRes(PrefabPathEnum[type], Prefab).then((prefab) => { + DataManager.Instance.prefabMap.set(type, prefab) + }) + list.push(p) + } + for (const type in TexturePathEnum) { + const p = ResourceManager.Instance.loadDir(TexturePathEnum[type], SpriteFrame).then((spriteFrames) => { + DataManager.Instance.textureMap.set(type, spriteFrames) + }) + list.push(p) + } + await Promise.all(list) + } + + + async initJoyStick() { + const joySitckPrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.JoyStick], Prefab) + const joySitck = instantiate(joySitckPrefab) + joySitck.setParent(this.ui) + const jm = DataManager.Instance.jm = joySitck.getComponent(JoyStickManager) + await jm.init() + } + + async initFire() { + const firePrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.Shoot], Prefab) + const fire = instantiate(firePrefab) + fire.setParent(this.ui) + } + + async initMap() { + const mapPrefab = await ResourceManager.Instance.loadRes(PrefabPathEnum[EntityTypeEnum.Map1], Prefab) + const map = instantiate(mapPrefab) + map.setParent(this.stage) + } + + update(dt: number) { + if (!this.isInited) { + return + } + this.render() + this.tick(dt) + } + + tick(dt: number) { + this.tickPlayer(dt) + + DataManager.Instance.applyInput({ + type: InputType.TimePast, + dt + }) + } + + tickPlayer(dt: number) { + const players = DataManager.Instance.state.players + + for (const p of players) { + const playerManager = DataManager.Instance.playerMap.get(p.id) + if (!playerManager) { + return + } + playerManager.tick(dt) + } + } + + render() { + this.renderPlayer() + this.renderBullet() + } + + renderPlayer() { + const players = DataManager.Instance.state.players + for (const p of players) { + let playerManager = DataManager.Instance.playerMap.get(p.id) + if (!playerManager) { + const playerPrefab = DataManager.Instance.prefabMap.get(p.type) + const player = instantiate(playerPrefab) + player.setParent(this.stage) + playerManager = player.addComponent(PlayerManager) + DataManager.Instance.playerMap.set(p.id, playerManager) + playerManager.init(p) + } else { + playerManager.render(p) + } + } + } + + renderBullet() { + const bullets = DataManager.Instance.state.bullets + for (const b of bullets) { + let bulletManager = DataManager.Instance.bulletMap.get(b.id) + if (!bulletManager) { + const bullet = ObjectPoolManager.Instance.getPoolObject(b.type) + bulletManager = bullet.getComponent(BulletManager) || bullet.addComponent(BulletManager) + DataManager.Instance.bulletMap.set(b.id, bulletManager) + bulletManager.init(b) + } else { + bulletManager.render(b) + } + } + } +} + diff --git a/client/assets/Scripts/Scene/BattleManager.ts.meta b/client/assets/Scripts/Scene/BattleManager.ts.meta new file mode 100644 index 0000000..41b4d00 --- /dev/null +++ b/client/assets/Scripts/Scene/BattleManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "d8c46424-e6ab-4d22-af07-293ce98d8b5b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/UI.meta b/client/assets/Scripts/UI.meta new file mode 100644 index 0000000..5036d1c --- /dev/null +++ b/client/assets/Scripts/UI.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "03ce230a-7d62-422c-b453-aafdbec11e91", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/UI/JoyStickManager.ts b/client/assets/Scripts/UI/JoyStickManager.ts new file mode 100644 index 0000000..20c75ae --- /dev/null +++ b/client/assets/Scripts/UI/JoyStickManager.ts @@ -0,0 +1,58 @@ +import { _decorator, Component, Node, input, Input, EventTouch, Vec2, Vec3, UITransform } from 'cc'; +const { ccclass, property } = _decorator; + +@ccclass('JoyStickManager') +export class JoyStickManager extends Component { + input: Vec2 = new Vec2(0, 0) + + private body: Node + private stick: Node + private touchStartPos: Vec2 + private defaultPos: Vec2 + private radius: number = 0 + + async init() { + this.body = this.node.getChildByName("Body") + this.stick = this.body.getChildByName("Stick") + const { x, y } = this.body.position + this.defaultPos = new Vec2(x, y) + this.radius = this.body.getComponent(UITransform).contentSize.x / 2 + + input.on(Input.EventType.TOUCH_START, this.onTouchMove, this); + input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); + input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this); + + } + + onDestroy() { + input.off(Input.EventType.TOUCH_START, this.onTouchMove, this); + input.off(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); + input.off(Input.EventType.TOUCH_END, this.onTouchEnd, this); + } + + onTouchMove(e: EventTouch) { + const touchPos = e.touch.getUILocation() + if (!this.touchStartPos) { + this.touchStartPos = touchPos.clone() + this.body.setPosition(this.touchStartPos.x, this.touchStartPos.y); + } + + const stickPos = new Vec2(touchPos.x - this.touchStartPos.x, touchPos.y - this.touchStartPos.y) + // const stickPos = new Vec2(0, touchPos.y - this.touchStartPos.y) + const len = stickPos.length() + if (len > this.radius) { + stickPos.multiplyScalar(this.radius / len) + } + + this.stick.setPosition(stickPos.x, stickPos.y) + this.input = stickPos.clone().normalize() + } + + onTouchEnd() { + this.body.setPosition(this.defaultPos.x, this.defaultPos.y) + this.stick.setPosition(0, 0) + this.touchStartPos = undefined + this.input = new Vec2(0, 0) + } +} + diff --git a/client/assets/Scripts/UI/JoyStickManager.ts.meta b/client/assets/Scripts/UI/JoyStickManager.ts.meta new file mode 100644 index 0000000..f144655 --- /dev/null +++ b/client/assets/Scripts/UI/JoyStickManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "bfc9a6e3-7ecf-4422-af5c-670bff4ec928", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/UI/ShootManager.ts b/client/assets/Scripts/UI/ShootManager.ts new file mode 100644 index 0000000..8d21fd9 --- /dev/null +++ b/client/assets/Scripts/UI/ShootManager.ts @@ -0,0 +1,13 @@ +import { _decorator, Component, Node } from 'cc'; +import { EventEnum } from '../Enum'; +import EventManager from '../Global/EventManager'; +const { ccclass, property } = _decorator; + +@ccclass('ShootManager') +export class ShootManager extends Component { + fire() { + EventManager.Instance.emit(EventEnum.ShootBtnClick) + } + +} + diff --git a/client/assets/Scripts/UI/ShootManager.ts.meta b/client/assets/Scripts/UI/ShootManager.ts.meta new file mode 100644 index 0000000..343e627 --- /dev/null +++ b/client/assets/Scripts/UI/ShootManager.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "f4c4bbdf-77d3-44a3-88c2-29f40401dab7", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/Scripts/Utils.meta b/client/assets/Scripts/Utils.meta new file mode 100644 index 0000000..0824e4d --- /dev/null +++ b/client/assets/Scripts/Utils.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "f395bd07-24d1-424e-bf3c-3276de3d9d22", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/Scripts/Utils/index.ts b/client/assets/Scripts/Utils/index.ts new file mode 100644 index 0000000..4fb3b2c --- /dev/null +++ b/client/assets/Scripts/Utils/index.ts @@ -0,0 +1,20 @@ +import { Layers, SpriteFrame, Node, UITransform } from "cc" + +const INDEX_REG = /\((\d+)\)/ + +const getNumberWithinString = (str: string) => parseInt(str.match(INDEX_REG)?.[1] || '0') + +export const sortSpriteFrame = (spriteFrame: Array) => + spriteFrame.sort((a, b) => getNumberWithinString(a.name) - getNumberWithinString(b.name)) + +const getUIMaskNumber = () => 1 << Layers.nameToLayer('UI_2D') + +export const createUINode = (name: string = '') => { + const node = new Node(name) + node.layer = getUIMaskNumber() + const transform = node.addComponent(UITransform) + return node +} + +export const rad2Angle = (rad: number) => rad / Math.PI * 180 + diff --git a/client/assets/Scripts/Utils/index.ts.meta b/client/assets/Scripts/Utils/index.ts.meta new file mode 100644 index 0000000..6d5f3d3 --- /dev/null +++ b/client/assets/Scripts/Utils/index.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "2e280f2e-52a3-465a-acf5-fb412ef51d6b", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/client/assets/resources.meta b/client/assets/resources.meta new file mode 100644 index 0000000..c90cefd --- /dev/null +++ b/client/assets/resources.meta @@ -0,0 +1,15 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "361398e8-25a2-4476-a5dd-833ff68e087b", + "files": [], + "subMetas": {}, + "userData": { + "isBundle": true, + "bundleName": "resources", + "priority": 8, + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/prefab.meta b/client/assets/resources/prefab.meta new file mode 100644 index 0000000..b9cbcdd --- /dev/null +++ b/client/assets/resources/prefab.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "35ebed99-20d7-4d22-b7af-28eeb7960a84", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/prefab/Bullet.prefab b/client/assets/resources/prefab/Bullet.prefab new file mode 100644 index 0000000..2a4c2aa --- /dev/null +++ b/client/assets/resources/prefab/Bullet.prefab @@ -0,0 +1,142 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Bullet", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Bullet", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 6 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 110.951, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "607/QqeHhEZJSeteJoUog1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f4rVayGkpKJq+xMADzqU5V" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bblSIxXVJAw4TCQ+fTNSBM" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Bullet.prefab.meta b/client/assets/resources/prefab/Bullet.prefab.meta new file mode 100644 index 0000000..8a3b186 --- /dev/null +++ b/client/assets/resources/prefab/Bullet.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "099548f8-37b4-475d-86df-9ad4a5ecfd77", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Bullet" + } +} diff --git a/client/assets/resources/prefab/Explosion.prefab b/client/assets/resources/prefab/Explosion.prefab new file mode 100644 index 0000000..8b24e75 --- /dev/null +++ b/client/assets/resources/prefab/Explosion.prefab @@ -0,0 +1,142 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Explosion", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Explosion", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 6 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 110.951, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "607/QqeHhEZJSeteJoUog1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f4rVayGkpKJq+xMADzqU5V" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bblSIxXVJAw4TCQ+fTNSBM" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Explosion.prefab.meta b/client/assets/resources/prefab/Explosion.prefab.meta new file mode 100644 index 0000000..25a32b0 --- /dev/null +++ b/client/assets/resources/prefab/Explosion.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "147de574-5396-440e-af4f-e4af24888059", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Explosion" + } +} diff --git a/client/assets/resources/prefab/JoyStick.prefab b/client/assets/resources/prefab/JoyStick.prefab new file mode 100644 index 0000000..fd10f3c --- /dev/null +++ b/client/assets/resources/prefab/JoyStick.prefab @@ -0,0 +1,580 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "JoyStick", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "JoyStick", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 22 + }, + { + "__id__": 24 + }, + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 28 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -480, + "y": -320, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 11 + } + ], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 150, + "y": 150, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Base", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6ejPyOfqRE25w9zJbDGdh3" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "396m9Nih1MWY7F/ybvFrtB" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 256, + "_originalHeight": 256, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8aBKAmKmJBXaZ2Dk38BikC" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2cvfYjo35GkoZTmD0R1ZON" + }, + { + "__type__": "cc.Node", + "_name": "Stick", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 16 + }, + "_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": 0.3, + "y": 0.3, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 256, + "height": 256 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68QvW/9ZZAdJjB1N+Guag4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@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": "0eWKGBz4ZAersuhv4N5kwz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d4qE3f1kdGBLQFmhtG8C+3" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e1c6xTNM1KiYCaRC1S5oje" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_alignFlags": 12, + "_target": null, + "_left": 50, + "_right": 0, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e48MgFyt9PBKx5Ys0BJg4L" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "87eH76xUVLFb6r1A+7tq4F" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "205oXiJoZHkaJi8XBhtLEO" + }, + { + "__type__": "bfc9abjfs9EIq9cZwv/Tsko", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "20KqWYRFJKzoRcoD115OfT" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 960, + "_originalHeight": 640, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "76WrdM2MBFXbRZNvn2wO8t" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "dcSQx/IBRN555vh0smiDUk" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/JoyStick.prefab.meta b/client/assets/resources/prefab/JoyStick.prefab.meta new file mode 100644 index 0000000..9810dd3 --- /dev/null +++ b/client/assets/resources/prefab/JoyStick.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "230d01f4-702b-4295-b34c-d87e25305d63", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "JoyStick" + } +} diff --git a/client/assets/resources/prefab/Map1.prefab b/client/assets/resources/prefab/Map1.prefab new file mode 100644 index 0000000..e6cc4fb --- /dev/null +++ b/client/assets/resources/prefab/Map1.prefab @@ -0,0 +1,180 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Map1", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Map1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + }, + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 8 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7ckWiSysVO96kRBBg+KESt" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 2, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "26C4/mRGRLBr2jAzW8ztmg" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1000, + "_originalHeight": 1000, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ecteqJwWZC+a13hCI929/h" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9dDZjW4/pG3qtXeK7m3DFi" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Map1.prefab.meta b/client/assets/resources/prefab/Map1.prefab.meta new file mode 100644 index 0000000..9a93cbb --- /dev/null +++ b/client/assets/resources/prefab/Map1.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "ab1c7b4f-35ac-4610-98a9-ea4b5b8170f8", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Map1" + } +} diff --git a/client/assets/resources/prefab/Player.prefab b/client/assets/resources/prefab/Player.prefab new file mode 100644 index 0000000..dce2fd4 --- /dev/null +++ b/client/assets/resources/prefab/Player.prefab @@ -0,0 +1,690 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Player", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Player", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 18 + }, + { + "__id__": 22 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + }, + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 32 + }, + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "HP", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + }, + { + "__id__": 15 + } + ], + "_prefab": { + "__id__": 17 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 70, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Bar", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -50, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6eSfVOfMxPjb1oQVZ1z5hY" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "267GXyiYJB6qxCg6pLEfLQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_alignFlags": 8, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "160ZgDPIFBEZ5Msv1mYMvN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "35OAlXyaBOBpLPAOKsDZHk" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ca65l+rt9Iz5il0zQDlfgE" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9fd900dd-221b-4f89-8f2c-fba34243c835@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "796J69Ia1LgrmmxsVBavZU" + }, + { + "__type__": "cc.ProgressBar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 16 + }, + "_barSprite": { + "__id__": 6 + }, + "_mode": 0, + "_totalLength": 100, + "_progress": 1, + "_reverse": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d2mnLSm7RHF7V3bD57PvC5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "29DaYGvxpFo5cOAmvhl1Uj" + }, + { + "__type__": "cc.Node", + "_name": "Nickname", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8blUJZ4nJKpKsLO2YpEChI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5adoggTLFPToeEZEIA7Yh3" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 25 + } + ], + "_prefab": { + "__id__": 27 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 98.845, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 24 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 110.72, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2a/IDEWZRPcb6AKU5/XAlD" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "nickname", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 0, + "_enableWrapText": true, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "71ZjYMvjBES7FqZGSo1L00" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "03OAmogbVI5qDqTUJvplOC" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 29 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43sIN2Al5OsJRxFqY+HJTV" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "48V6DZW5BPxIbiTPVjSL37" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "60xKi1fHZAl6spWUrSZzlZ" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Player.prefab.meta b/client/assets/resources/prefab/Player.prefab.meta new file mode 100644 index 0000000..841cff6 --- /dev/null +++ b/client/assets/resources/prefab/Player.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "d565d84f-56c4-4aa3-831c-99db0a0d2390", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Player" + } +} diff --git a/client/assets/resources/prefab/Shoot.prefab b/client/assets/resources/prefab/Shoot.prefab new file mode 100644 index 0000000..7351885 --- /dev/null +++ b/client/assets/resources/prefab/Shoot.prefab @@ -0,0 +1,275 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Shoot", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Shoot", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 4 + }, + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 13 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 330, + "y": -170, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 3 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3ayBLC6LxFz7oq0ZzKG3NX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 100 + }, + "_spriteFrame": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63G/jWiFtOYLM6CEMTwaZ5" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_alignFlags": 36, + "_target": null, + "_left": 0, + "_right": 50, + "_top": 0, + "_bottom": 50, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c6JBLKH2tKrZRkvm2uowFn" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "clickEvents": [ + { + "__id__": 10 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": null, + "_pressedSprite": null, + "_disabledSprite": null, + "_duration": 0.1, + "_zoomScale": 0.9, + "_target": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a6u7mmf6RAVatiJ06E5rQC" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "f4c4bvfd9NEo4jCKfQEAdq3", + "handler": "fire", + "customEventData": "" + }, + { + "__type__": "f4c4bvfd9NEo4jCKfQEAdq3", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "38y7yDAz5Eko6zTvyWDBpA" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a02fCGCDhFvIHiQOXl0NzD" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Shoot.prefab.meta b/client/assets/resources/prefab/Shoot.prefab.meta new file mode 100644 index 0000000..e62fc84 --- /dev/null +++ b/client/assets/resources/prefab/Shoot.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "3f74a43c-479b-49f2-b883-2caca4f6682c", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Shoot" + } +} diff --git a/client/assets/resources/prefab/Weapon1.prefab b/client/assets/resources/prefab/Weapon1.prefab new file mode 100644 index 0000000..c06be46 --- /dev/null +++ b/client/assets/resources/prefab/Weapon1.prefab @@ -0,0 +1,400 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Weapon1", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Weapon1", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 40, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Anchor", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 4 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Point", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 50, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "16I8wkBTxHDYkTYgfJ//ui" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bcdHkpaU9MH4VKR4D058ND" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_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": "60vCWjti5CdYgFsCeZ6W60" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "51ov0p6adLqbnI7tTBZry9" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0128A1bzNNoZ3uKCYWPXCq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "40OLWmzWlLCZT0MjYrvahg" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "55aZ32uotKq7UKJdoxzmU6" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30Yu+lKAtH7JhdCwKmj4Uz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b4iDImIiJBr625hlJDYo2e" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Weapon1.prefab.meta b/client/assets/resources/prefab/Weapon1.prefab.meta new file mode 100644 index 0000000..02267af --- /dev/null +++ b/client/assets/resources/prefab/Weapon1.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "0e6f92c7-02b3-408b-b756-2e0b4d4da977", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Weapon1" + } +} diff --git a/client/assets/resources/prefab/Weapon2.prefab b/client/assets/resources/prefab/Weapon2.prefab new file mode 100644 index 0000000..244d916 --- /dev/null +++ b/client/assets/resources/prefab/Weapon2.prefab @@ -0,0 +1,400 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Weapon2", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Node", + "_name": "Weapon2", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Body", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 50, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Anchor", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 4 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 10 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 5, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Point", + "_objFlags": 0, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 70, + "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 + }, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "7dUANOplxJlIsLcYO75CnZ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0eEUTI0i9ANLweIrxmY6dW" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_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": "16I8wkBTxHDYkTYgfJ//ui" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bcdHkpaU9MH4VKR4D058ND" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0128A1bzNNoZ3uKCYWPXCq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "40OLWmzWlLCZT0MjYrvahg" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "55aZ32uotKq7UKJdoxzmU6" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "30Yu+lKAtH7JhdCwKmj4Uz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b4iDImIiJBr625hlJDYo2e" + } +] \ No newline at end of file diff --git a/client/assets/resources/prefab/Weapon2.prefab.meta b/client/assets/resources/prefab/Weapon2.prefab.meta new file mode 100644 index 0000000..c822d3d --- /dev/null +++ b/client/assets/resources/prefab/Weapon2.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.39", + "importer": "prefab", + "imported": true, + "uuid": "e3554735-cb19-40d0-b167-0c607ce94392", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "Weapon2" + } +} diff --git a/client/assets/resources/texture.meta b/client/assets/resources/texture.meta new file mode 100644 index 0000000..b17038d --- /dev/null +++ b/client/assets/resources/texture.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "d7f1d6a2-3440-4dbb-aab0-6217739e019d", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bg.meta b/client/assets/resources/texture/bg.meta new file mode 100644 index 0000000..1ee1ce8 --- /dev/null +++ b/client/assets/resources/texture/bg.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "36488b93-05fd-4191-af7b-297d24da5847", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bg/tile.png b/client/assets/resources/texture/bg/tile.png new file mode 100644 index 0000000..796e59b Binary files /dev/null and b/client/assets/resources/texture/bg/tile.png differ diff --git a/client/assets/resources/texture/bg/tile.png.meta b/client/assets/resources/texture/bg/tile.png.meta new file mode 100644 index 0000000..36b94d0 --- /dev/null +++ b/client/assets/resources/texture/bg/tile.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "155ebd7e-9357-4155-acfc-fb5438af3d48", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "155ebd7e-9357-4155-acfc-fb5438af3d48@6c48a", + "displayName": "tile", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "155ebd7e-9357-4155-acfc-fb5438af3d48", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941", + "displayName": "tile", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 128, + "height": 128, + "rawWidth": 128, + "rawHeight": 128, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -64, + -64, + 0, + 64, + -64, + 0, + -64, + 64, + 0, + 64, + 64, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 128, + 128, + 128, + 0, + 0, + 128, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -64, + -64, + 0 + ], + "maxPos": [ + 64, + 64, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "155ebd7e-9357-4155-acfc-fb5438af3d48@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "155ebd7e-9357-4155-acfc-fb5438af3d48@f9941" + } +} diff --git a/client/assets/resources/texture/bullet.meta b/client/assets/resources/texture/bullet.meta new file mode 100644 index 0000000..ab731fa --- /dev/null +++ b/client/assets/resources/texture/bullet.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "a0a010bb-d1c0-4efa-a55f-ee60438f492e", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bullet/bullet1.meta b/client/assets/resources/texture/bullet/bullet1.meta new file mode 100644 index 0000000..5958bd8 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet1.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "fd66628c-bd95-4709-ab7d-a050731228e4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png b/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png new file mode 100644 index 0000000..0af43fb Binary files /dev/null and b/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png differ diff --git a/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta b/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta new file mode 100644 index 0000000..59847a9 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet1/bullet1 (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597@6c48a", + "displayName": "bullet1 (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "23c36f17-b533-41fc-ada4-4c3408ec5597", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941", + "displayName": "bullet1 (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "23c36f17-b533-41fc-ada4-4c3408ec5597@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "23c36f17-b533-41fc-ada4-4c3408ec5597@f9941" + } +} diff --git a/client/assets/resources/texture/bullet/bullet2.meta b/client/assets/resources/texture/bullet/bullet2.meta new file mode 100644 index 0000000..2c0b2f2 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet2.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7bc2b36a-1f9e-4c27-b679-7f78f1b9d8ed", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png new file mode 100644 index 0000000..a59c443 Binary files /dev/null and b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png differ diff --git a/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta new file mode 100644 index 0000000..0022781 --- /dev/null +++ b/client/assets/resources/texture/bullet/bullet2/bullet2 (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675@6c48a", + "displayName": "bullet2 (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "c15456b3-2df6-44f1-bb74-5fec2d554675", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "c15456b3-2df6-44f1-bb74-5fec2d554675@f9941", + "displayName": "bullet2 (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "c15456b3-2df6-44f1-bb74-5fec2d554675@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "c15456b3-2df6-44f1-bb74-5fec2d554675@f9941" + } +} diff --git a/client/assets/resources/texture/explosion.meta b/client/assets/resources/texture/explosion.meta new file mode 100644 index 0000000..c3f9b7c --- /dev/null +++ b/client/assets/resources/texture/explosion.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "fe6330d8-92bb-4d96-a162-30010e542247", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/explosion/explosion (1).png b/client/assets/resources/texture/explosion/explosion (1).png new file mode 100644 index 0000000..bf6242e Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (1).png differ diff --git a/client/assets/resources/texture/explosion/explosion (1).png.meta b/client/assets/resources/texture/explosion/explosion (1).png.meta new file mode 100644 index 0000000..9dd2b97 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@6c48a", + "displayName": "explosion (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941", + "displayName": "explosion (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "2c4e3bb3-7336-4d4e-a8d7-3eafa95d846f@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (2).png b/client/assets/resources/texture/explosion/explosion (2).png new file mode 100644 index 0000000..07d649c Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (2).png differ diff --git a/client/assets/resources/texture/explosion/explosion (2).png.meta b/client/assets/resources/texture/explosion/explosion (2).png.meta new file mode 100644 index 0000000..bff850c --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@6c48a", + "displayName": "explosion (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@f9941", + "displayName": "explosion (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "0d43b4ea-a63d-4ebd-a25b-a93f85f86af4@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (3).png b/client/assets/resources/texture/explosion/explosion (3).png new file mode 100644 index 0000000..ebf7874 Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (3).png differ diff --git a/client/assets/resources/texture/explosion/explosion (3).png.meta b/client/assets/resources/texture/explosion/explosion (3).png.meta new file mode 100644 index 0000000..849e283 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@6c48a", + "displayName": "explosion (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@f9941", + "displayName": "explosion (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "69cdfa26-ab4f-4836-a719-5cbfdd4ce626@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (4).png b/client/assets/resources/texture/explosion/explosion (4).png new file mode 100644 index 0000000..163e4d6 Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (4).png differ diff --git a/client/assets/resources/texture/explosion/explosion (4).png.meta b/client/assets/resources/texture/explosion/explosion (4).png.meta new file mode 100644 index 0000000..fb8c7bf --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "d0e55505-9d16-4c58-8769-69427fb8c951", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d0e55505-9d16-4c58-8769-69427fb8c951@6c48a", + "displayName": "explosion (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "d0e55505-9d16-4c58-8769-69427fb8c951", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "d0e55505-9d16-4c58-8769-69427fb8c951@f9941", + "displayName": "explosion (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "d0e55505-9d16-4c58-8769-69427fb8c951@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "d0e55505-9d16-4c58-8769-69427fb8c951@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (5).png b/client/assets/resources/texture/explosion/explosion (5).png new file mode 100644 index 0000000..559af5a Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (5).png differ diff --git a/client/assets/resources/texture/explosion/explosion (5).png.meta b/client/assets/resources/texture/explosion/explosion (5).png.meta new file mode 100644 index 0000000..f54e397 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "facbf03e-9de3-43de-a995-1888b494e0b9", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "facbf03e-9de3-43de-a995-1888b494e0b9@6c48a", + "displayName": "explosion (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "facbf03e-9de3-43de-a995-1888b494e0b9", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "facbf03e-9de3-43de-a995-1888b494e0b9@f9941", + "displayName": "explosion (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "facbf03e-9de3-43de-a995-1888b494e0b9@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "facbf03e-9de3-43de-a995-1888b494e0b9@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (6).png b/client/assets/resources/texture/explosion/explosion (6).png new file mode 100644 index 0000000..52926d0 Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (6).png differ diff --git a/client/assets/resources/texture/explosion/explosion (6).png.meta b/client/assets/resources/texture/explosion/explosion (6).png.meta new file mode 100644 index 0000000..04e4758 --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "f325e61c-afa9-4bed-a69d-bd8835d78629", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f325e61c-afa9-4bed-a69d-bd8835d78629@6c48a", + "displayName": "explosion (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f325e61c-afa9-4bed-a69d-bd8835d78629", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f325e61c-afa9-4bed-a69d-bd8835d78629@f9941", + "displayName": "explosion (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f325e61c-afa9-4bed-a69d-bd8835d78629@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "f325e61c-afa9-4bed-a69d-bd8835d78629@f9941" + } +} diff --git a/client/assets/resources/texture/explosion/explosion (7).png b/client/assets/resources/texture/explosion/explosion (7).png new file mode 100644 index 0000000..12a4002 Binary files /dev/null and b/client/assets/resources/texture/explosion/explosion (7).png differ diff --git a/client/assets/resources/texture/explosion/explosion (7).png.meta b/client/assets/resources/texture/explosion/explosion (7).png.meta new file mode 100644 index 0000000..a99722a --- /dev/null +++ b/client/assets/resources/texture/explosion/explosion (7).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "22cdc5d6-72e9-4c27-aaab-d8702321c131", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "22cdc5d6-72e9-4c27-aaab-d8702321c131@6c48a", + "displayName": "explosion (7)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "22cdc5d6-72e9-4c27-aaab-d8702321c131", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "22cdc5d6-72e9-4c27-aaab-d8702321c131@f9941", + "displayName": "explosion (7)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "22cdc5d6-72e9-4c27-aaab-d8702321c131@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "22cdc5d6-72e9-4c27-aaab-d8702321c131@f9941" + } +} diff --git a/client/assets/resources/texture/joystick.meta b/client/assets/resources/texture/joystick.meta new file mode 100644 index 0000000..171643c --- /dev/null +++ b/client/assets/resources/texture/joystick.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b2041c87-dac4-445e-a3ac-e6689804c3b4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/joystick/circle.png b/client/assets/resources/texture/joystick/circle.png new file mode 100644 index 0000000..d5bad8d Binary files /dev/null and b/client/assets/resources/texture/joystick/circle.png differ diff --git a/client/assets/resources/texture/joystick/circle.png.meta b/client/assets/resources/texture/joystick/circle.png.meta new file mode 100644 index 0000000..3019e6f --- /dev/null +++ b/client/assets/resources/texture/joystick/circle.png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@6c48a", + "displayName": "circle", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079", + "isUuid": true, + "visible": false, + "minfilter": "linear", + "magfilter": "linear", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941", + "displayName": "circle", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 256, + "height": 256, + "rawWidth": 256, + "rawHeight": 256, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -128, + -128, + 0, + 128, + -128, + 0, + -128, + 128, + 0, + 128, + 128, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 256, + 256, + 256, + 0, + 0, + 256, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -128, + -128, + 0 + ], + "maxPos": [ + 128, + 128, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "d9e82fae-bcb5-4fed-82a9-fbed98c5e079@f9941" + } +} diff --git a/client/assets/resources/texture/player.meta b/client/assets/resources/texture/player.meta new file mode 100644 index 0000000..a91e9e8 --- /dev/null +++ b/client/assets/resources/texture/player.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "4314662e-d411-4396-bd0a-ce13820a5745", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player1.meta b/client/assets/resources/texture/player/player1.meta new file mode 100644 index 0000000..fe0b34f --- /dev/null +++ b/client/assets/resources/texture/player/player1.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "458c6587-cf17-4ea1-8816-5319ffa4bec0", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player1/idle.meta b/client/assets/resources/texture/player/player1/idle.meta new file mode 100644 index 0000000..eb3a2fb --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "771d5be3-e4c5-43c9-9025-da4338f0bd9c", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (1).png b/client/assets/resources/texture/player/player1/idle/idle (1).png new file mode 100644 index 0000000..89d6ea3 Binary files /dev/null and b/client/assets/resources/texture/player/player1/idle/idle (1).png differ diff --git a/client/assets/resources/texture/player/player1/idle/idle (1).png.meta b/client/assets/resources/texture/player/player1/idle/idle (1).png.meta new file mode 100644 index 0000000..99d6d68 --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "f0f5e564-2d98-4de1-bb92-794eeb1acffc", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@6c48a", + "displayName": "idle (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f0f5e564-2d98-4de1-bb92-794eeb1acffc", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941", + "displayName": "idle (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "f0f5e564-2d98-4de1-bb92-794eeb1acffc@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (2).png b/client/assets/resources/texture/player/player1/idle/idle (2).png new file mode 100644 index 0000000..89d6ea3 Binary files /dev/null and b/client/assets/resources/texture/player/player1/idle/idle (2).png differ diff --git a/client/assets/resources/texture/player/player1/idle/idle (2).png.meta b/client/assets/resources/texture/player/player1/idle/idle (2).png.meta new file mode 100644 index 0000000..2ec5247 --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "948973f1-d0d7-4009-a6ac-b75d81682b06", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "948973f1-d0d7-4009-a6ac-b75d81682b06@6c48a", + "displayName": "idle (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "948973f1-d0d7-4009-a6ac-b75d81682b06", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "948973f1-d0d7-4009-a6ac-b75d81682b06@f9941", + "displayName": "idle (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "948973f1-d0d7-4009-a6ac-b75d81682b06@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "948973f1-d0d7-4009-a6ac-b75d81682b06@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (3).png b/client/assets/resources/texture/player/player1/idle/idle (3).png new file mode 100644 index 0000000..2c6384f Binary files /dev/null and b/client/assets/resources/texture/player/player1/idle/idle (3).png differ diff --git a/client/assets/resources/texture/player/player1/idle/idle (3).png.meta b/client/assets/resources/texture/player/player1/idle/idle (3).png.meta new file mode 100644 index 0000000..18c4664 --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@6c48a", + "displayName": "idle (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@f9941", + "displayName": "idle (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "fbd2f8e1-fcfb-4833-88f6-1d2aabc7d208@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (4).png b/client/assets/resources/texture/player/player1/idle/idle (4).png new file mode 100644 index 0000000..2c6384f Binary files /dev/null and b/client/assets/resources/texture/player/player1/idle/idle (4).png differ diff --git a/client/assets/resources/texture/player/player1/idle/idle (4).png.meta b/client/assets/resources/texture/player/player1/idle/idle (4).png.meta new file mode 100644 index 0000000..04d49dc --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@6c48a", + "displayName": "idle (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@f9941", + "displayName": "idle (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "3f793c28-7ba4-49a0-8bfd-f39c447a3d24@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (5).png b/client/assets/resources/texture/player/player1/idle/idle (5).png new file mode 100644 index 0000000..c1c809f Binary files /dev/null and b/client/assets/resources/texture/player/player1/idle/idle (5).png differ diff --git a/client/assets/resources/texture/player/player1/idle/idle (5).png.meta b/client/assets/resources/texture/player/player1/idle/idle (5).png.meta new file mode 100644 index 0000000..05b0bdc --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "48566660-84d3-45f0-9779-232d13bba3b4", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "48566660-84d3-45f0-9779-232d13bba3b4@6c48a", + "displayName": "idle (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "48566660-84d3-45f0-9779-232d13bba3b4", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "48566660-84d3-45f0-9779-232d13bba3b4@f9941", + "displayName": "idle (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "48566660-84d3-45f0-9779-232d13bba3b4@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "48566660-84d3-45f0-9779-232d13bba3b4@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/idle/idle (6).png b/client/assets/resources/texture/player/player1/idle/idle (6).png new file mode 100644 index 0000000..c1c809f Binary files /dev/null and b/client/assets/resources/texture/player/player1/idle/idle (6).png differ diff --git a/client/assets/resources/texture/player/player1/idle/idle (6).png.meta b/client/assets/resources/texture/player/player1/idle/idle (6).png.meta new file mode 100644 index 0000000..de4fedd --- /dev/null +++ b/client/assets/resources/texture/player/player1/idle/idle (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "1c6c1425-ca03-45c3-b9b3-01ad71034032", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "1c6c1425-ca03-45c3-b9b3-01ad71034032@6c48a", + "displayName": "idle (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "1c6c1425-ca03-45c3-b9b3-01ad71034032", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "1c6c1425-ca03-45c3-b9b3-01ad71034032@f9941", + "displayName": "idle (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "1c6c1425-ca03-45c3-b9b3-01ad71034032@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "1c6c1425-ca03-45c3-b9b3-01ad71034032@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run.meta b/client/assets/resources/texture/player/player1/run.meta new file mode 100644 index 0000000..996f560 --- /dev/null +++ b/client/assets/resources/texture/player/player1/run.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "977efd2e-276e-4c70-81c1-e539532a595b", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (1).png b/client/assets/resources/texture/player/player1/run/run (1).png new file mode 100644 index 0000000..10e7fe0 Binary files /dev/null and b/client/assets/resources/texture/player/player1/run/run (1).png differ diff --git a/client/assets/resources/texture/player/player1/run/run (1).png.meta b/client/assets/resources/texture/player/player1/run/run (1).png.meta new file mode 100644 index 0000000..e9e016e --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "030f870c-7083-4e63-af9c-0c8e4406b231", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "030f870c-7083-4e63-af9c-0c8e4406b231@6c48a", + "displayName": "run (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "030f870c-7083-4e63-af9c-0c8e4406b231", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "030f870c-7083-4e63-af9c-0c8e4406b231@f9941", + "displayName": "run (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "030f870c-7083-4e63-af9c-0c8e4406b231@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "030f870c-7083-4e63-af9c-0c8e4406b231@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (2).png b/client/assets/resources/texture/player/player1/run/run (2).png new file mode 100644 index 0000000..9ba3d37 Binary files /dev/null and b/client/assets/resources/texture/player/player1/run/run (2).png differ diff --git a/client/assets/resources/texture/player/player1/run/run (2).png.meta b/client/assets/resources/texture/player/player1/run/run (2).png.meta new file mode 100644 index 0000000..186d35e --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "38dbf9d6-4b70-4898-a328-ae498501ddbd", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "38dbf9d6-4b70-4898-a328-ae498501ddbd@6c48a", + "displayName": "run (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "38dbf9d6-4b70-4898-a328-ae498501ddbd", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "38dbf9d6-4b70-4898-a328-ae498501ddbd@f9941", + "displayName": "run (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "38dbf9d6-4b70-4898-a328-ae498501ddbd@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "38dbf9d6-4b70-4898-a328-ae498501ddbd@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (3).png b/client/assets/resources/texture/player/player1/run/run (3).png new file mode 100644 index 0000000..2946658 Binary files /dev/null and b/client/assets/resources/texture/player/player1/run/run (3).png differ diff --git a/client/assets/resources/texture/player/player1/run/run (3).png.meta b/client/assets/resources/texture/player/player1/run/run (3).png.meta new file mode 100644 index 0000000..61e918e --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "07c0120a-620d-4d1d-b128-a2ffebffb96b", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "07c0120a-620d-4d1d-b128-a2ffebffb96b@6c48a", + "displayName": "run (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "07c0120a-620d-4d1d-b128-a2ffebffb96b", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "07c0120a-620d-4d1d-b128-a2ffebffb96b@f9941", + "displayName": "run (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "07c0120a-620d-4d1d-b128-a2ffebffb96b@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "07c0120a-620d-4d1d-b128-a2ffebffb96b@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (4).png b/client/assets/resources/texture/player/player1/run/run (4).png new file mode 100644 index 0000000..a5c4e0b Binary files /dev/null and b/client/assets/resources/texture/player/player1/run/run (4).png differ diff --git a/client/assets/resources/texture/player/player1/run/run (4).png.meta b/client/assets/resources/texture/player/player1/run/run (4).png.meta new file mode 100644 index 0000000..cab33ab --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "06848286-3132-4ffa-bd9c-eba5eefd6ffe", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "06848286-3132-4ffa-bd9c-eba5eefd6ffe@6c48a", + "displayName": "run (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "06848286-3132-4ffa-bd9c-eba5eefd6ffe", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "06848286-3132-4ffa-bd9c-eba5eefd6ffe@f9941", + "displayName": "run (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "06848286-3132-4ffa-bd9c-eba5eefd6ffe@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "06848286-3132-4ffa-bd9c-eba5eefd6ffe@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (5).png b/client/assets/resources/texture/player/player1/run/run (5).png new file mode 100644 index 0000000..4f40c2e Binary files /dev/null and b/client/assets/resources/texture/player/player1/run/run (5).png differ diff --git a/client/assets/resources/texture/player/player1/run/run (5).png.meta b/client/assets/resources/texture/player/player1/run/run (5).png.meta new file mode 100644 index 0000000..dbbc533 --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "b545a1fc-5a8d-4b87-9f08-58193ef8f8a3", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "b545a1fc-5a8d-4b87-9f08-58193ef8f8a3@6c48a", + "displayName": "run (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "b545a1fc-5a8d-4b87-9f08-58193ef8f8a3", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "b545a1fc-5a8d-4b87-9f08-58193ef8f8a3@f9941", + "displayName": "run (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "b545a1fc-5a8d-4b87-9f08-58193ef8f8a3@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "b545a1fc-5a8d-4b87-9f08-58193ef8f8a3@f9941" + } +} diff --git a/client/assets/resources/texture/player/player1/run/run (6).png b/client/assets/resources/texture/player/player1/run/run (6).png new file mode 100644 index 0000000..a7c31f5 Binary files /dev/null and b/client/assets/resources/texture/player/player1/run/run (6).png differ diff --git a/client/assets/resources/texture/player/player1/run/run (6).png.meta b/client/assets/resources/texture/player/player1/run/run (6).png.meta new file mode 100644 index 0000000..710e7d6 --- /dev/null +++ b/client/assets/resources/texture/player/player1/run/run (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "98e36b14-a53b-4cdb-9787-4aac1911fa7c", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "98e36b14-a53b-4cdb-9787-4aac1911fa7c@6c48a", + "displayName": "run (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "98e36b14-a53b-4cdb-9787-4aac1911fa7c", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "98e36b14-a53b-4cdb-9787-4aac1911fa7c@f9941", + "displayName": "run (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "98e36b14-a53b-4cdb-9787-4aac1911fa7c@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "98e36b14-a53b-4cdb-9787-4aac1911fa7c@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2.meta b/client/assets/resources/texture/player/player2.meta new file mode 100644 index 0000000..093c18b --- /dev/null +++ b/client/assets/resources/texture/player/player2.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "d539fe31-35be-459b-af9e-b1c5ce8049dd", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player2/idle.meta b/client/assets/resources/texture/player/player2/idle.meta new file mode 100644 index 0000000..8e3dba9 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "a2fc4f9e-f98d-42df-b47c-42c5d6c60eb4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (1).png b/client/assets/resources/texture/player/player2/idle/idle (1).png new file mode 100644 index 0000000..704b85d Binary files /dev/null and b/client/assets/resources/texture/player/player2/idle/idle (1).png differ diff --git a/client/assets/resources/texture/player/player2/idle/idle (1).png.meta b/client/assets/resources/texture/player/player2/idle/idle (1).png.meta new file mode 100644 index 0000000..d31073d --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "4bcec6e4-8ae3-4dc6-b680-230fb0e5cba1", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "4bcec6e4-8ae3-4dc6-b680-230fb0e5cba1@6c48a", + "displayName": "idle (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "4bcec6e4-8ae3-4dc6-b680-230fb0e5cba1", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "4bcec6e4-8ae3-4dc6-b680-230fb0e5cba1@f9941", + "displayName": "idle (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "4bcec6e4-8ae3-4dc6-b680-230fb0e5cba1@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "4bcec6e4-8ae3-4dc6-b680-230fb0e5cba1@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (2).png b/client/assets/resources/texture/player/player2/idle/idle (2).png new file mode 100644 index 0000000..704b85d Binary files /dev/null and b/client/assets/resources/texture/player/player2/idle/idle (2).png differ diff --git a/client/assets/resources/texture/player/player2/idle/idle (2).png.meta b/client/assets/resources/texture/player/player2/idle/idle (2).png.meta new file mode 100644 index 0000000..16a87c7 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "859e1dcd-5f25-46ce-bfb2-2fce53acd3ab", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "859e1dcd-5f25-46ce-bfb2-2fce53acd3ab@6c48a", + "displayName": "idle (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "859e1dcd-5f25-46ce-bfb2-2fce53acd3ab", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "859e1dcd-5f25-46ce-bfb2-2fce53acd3ab@f9941", + "displayName": "idle (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "859e1dcd-5f25-46ce-bfb2-2fce53acd3ab@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "859e1dcd-5f25-46ce-bfb2-2fce53acd3ab@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (3).png b/client/assets/resources/texture/player/player2/idle/idle (3).png new file mode 100644 index 0000000..86ab8d8 Binary files /dev/null and b/client/assets/resources/texture/player/player2/idle/idle (3).png differ diff --git a/client/assets/resources/texture/player/player2/idle/idle (3).png.meta b/client/assets/resources/texture/player/player2/idle/idle (3).png.meta new file mode 100644 index 0000000..6176648 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "8e5e2721-dd1b-4104-a176-e8724688e705", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "8e5e2721-dd1b-4104-a176-e8724688e705@6c48a", + "displayName": "idle (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "8e5e2721-dd1b-4104-a176-e8724688e705", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "8e5e2721-dd1b-4104-a176-e8724688e705@f9941", + "displayName": "idle (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "8e5e2721-dd1b-4104-a176-e8724688e705@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "8e5e2721-dd1b-4104-a176-e8724688e705@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (4).png b/client/assets/resources/texture/player/player2/idle/idle (4).png new file mode 100644 index 0000000..068a438 Binary files /dev/null and b/client/assets/resources/texture/player/player2/idle/idle (4).png differ diff --git a/client/assets/resources/texture/player/player2/idle/idle (4).png.meta b/client/assets/resources/texture/player/player2/idle/idle (4).png.meta new file mode 100644 index 0000000..4fd6744 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@6c48a", + "displayName": "idle (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@f9941", + "displayName": "idle (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "ad1888b4-e372-4e48-bbeb-5f33b0fb50bf@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (5).png b/client/assets/resources/texture/player/player2/idle/idle (5).png new file mode 100644 index 0000000..48563a2 Binary files /dev/null and b/client/assets/resources/texture/player/player2/idle/idle (5).png differ diff --git a/client/assets/resources/texture/player/player2/idle/idle (5).png.meta b/client/assets/resources/texture/player/player2/idle/idle (5).png.meta new file mode 100644 index 0000000..bf0d5d1 --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "42bedea5-98e7-4c7c-bba4-2733775c4d1b", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@6c48a", + "displayName": "idle (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "42bedea5-98e7-4c7c-bba4-2733775c4d1b", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@f9941", + "displayName": "idle (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "42bedea5-98e7-4c7c-bba4-2733775c4d1b@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/idle/idle (6).png b/client/assets/resources/texture/player/player2/idle/idle (6).png new file mode 100644 index 0000000..48563a2 Binary files /dev/null and b/client/assets/resources/texture/player/player2/idle/idle (6).png differ diff --git a/client/assets/resources/texture/player/player2/idle/idle (6).png.meta b/client/assets/resources/texture/player/player2/idle/idle (6).png.meta new file mode 100644 index 0000000..84e593f --- /dev/null +++ b/client/assets/resources/texture/player/player2/idle/idle (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@6c48a", + "displayName": "idle (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@f9941", + "displayName": "idle (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "a70a2ba8-14bc-4613-a6bf-e914fca9ae9a@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run.meta b/client/assets/resources/texture/player/player2/run.meta new file mode 100644 index 0000000..82d5618 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "c957e484-e081-4832-a24d-6541bd2f40d4", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (1).png b/client/assets/resources/texture/player/player2/run/run (1).png new file mode 100644 index 0000000..6dbd81d Binary files /dev/null and b/client/assets/resources/texture/player/player2/run/run (1).png differ diff --git a/client/assets/resources/texture/player/player2/run/run (1).png.meta b/client/assets/resources/texture/player/player2/run/run (1).png.meta new file mode 100644 index 0000000..9649bc2 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "089afa87-f56d-4038-950c-0a3c3d625b43", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "089afa87-f56d-4038-950c-0a3c3d625b43@6c48a", + "displayName": "run (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "089afa87-f56d-4038-950c-0a3c3d625b43", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "089afa87-f56d-4038-950c-0a3c3d625b43@f9941", + "displayName": "run (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "089afa87-f56d-4038-950c-0a3c3d625b43@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "089afa87-f56d-4038-950c-0a3c3d625b43@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (2).png b/client/assets/resources/texture/player/player2/run/run (2).png new file mode 100644 index 0000000..57ddc1f Binary files /dev/null and b/client/assets/resources/texture/player/player2/run/run (2).png differ diff --git a/client/assets/resources/texture/player/player2/run/run (2).png.meta b/client/assets/resources/texture/player/player2/run/run (2).png.meta new file mode 100644 index 0000000..4bd5087 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "dde508f5-9208-42ee-aa19-e388489f0d5d", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "dde508f5-9208-42ee-aa19-e388489f0d5d@6c48a", + "displayName": "run (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "dde508f5-9208-42ee-aa19-e388489f0d5d", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "dde508f5-9208-42ee-aa19-e388489f0d5d@f9941", + "displayName": "run (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "dde508f5-9208-42ee-aa19-e388489f0d5d@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "dde508f5-9208-42ee-aa19-e388489f0d5d@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (3).png b/client/assets/resources/texture/player/player2/run/run (3).png new file mode 100644 index 0000000..f739823 Binary files /dev/null and b/client/assets/resources/texture/player/player2/run/run (3).png differ diff --git a/client/assets/resources/texture/player/player2/run/run (3).png.meta b/client/assets/resources/texture/player/player2/run/run (3).png.meta new file mode 100644 index 0000000..0f1eada --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "547581ee-f0ef-4cc0-a168-1a821008dc00", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "547581ee-f0ef-4cc0-a168-1a821008dc00@6c48a", + "displayName": "run (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "547581ee-f0ef-4cc0-a168-1a821008dc00", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "547581ee-f0ef-4cc0-a168-1a821008dc00@f9941", + "displayName": "run (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "547581ee-f0ef-4cc0-a168-1a821008dc00@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "547581ee-f0ef-4cc0-a168-1a821008dc00@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (4).png b/client/assets/resources/texture/player/player2/run/run (4).png new file mode 100644 index 0000000..72ab094 Binary files /dev/null and b/client/assets/resources/texture/player/player2/run/run (4).png differ diff --git a/client/assets/resources/texture/player/player2/run/run (4).png.meta b/client/assets/resources/texture/player/player2/run/run (4).png.meta new file mode 100644 index 0000000..3250f70 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@6c48a", + "displayName": "run (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@f9941", + "displayName": "run (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "2f8cf8e1-92d9-422b-9ccb-444e0d7578e5@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (5).png b/client/assets/resources/texture/player/player2/run/run (5).png new file mode 100644 index 0000000..e4ed8ac Binary files /dev/null and b/client/assets/resources/texture/player/player2/run/run (5).png differ diff --git a/client/assets/resources/texture/player/player2/run/run (5).png.meta b/client/assets/resources/texture/player/player2/run/run (5).png.meta new file mode 100644 index 0000000..f6bd947 --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "ba54e885-1a08-47f1-b009-83b2763e209c", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "ba54e885-1a08-47f1-b009-83b2763e209c@6c48a", + "displayName": "run (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "ba54e885-1a08-47f1-b009-83b2763e209c", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "ba54e885-1a08-47f1-b009-83b2763e209c@f9941", + "displayName": "run (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "ba54e885-1a08-47f1-b009-83b2763e209c@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "ba54e885-1a08-47f1-b009-83b2763e209c@f9941" + } +} diff --git a/client/assets/resources/texture/player/player2/run/run (6).png b/client/assets/resources/texture/player/player2/run/run (6).png new file mode 100644 index 0000000..019298f Binary files /dev/null and b/client/assets/resources/texture/player/player2/run/run (6).png differ diff --git a/client/assets/resources/texture/player/player2/run/run (6).png.meta b/client/assets/resources/texture/player/player2/run/run (6).png.meta new file mode 100644 index 0000000..cfbae8c --- /dev/null +++ b/client/assets/resources/texture/player/player2/run/run (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@6c48a", + "displayName": "run (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@f9941", + "displayName": "run (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "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": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "0ce683e1-3afe-44ff-b24f-0be7ae40e49a@f9941" + } +} diff --git a/client/assets/resources/texture/weapon.meta b/client/assets/resources/texture/weapon.meta new file mode 100644 index 0000000..07f612b --- /dev/null +++ b/client/assets/resources/texture/weapon.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "c3b32cc3-fa22-4efd-a481-c5876d5cced3", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1.meta b/client/assets/resources/texture/weapon/weapon1.meta new file mode 100644 index 0000000..9850646 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "fb8659d0-2770-4f82-bfb4-2bd2c183f241", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack.meta b/client/assets/resources/texture/weapon/weapon1/attack.meta new file mode 100644 index 0000000..6c6a897 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "0ed73ab4-b2c1-4624-a5b8-c5f31394d8fa", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png new file mode 100644 index 0000000..f31fdea Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta new file mode 100644 index 0000000..0e457e7 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "2c2efb05-aaa7-4c95-8186-f16a448171aa", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "2c2efb05-aaa7-4c95-8186-f16a448171aa@6c48a", + "displayName": "attack (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "2c2efb05-aaa7-4c95-8186-f16a448171aa", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "2c2efb05-aaa7-4c95-8186-f16a448171aa@f9941", + "displayName": "attack (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "2c2efb05-aaa7-4c95-8186-f16a448171aa@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "2c2efb05-aaa7-4c95-8186-f16a448171aa@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png new file mode 100644 index 0000000..70c59bc Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png.meta new file mode 100644 index 0000000..721213a --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "d66a025a-0288-4cc4-88dd-7e3f5d75feef", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d66a025a-0288-4cc4-88dd-7e3f5d75feef@6c48a", + "displayName": "attack (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "d66a025a-0288-4cc4-88dd-7e3f5d75feef", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "d66a025a-0288-4cc4-88dd-7e3f5d75feef@f9941", + "displayName": "attack (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "d66a025a-0288-4cc4-88dd-7e3f5d75feef@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "d66a025a-0288-4cc4-88dd-7e3f5d75feef@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png new file mode 100644 index 0000000..79ef5e1 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta new file mode 100644 index 0000000..4134d64 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@6c48a", + "displayName": "attack (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@f9941", + "displayName": "attack (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "bb13c3df-251c-4b9b-a7e9-520ef89b6be6@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png new file mode 100644 index 0000000..0c4d3fa Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta new file mode 100644 index 0000000..db27f74 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "717f9b68-fbe2-4f31-ac87-476fa2875f1e", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@6c48a", + "displayName": "attack (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "717f9b68-fbe2-4f31-ac87-476fa2875f1e", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@f9941", + "displayName": "attack (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "717f9b68-fbe2-4f31-ac87-476fa2875f1e@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png new file mode 100644 index 0000000..6c08308 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta new file mode 100644 index 0000000..4cf94af --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "ee283844-4937-4d21-9cb2-41e66321215a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "ee283844-4937-4d21-9cb2-41e66321215a@6c48a", + "displayName": "attack (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "ee283844-4937-4d21-9cb2-41e66321215a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "ee283844-4937-4d21-9cb2-41e66321215a@f9941", + "displayName": "attack (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "ee283844-4937-4d21-9cb2-41e66321215a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "ee283844-4937-4d21-9cb2-41e66321215a@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png new file mode 100644 index 0000000..cc205a9 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png.meta new file mode 100644 index 0000000..e6185d4 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "438fb15a-1e67-4cea-b018-940687e073b4", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "438fb15a-1e67-4cea-b018-940687e073b4@6c48a", + "displayName": "attack (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "438fb15a-1e67-4cea-b018-940687e073b4", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "438fb15a-1e67-4cea-b018-940687e073b4@f9941", + "displayName": "attack (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "438fb15a-1e67-4cea-b018-940687e073b4@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "438fb15a-1e67-4cea-b018-940687e073b4@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png b/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png new file mode 100644 index 0000000..a62b7ad Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta b/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta new file mode 100644 index 0000000..01c3a97 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/attack/attack (7).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "05abc781-c414-41cf-8961-6a28a689e011", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "05abc781-c414-41cf-8961-6a28a689e011@6c48a", + "displayName": "attack (7)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "05abc781-c414-41cf-8961-6a28a689e011", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "05abc781-c414-41cf-8961-6a28a689e011@f9941", + "displayName": "attack (7)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "05abc781-c414-41cf-8961-6a28a689e011@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "05abc781-c414-41cf-8961-6a28a689e011@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/idle.meta b/client/assets/resources/texture/weapon/weapon1/idle.meta new file mode 100644 index 0000000..49160e6 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/idle.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7b876fea-1bd1-41a0-93a8-bd20d64d7bc3", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png new file mode 100644 index 0000000..2b4aa1d Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png differ diff --git a/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta new file mode 100644 index 0000000..4b8c260 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon1/idle/idle (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "f815a77d-5654-4a6a-86ef-be8f1efaa95e", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@6c48a", + "displayName": "idle (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "f815a77d-5654-4a6a-86ef-be8f1efaa95e", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941", + "displayName": "idle (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "f815a77d-5654-4a6a-86ef-be8f1efaa95e@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2.meta b/client/assets/resources/texture/weapon/weapon2.meta new file mode 100644 index 0000000..3dcbcf0 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "7249fc9e-d7c5-4ecf-b450-99ae0a17c417", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack.meta b/client/assets/resources/texture/weapon/weapon2/attack.meta new file mode 100644 index 0000000..0d4e72c --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "b82f00e2-ef64-4845-9455-b855caa49483", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png new file mode 100644 index 0000000..ab4b030 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png.meta new file mode 100644 index 0000000..0ece58e --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "b2fd4156-6559-4260-800e-fa0cc22a8d50", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "b2fd4156-6559-4260-800e-fa0cc22a8d50@6c48a", + "displayName": "attack (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "b2fd4156-6559-4260-800e-fa0cc22a8d50", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "b2fd4156-6559-4260-800e-fa0cc22a8d50@f9941", + "displayName": "attack (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "b2fd4156-6559-4260-800e-fa0cc22a8d50@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "b2fd4156-6559-4260-800e-fa0cc22a8d50@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (2).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (2).png new file mode 100644 index 0000000..db40407 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (2).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (2).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (2).png.meta new file mode 100644 index 0000000..49a606c --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (2).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "c981c147-7e05-464f-a119-287ba2173e76", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "c981c147-7e05-464f-a119-287ba2173e76@6c48a", + "displayName": "attack (2)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "c981c147-7e05-464f-a119-287ba2173e76", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "c981c147-7e05-464f-a119-287ba2173e76@f9941", + "displayName": "attack (2)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "c981c147-7e05-464f-a119-287ba2173e76@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "c981c147-7e05-464f-a119-287ba2173e76@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (3).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (3).png new file mode 100644 index 0000000..49d16f6 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (3).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (3).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (3).png.meta new file mode 100644 index 0000000..20a92b3 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (3).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "290e9ccf-fcf7-4de1-9fbd-087f099ff28a", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "290e9ccf-fcf7-4de1-9fbd-087f099ff28a@6c48a", + "displayName": "attack (3)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "290e9ccf-fcf7-4de1-9fbd-087f099ff28a", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "290e9ccf-fcf7-4de1-9fbd-087f099ff28a@f9941", + "displayName": "attack (3)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "290e9ccf-fcf7-4de1-9fbd-087f099ff28a@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "290e9ccf-fcf7-4de1-9fbd-087f099ff28a@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png new file mode 100644 index 0000000..81be630 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta new file mode 100644 index 0000000..2bb1d53 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (4).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "57693857-efef-407b-b05a-3fa03e2c15a1", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "57693857-efef-407b-b05a-3fa03e2c15a1@6c48a", + "displayName": "attack (4)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "57693857-efef-407b-b05a-3fa03e2c15a1", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "57693857-efef-407b-b05a-3fa03e2c15a1@f9941", + "displayName": "attack (4)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "57693857-efef-407b-b05a-3fa03e2c15a1@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "57693857-efef-407b-b05a-3fa03e2c15a1@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png new file mode 100644 index 0000000..283466f Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta new file mode 100644 index 0000000..da06a55 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (5).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "037bbd7b-863b-458a-9e82-af4344212b37", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "037bbd7b-863b-458a-9e82-af4344212b37@6c48a", + "displayName": "attack (5)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "037bbd7b-863b-458a-9e82-af4344212b37", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "037bbd7b-863b-458a-9e82-af4344212b37@f9941", + "displayName": "attack (5)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "037bbd7b-863b-458a-9e82-af4344212b37@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "037bbd7b-863b-458a-9e82-af4344212b37@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png new file mode 100644 index 0000000..c128cc3 Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png.meta new file mode 100644 index 0000000..4046517 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (6).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "fc7dd2b7-952e-4374-ae20-12b482325942", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "fc7dd2b7-952e-4374-ae20-12b482325942@6c48a", + "displayName": "attack (6)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "fc7dd2b7-952e-4374-ae20-12b482325942", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "fc7dd2b7-952e-4374-ae20-12b482325942@f9941", + "displayName": "attack (6)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "fc7dd2b7-952e-4374-ae20-12b482325942@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "fc7dd2b7-952e-4374-ae20-12b482325942@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (7).png b/client/assets/resources/texture/weapon/weapon2/attack/attack (7).png new file mode 100644 index 0000000..9ced9cb Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/attack/attack (7).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/attack/attack (7).png.meta b/client/assets/resources/texture/weapon/weapon2/attack/attack (7).png.meta new file mode 100644 index 0000000..efa680e --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/attack/attack (7).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "20184d5d-69fc-4bd1-9ba7-c556a212397d", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "20184d5d-69fc-4bd1-9ba7-c556a212397d@6c48a", + "displayName": "attack (7)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "20184d5d-69fc-4bd1-9ba7-c556a212397d", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "20184d5d-69fc-4bd1-9ba7-c556a212397d@f9941", + "displayName": "attack (7)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "20184d5d-69fc-4bd1-9ba7-c556a212397d@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "20184d5d-69fc-4bd1-9ba7-c556a212397d@f9941" + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/idle.meta b/client/assets/resources/texture/weapon/weapon2/idle.meta new file mode 100644 index 0000000..1fbfb36 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/idle.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.0", + "importer": "directory", + "imported": true, + "uuid": "6248c4f2-da4b-42af-99f1-a929b1c32404", + "files": [], + "subMetas": {}, + "userData": { + "compressionType": {}, + "isRemoteBundle": {} + } +} diff --git a/client/assets/resources/texture/weapon/weapon2/idle/idle (1).png b/client/assets/resources/texture/weapon/weapon2/idle/idle (1).png new file mode 100644 index 0000000..e96edbd Binary files /dev/null and b/client/assets/resources/texture/weapon/weapon2/idle/idle (1).png differ diff --git a/client/assets/resources/texture/weapon/weapon2/idle/idle (1).png.meta b/client/assets/resources/texture/weapon/weapon2/idle/idle (1).png.meta new file mode 100644 index 0000000..1c19848 --- /dev/null +++ b/client/assets/resources/texture/weapon/weapon2/idle/idle (1).png.meta @@ -0,0 +1,134 @@ +{ + "ver": "1.0.24", + "importer": "image", + "imported": true, + "uuid": "d6c248fd-c31d-475f-948a-be099aca55d3", + "files": [ + ".json", + ".png" + ], + "subMetas": { + "6c48a": { + "importer": "texture", + "uuid": "d6c248fd-c31d-475f-948a-be099aca55d3@6c48a", + "displayName": "idle (1)", + "id": "6c48a", + "name": "texture", + "userData": { + "wrapModeS": "clamp-to-edge", + "wrapModeT": "clamp-to-edge", + "imageUuidOrDatabaseUri": "d6c248fd-c31d-475f-948a-be099aca55d3", + "isUuid": true, + "visible": false, + "minfilter": "nearest", + "magfilter": "nearest", + "mipfilter": "none", + "anisotropy": 0 + }, + "ver": "1.0.22", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + }, + "f9941": { + "importer": "sprite-frame", + "uuid": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941", + "displayName": "idle (1)", + "id": "f9941", + "name": "spriteFrame", + "userData": { + "trimType": "none", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 32, + "height": 32, + "rawWidth": 32, + "rawHeight": 32, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "packable": true, + "pixelsToUnit": 100, + "pivotX": 0.5, + "pivotY": 0.5, + "meshType": 0, + "vertices": { + "rawPosition": [ + -16, + -16, + 0, + 16, + -16, + 0, + -16, + 16, + 0, + 16, + 16, + 0 + ], + "indexes": [ + 0, + 1, + 2, + 2, + 1, + 3 + ], + "uv": [ + 0, + 32, + 32, + 32, + 0, + 0, + 32, + 0 + ], + "nuv": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1 + ], + "minPos": [ + -16, + -16, + 0 + ], + "maxPos": [ + 16, + 16, + 0 + ] + }, + "isUuid": true, + "imageUuidOrDatabaseUri": "d6c248fd-c31d-475f-948a-be099aca55d3@6c48a", + "atlasUuid": "" + }, + "ver": "1.0.11", + "imported": true, + "files": [ + ".json" + ], + "subMetas": {} + } + }, + "userData": { + "type": "sprite-frame", + "fixAlphaTransparencyArtifacts": true, + "hasAlpha": true, + "redirect": "d6c248fd-c31d-475f-948a-be099aca55d3@f9941" + } +} diff --git a/client/package.json b/client/package.json new file mode 100644 index 0000000..a80f666 --- /dev/null +++ b/client/package.json @@ -0,0 +1,15 @@ +{ + "name": "Boom", + "uuid": "c6c0afbe-ddea-4eb8-a29a-28c194f6e602", + "version": "3.6.0", + "creator": { + "version": "3.6.0" + }, + "scripts": { + "lint": "eslint . --fix" + }, + "devDependencies": { + "@antfu/eslint-config": "^0.27.0", + "eslint": "^8.26.0" + } +} diff --git a/client/settings/v2/packages/cocos-service.json b/client/settings/v2/packages/cocos-service.json new file mode 100644 index 0000000..e0d209e --- /dev/null +++ b/client/settings/v2/packages/cocos-service.json @@ -0,0 +1,22 @@ +{ + "game": { + "name": "未知游戏", + "app_id": "UNKNOW", + "c_id": "0" + }, + "appConfigMaps": [ + { + "app_id": "UNKNOW", + "config_id": "29e2f5" + } + ], + "configs": [ + { + "app_id": "UNKNOW", + "config_id": "29e2f5", + "config_name": "Default", + "config_remarks": "", + "services": [] + } + ] +} diff --git a/client/settings/v2/packages/engine.json b/client/settings/v2/packages/engine.json new file mode 100644 index 0000000..bb463d1 --- /dev/null +++ b/client/settings/v2/packages/engine.json @@ -0,0 +1,118 @@ +{ + "__version__": "1.0.6", + "modules": { + "cache": { + "base": { + "_value": true + }, + "graphcis": { + "_value": true + }, + "gfx-webgl": { + "_value": true + }, + "gfx-webgl2": { + "_value": true + }, + "3d": { + "_value": false + }, + "2d": { + "_value": true + }, + "ui": { + "_value": true + }, + "particle": { + "_value": false + }, + "physics": { + "_value": false, + "_option": "physics-ammo" + }, + "physics-ammo": { + "_value": false + }, + "physics-cannon": { + "_value": false + }, + "physics-physx": { + "_value": false + }, + "physics-builtin": { + "_value": false + }, + "physics-2d": { + "_value": true, + "_option": "physics-2d-box2d" + }, + "physics-2d-box2d": { + "_value": false + }, + "physics-2d-builtin": { + "_value": false + }, + "intersection-2d": { + "_value": true + }, + "primitive": { + "_value": false + }, + "profiler": { + "_value": true + }, + "particle-2d": { + "_value": true + }, + "audio": { + "_value": true + }, + "video": { + "_value": true + }, + "webview": { + "_value": true + }, + "tween": { + "_value": true + }, + "terrain": { + "_value": false + }, + "tiled-map": { + "_value": true + }, + "spine": { + "_value": true + }, + "dragon-bones": { + "_value": true + } + }, + "includeModules": [ + "2d", + "animation", + "audio", + "base", + "dragon-bones", + "gfx-webgl", + "gfx-webgl2", + "intersection-2d", + "marionette", + "particle-2d", + "physics-2d-box2d", + "profiler", + "skeletal-animation", + "spine", + "tiled-map", + "tween", + "ui", + "video", + "webview" + ], + "noDeprecatedFeatures": { + "value": false, + "version": "" + } + } +} diff --git a/client/settings/v2/packages/project.json b/client/settings/v2/packages/project.json new file mode 100644 index 0000000..4d49226 --- /dev/null +++ b/client/settings/v2/packages/project.json @@ -0,0 +1,8 @@ +{ + "general": { + "designResolution": { + "width": 960, + "height": 640 + } + } +} diff --git a/client/tsconfig.json b/client/tsconfig.json new file mode 100644 index 0000000..7dc649a --- /dev/null +++ b/client/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 + } +} diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..fdcb193 --- /dev/null +++ b/server/package.json @@ -0,0 +1,26 @@ +{ + "name": "BoomServer", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "dev": "nodemon --exec ts-node ./src/index -e ts" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@types/cors": "^2.8.12", + "@types/express": "^4.17.14", + "@types/node": "^18.11.7", + "@types/ws": "^8.5.3", + "nodemon": "^2.0.20", + "ts-node": "^10.9.1", + "typescript": "^4.8.4" + }, + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "ws": "^8.10.0" + } +} diff --git a/server/src/binary.ts b/server/src/binary.ts new file mode 100644 index 0000000..87fb05b --- /dev/null +++ b/server/src/binary.ts @@ -0,0 +1,821 @@ +/** + * 类似于protobuffer,但此库及其精简且专为js打造 + * @author zp + * @version 1.1.0 + */ + +/** + * [注] nodejs环境下通过Uint8Array将ArrayBuffer和Buffer互相转换 + * @example + * // Buffer ---> ArrayBuffer + * function toArrayBuffer(buf) { + * var ab = new ArrayBuffer(buf.length); + * var view = new Uint8Array(ab); + * for (var i = 0; i < buf.length; ++i) { + * view[i] = buf[i]; + * } + * return ab; + * } + * // ArrayBuffer ---> Buffer + * function toBuffer(ab) { + * var buf = new Buffer(ab.byteLength); + * var view = new Uint8Array(ab); + * for (var i = 0; i < buf.length; ++i) { + * buf[i] = view[i]; + * } + * return buf; + * } + */ + +/** + * @example + * var { registerProto, Type, encode, decode, singleArray } = binary; + * registerProto(1001, { + * name: Type.String, + * age: Type.Uint8, + * sex: Type.Uint8 + * }) + * registerProto(1002, { + * info: 1001, + * gold: Type.Uint16, + * items: [Type.Uint16, Type.String] + * }) + * registerProto(1003, { + * array0: Type.Array, + * array1: singleArray(1002), + * array2: singleArray([1001, 1002]), + * array3: singleArray(Type.Uint16), + * array4: singleArray([Type.Uint16, Type.String]) + * }) + + * var buffer = encode({ name: 'Mary', age: 18, sex: 0 }, 1001); + * decode(buffer); + + * var buffer = encode({ info: { name: 'Mary', age: 18, sex: 0 }, gold: 10, array: [100, 2, 3] }, 1002); + * decode(buffer); + + * var buffer = encode({ + * array0: ['你好啊','我很好'], + * array1: [{ info: { name: 'James', age: 30, sex: 1 }, gold: 10, array: [100, 2, 3] }], + * array2: [[{}, { info: { name: 'Mary', age: 18, sex: 0 }, gold: 10, array: [100, 2, 3] }]], + * array3: [568], + * array4: [[0, '零'], [1, '一'], [2, '二'], [3, '三']] + * }, 1003); + * decode(buffer); + */ + +/** + * https://segmentfault.com/a/1190000014533505 中提到如果服务器开启了压缩了话,需要进行解压操作,并推荐了pako.js + * (具体也不知道这个压缩怎么回事,测试的时候也没遇到这个问题,先写注释记下来) + * @see https://github.com/nodeca/pako/edit/master/dist/pako.js + * @example + * let compressdata = new Uint8Array(buffer, byteOff, length); + * let uncompress = pako.inflate(compressdata);//解压数据 + * let uncompressdata = uncompress.buffer;// ArrayBuffer {} + * let dataViewData = new DataView(uncompressdata, 0);//解压后数据 + */ + + +/** +* A minimal base64 implementation for number arrays. +* @memberof util +* @namespace +*/ +class Base64 { + // Base64 encoding table + private b64 = new Array(64); + // Base64 decoding table + private s64 = new Array(123); + private invalidEncoding = "invalid encoding"; + + constructor() { + // 65..90, 97..122, 48..57, 43, 47 + for (var i = 0; i < 64;) { + this.s64[this.b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + } + } + + /** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ + length(string: string): number { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; + }; + + /** + * Encodes a buffer to a base64 encoded string. + * @param {DataView} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ + read(buffer: DataView, start: number, end: number): string { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer.getUint8(start++); + switch (j) { + case 0: + chunk[i++] = this.b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = this.b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = this.b64[t | b >> 6]; + chunk[i++] = this.b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = this.b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); + }; + + + /** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {DataView} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ + write(string: string, buffer: DataView, offset: number): number { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = this.s64[c]) === undefined) + throw Error(this.invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer.setUint8(offset++, t << 2 | (c & 48) >> 4); + t = c; + j = 2; + break; + case 2: + buffer.setUint8(offset++, (t & 15) << 4 | (c & 60) >> 2); + t = c; + j = 3; + break; + case 3: + buffer.setUint8(offset++, (t & 3) << 6 | c); + j = 0; + break; + } + } + if (j === 1) + throw Error(this.invalidEncoding); + return offset - start; + }; +} + +const base64 = new Base64(); + + +/** +* A minimal UTF8 implementation for number arrays. +* @memberof util +* @namespace +*/ +class UTF8 { + /** + * Calculates the UTF8 byte length of a string. + */ + length(string: string): number { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; + }; + + /** + * Reads UTF8 bytes as a string. + */ + read(buffer: DataView, start: number, end: number): string { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer.getUint8(start++); + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer.getUint8(start++) & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer.getUint8(start++) & 63) << 12 | (buffer.getUint8(start++) & 63) << 6 | buffer.getUint8(start++) & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer.getUint8(start++) & 63) << 6 | buffer.getUint8(start++) & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); + }; + + /** + * Writes a string as UTF8 bytes. + */ + write(string: string, buffer: DataView, offset: number): number { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer.setUint8(offset++, c1); + } else if (c1 < 2048) { + buffer.setUint8(offset++, c1 >> 6 | 192); + buffer.setUint8(offset++, c1 & 63 | 128); + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer.setUint8(offset++, c1 >> 18 | 240); + buffer.setUint8(offset++, c1 >> 12 & 63 | 128); + buffer.setUint8(offset++, c1 >> 6 & 63 | 128); + buffer.setUint8(offset++, c1 & 63 | 128); + } else { + buffer.setUint8(offset++, c1 >> 12 | 224); + buffer.setUint8(offset++, c1 >> 6 & 63 | 128); + buffer.setUint8(offset++, c1 & 63 | 128); + } + } + return offset - start; + }; +} + +const utf8 = new UTF8(); + +class Encode { + private buffer: ArrayBuffer = null; + private view: DataView = null; + private index: number = 0; + + constructor(length: number) { + this.buffer = new ArrayBuffer(length) + this.view = new DataView(this.buffer); + this.index = 0; + } + + Int8(data: number) { + if (!isNumber(data)) data = 0; + return this.view.setInt8(this.index++, data); + } + + Uint8(data: number) { + if (!isNumber(data)) data = 0; + return this.view.setUint8(this.index++, data); + } + + Int16(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setInt16(this.index, data); + this.index += 2; + return value; + } + + Uint16(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setUint16(this.index, data); + this.index += 2; + return value; + } + + Int32(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setInt32(this.index, data); + this.index += 4; + return value; + } + + Uint32(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setUint32(this.index, data); + this.index += 4; + return value; + } + + Float32(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setFloat32(this.index, data); + this.index += 4; + return value; + } + + Float64(data: number) { + if (!isNumber(data)) data = 0; + var value = this.view.setFloat64(this.index, data); + this.index += 8; + return value; + } + + Boolean(data) { + return this.Uint8(data ? 1 : 0); + } + + String(string) { + if (!isString(string)) string = ''; + + const len = utf8.write(string, this.view, this.index + 2); + this.Uint16(len); + this.index += len; + } + + Base64(string) { + if (!isBase64(string)) string = ''; + + const len = base64.write(string, this.view, this.index + 2); + this.Uint16(len); + this.index += len; + } + + Array(array) { + if (isArray(array) && !isEmpty(array)) { + return this.String(JSON.stringify(array)); + } else { + return this.String(''); + } + } + + Object(obj) { + if (isMap(obj) && !isEmpty(obj)) { + return this.String(JSON.stringify(obj)); + } else { + return this.String(''); + } + } + + Buffer() { + return this.buffer; + } +} + +class Decode { + private view: DataView = null; + private index: number = 0; + + constructor(buffer: ArrayBuffer) { + this.view = new DataView(buffer); + this.index = 0; + } + + Int8() { + return this.view.getInt8(this.index++); + } + + Uint8() { + return this.view.getUint8(this.index++); + } + + Int16() { + const value = this.view.getInt16(this.index); + this.index += 2; + return value; + } + + Uint16() { + const value = this.view.getUint16(this.index); + this.index += 2; + return value; + } + + Int32() { + const value = this.view.getInt32(this.index); + this.index += 4; + return value; + } + + Uint32() { + const value = this.view.getUint32(this.index); + this.index += 4; + return value; + } + + Float32() { + const value = this.view.getFloat32(this.index); + this.index += 4; + return value; + } + + Float64() { + const value = this.view.getFloat64(this.index); + this.index += 8; + return value; + } + + Boolean() { + return !!this.Uint8(); + } + + String() { + const len = this.Uint16(); + this.index += len; + return utf8.read(this.view, this.index - len, this.index); + } + + Base64() { + const len = this.Uint16(); + this.index += len; + return base64.read(this.view, this.index - len, this.index); + } + + Array() { + const str = this.String(); + return str ? JSON.parse(str) : []; + } + + Object() { + const str = this.String(); + return str ? JSON.parse(str) : {}; + } +} + +const getType = function (param) { + return Object.prototype.toString.call(param).slice(8, -1).toLowerCase(); +} + +const isObject = function (param) { + return param && typeof param === 'object'; +} + +const isArray = function (param) { + return getType(param) === 'array'; +} + +const isMap = function (param) { + return getType(param) === 'object'; +} + +const isString = function (param) { + return getType(param) === 'string'; +} + +const isNumber = function (param) { + return getType(param) === 'number'; +} + +const isBoolean = function (param) { + return getType(param) === 'boolean'; +} + +const isBase64 = function (param) { + return isString(param) && /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(param); +} + +function stringStartsWith(str1: string, str2: string) { + if (str1 === str2) { + return true; + } + for (let index = 0; index < str2.length; index++) { + if (str1[index] !== str2[index]) { + return false; + } + } + return true; +} + +function isEmpty(obj) { + if (isArray(obj)) { + return !obj.length; + } else if (isMap(obj)) { + for (const key in obj) { + return false; + } + } + return true; +} + +function compareStr(str1: string, str2: string) { + if (str1 === str2) { + return 0; + } + if (str1.length > str2.length) { + return 1; + } + if (str1.length < str2.length) { + return -1; + } + + for (let i = 0, code1 = 0, code2 = 0; i < str1.length; i++) { + if (str2.length <= i) { + return 1; + } else { + code1 = str1.charCodeAt(i); + code2 = str2.charCodeAt(i); + if (code1 > code2) { + return 1; + } else if (code1 < code2) { + return -1; + } + } + } + return 0; +} + +function sortKeys(obj) { + if (isMap(obj)) { + let index = 0; + const keys: string[] = []; + for (const key in obj) { + for (index = keys.length - 1; index >= 0; index--) { + if (compareStr(key, keys[index]) >= 0) { + break; + } + } + if (index === keys.length - 1) { + keys.push(key); + } else { + keys.splice(index + 1, 0, key); + } + } + return keys; + } else if (isArray(obj)) { + return obj.map(function (v, k) { + return k; + }) + } + + return []; +} + +function realType(type) { + if (isObject(type)) { + return type; + } + return protoCache[type] || type; +} + +const singleArrayPrefix = 'SingleArray'; + +function isSingleArray(str: string) { + return isString(str) && stringStartsWith(str, singleArrayPrefix); +} + +function SingleArrayProto(str: string) { + const stringify = str.slice(singleArrayPrefix.length + 1, -1); + return JSON.parse(stringify); +} + +/** +* 标记单一类型的数组 +* @param proto +*/ +export const singleArray = function (proto) { + return `${singleArrayPrefix}(${JSON.stringify(proto)})`; +} + +function DataLen(data: any, proto: any) { + proto = realType(proto); + + let length = 0; + if (isMap(proto)) { + if (!isMap(data)) data = {}; + for (const key in proto) { + length += DataLen(data[key], proto[key]); + } + } else if (isArray(proto)) { + if (!isArray(data)) data = []; + proto.forEach(function (type, index) { + length += DataLen(data[index], type); + }) + } else if (proto === 'String') { + // 如果是String的话,固定开头有2字节记录字符串长度 + length += 2; + if (isString(data)) length += utf8.length(data); + } else if (proto === 'Object' || proto === 'Array') { + // Object和Array类型也会将数据通过JSON.stringify转成String格式 + length += 2; + if (!isEmpty(data)) length += utf8.length(JSON.stringify(data)); + } else if (proto === 'Base64') { + // 如果是Base64的话,固定开头有2字节记录字符串长度 + length += 2; + if (isBase64(data)) length += base64.length(data); + } else if (isSingleArray(proto)) { + // 如果是SingleArray的话,固定开头有2字节记录数组长度 + length += 2; + if (!isArray(data)) data = []; + proto = realType(SingleArrayProto(proto)); + data.forEach(function (value) { + length += DataLen(value, proto); + }) + } else if (TypeByte[proto]) { + length += TypeByte[proto]; + } else { + throw new Error("'proto' is bad"); + } + + return length; +} + +function encodeData(encode: Encode, data: any, proto: any) { + proto = realType(proto); + + if (isMap(proto)) { + if (!isMap(data)) data = {}; + sortKeys(proto).forEach(function (key) { + encodeData(encode, data[key], proto[key]); + }) + } else if (isArray(proto)) { + if (!isArray(data)) data = []; + proto.forEach(function (type, index) { + encodeData(encode, data[index], type); + }) + } else if (isSingleArray(proto)) { + if (!isArray(data)) data = []; + encode.Uint16(data.length); + proto = realType(SingleArrayProto(proto)); + data.forEach(function (value) { + encodeData(encode, value, proto); + }) + } else { + encode[proto](data); + } +} + +function decodeData(decode: Decode, proto: any) { + proto = realType(proto); + + if (isMap(proto)) { + const obj = {}; + sortKeys(proto).forEach(function (key) { + obj[key] = decodeData(decode, proto[key]); + }); + return obj; + } else if (isArray(proto)) { + return proto.map(function (type) { + return decodeData(decode, type); + }); + } else if (isSingleArray(proto)) { + const arr = []; + const len = decode.Uint16(); + proto = realType(SingleArrayProto(proto)); + for (let index = 0; index < len; index++) { + arr.push(decodeData(decode, proto)); + } + return arr; + } else { + return decode[proto](); + } +} + +const TypeByte = { + 'Int8': 1, + 'Uint8': 1, + 'Int16': 2, + 'Uint16': 2, + 'Int32': 4, + 'Uint32': 4, + 'Float32': 4, + 'Float64': 8, + 'BigInt64': 8, + 'BigUint64': 8, + 'Boolean': 1, + 'String': 1, + 'Base64': 1, + 'Array': 1, + 'Object': 1 +} + +export const Type = { + 'Int8': 'Int8', // 1byte -128 to 127 + 'Uint8': 'Uint8', // 1byte 0 to 255 + 'Uint8Clamped': 'Uint8', // 1byte 0 to 255 + 'Int16': 'Int16', // 2byte -32768 to 32767 + 'Uint16': 'Uint16', // 2byte 0 to 65535 + 'Int32': 'Int32', // 4byte -2147483648 to 2147483647 + 'Uint32': 'Uint32', // 4byte 0 to 4294967295 + 'Float32': 'Float32', // 4byte 1.2x10^-38 to 3.4x10^38 + 'Float64': 'Float64', // 8byte 5.0x10^-324 to 1.8x10^308 + 'BigInt64': 'BigInt64', // 8byte -2^63 to (2^63)-1 + 'BigUint64': 'BigUint64', // 8byte 0 to (2^64)-1 + 'Boolean': 'Boolean', // 1byte 0 to 255 + 'String': 'String', // 1byte 0 to 255 + 'Base64': 'Base64', // 1byte 0 to 255 + 'Array': 'Array', // 1byte 0 to 255 + 'Object': 'Object' // 1byte 0 to 255 +} + +/** +* 序列化 +* 开头2字节用来存储proto的id +*/ +export const encode = function (obj: Object, id: number | string) { + const proto = protoCache[id]; + if (proto) { + const len = DataLen(obj, proto); + const encode = new Encode(len + 2); + encode.Uint16(Number(id)); + encodeData(encode, obj, proto); + return encode.Buffer(); + } else { + throw new Error("encode error: 'id' is bad"); + } +} + +/** +* 反序列化 +* 开头2字节代表proto的id +*/ +export const decode = function (buffer: ArrayBuffer) { + const decode = new Decode(buffer); + const id = decode.Uint16(); + const proto = protoCache[id]; + if (proto) { + return decodeData(decode, proto); + } else { + throw new Error("decode error: 'buffer' is bad"); + } +} + +/** +* proto缓存 +*/ +const protoCache = {} + +/** +* 注册proto +* id: 必须是个正整数(或正整数字符串), 取值范围[0,65535] +*/ +export const registerProto = function (id: number | string, proto: any) { + if (typeof id === 'string') id = Number(id); + + if (isNumber(id) && Math.floor(id) === id && id >= 0 && id <= 65535 && !Type[id]) { + protoCache[id] = proto; + } else { + throw new Error("registerProto error: 'id' is bad"); + } +} + +export const registerProtoMap = function (protoMap: any) { + if (isMap(protoMap)) { + for (const id in protoMap) { + registerProto(id, protoMap[id]); + } + } else { + throw new Error("registerProtoMap error: 'protoMap' is bad"); + } +} + +export const protoToJson = function () { + return JSON.stringify(protoCache); +} \ No newline at end of file diff --git a/server/src/eMath.ts b/server/src/eMath.ts new file mode 100644 index 0000000..b7d324f --- /dev/null +++ b/server/src/eMath.ts @@ -0,0 +1,402 @@ +/** + * @author zp + */ +/** + * 多平台一致精确计算库,比decimal更轻量更快 + * [Math.round、Math.min、Math.max,Math.floor、Math.ceil,这些系统方法一般情况下是可以放心使用的] + */ + const exactMath = Object.create(null); + module.exports = exactMath; + + // 计算精度 + // sin、cos、tan方法的误差小数点后16位 + const ACCURACY_SIN_ERROR = 1e-16; + const ACCURACY_COS_ERROR = 1e-16; + const ACCURACY_TAN_ERROR = 1e-16; + + // 角度弧度常量 + const DEG = 57.29577951308232; + const RAD = 0.017453292519943295; + + // 系统常量 + exactMath.PI = 3.141592653589793; + exactMath.E = 2.718281828459045; + exactMath.LN2 = 0.6931471805599453; + exactMath.LN10 = 2.302585092994046; + exactMath.LOG2E = 1.4426950408889634; + exactMath.LOG10E = 0.4342944819032518; + exactMath.SQRT1_2 = 0.7071067811865476; + exactMath.SQRT2 = 1.4142135623730951; + + /** + * 链式调用 + * @example + * const value = exactMath.value(10).add(20.123).mul(2).sqrt().value; + */ + let chain = null; + exactMath.value = function (value) { + if (!chain) { + chain = { + value: 0, + valueOf() { return this.value; }, + toString() { return String(this.value); } + } + for (const key in exactMath) { + if (key !== 'value' && typeof exactMath[key] === 'function') { + chain[key] = function (...args) { + this.value = exactMath[key].call(exactMath, this.value, ...args); + return this; + } + } + } + } + + chain.value = value; + return chain; + } + + /****************************************************基础****************************************************/ + /** + * 获得小数位数 + * @param {Number} num 浮点数 + * @returns {Number} + */ + exactMath.getDecimalPlace = function (num) { + if (num && num !== Math.floor(num)) { + for (let n = 1, m = 10, temp = 0; n < 20; n += 1, m *= 10) { + temp = num * m; + if (temp == Math.floor(temp)) return n; + } + return 20; + } else { + return 0; + } + } + /** + * 保留n为小数,并四舍五入 + * @example + * (2.335).toFixed(2) + * exactMath.toFixed(2.335, 2) + * @param {Number} num 浮点数 + * @param {Number} n 整数 + * @returns {Number} + */ + exactMath.toFixed = function (num, n = 0) { + if (n == 0) { + return Math.round(num); + } else { + const m = Math.pow(10, n); + return Math.round(num * (m * 10) / 10) / m; + } + } + + exactMath.abs = function (x) { + return Math.abs(x); + } + exactMath.round = function (x) { + return Math.round(x); + } + exactMath.ceil = function (x) { + return Math.ceil(x) + } + exactMath.floor = function (x) { + return Math.floor(x) + } + exactMath.min = function (...args) { + return Math.min(...args); + } + exactMath.max = function (...args) { + return Math.max(...args); + } + + /** + * 小数相加 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.add = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + return (this.toFixed(num1 * m) + this.toFixed(num2 * m)) / m; + } else { + return args.reduce((a, b) => this.add(a, b)) + } + }; + /** + * 小数相减 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.sub = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + + return (this.toFixed(num1 * m) - this.toFixed(num2 * m)) / m; + } else { + return args.reduce((a, b) => this.sub(a, b)) + } + }; + /** + * 小数相乘 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.mul = function (...args) { + if (args.length === 2) { + let num1 = args[0]; + let num2 = args[1]; + + // 方案1: + // 直接相乘,但是相乘两数小数点过多会导致中间值[(n1 * m1) * (n2 * m2)]过大 + // const n1 = this.getDecimalPlace(num1); + // const n2 = this.getDecimalPlace(num2); + // const m1 = Math.pow(10, n1); + // const m2 = Math.pow(10, n2); + // return (n1 * m1) * (n2 * m2) / (m1 * m2); + + // 方案2: + // 用除法实现乘法,不会存在过大中间值 + let n1 = this.getDecimalPlace(num1); + let n2 = this.getDecimalPlace(num2); + + let m = Math.pow(10, n2); + num2 = m / this.toFixed(num2 * m); + + m = Math.pow(10, Math.max(n1, this.getDecimalPlace(num2))); + m = this.toFixed(num1 * m) / this.toFixed(num2 * m); + + let n = Math.min(this.getDecimalPlace(m), n1 + n2); + return this.toFixed(m, n); + } else { + return args.reduce((a, b) => this.mul(a, b)) + } + }; + /** + * 小数相除法 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.div = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + return this.toFixed(num1 * m) / this.toFixed(num2 * m); + } else { + return args.reduce((a, b) => this.div(a, b)) + } + }; + /** + * 取余 + * @param {Number} num1 浮点数 + * @param {Number} num2 浮点数 + * @returns {Number} + */ + exactMath.rem = function (...args) { + if (args.length === 2) { + const num1 = args[0]; + const num2 = args[1]; + const m = Math.pow(10, Math.max(this.getDecimalPlace(num1), this.getDecimalPlace(num2))); + + return this.toFixed(num1 * m) % this.toFixed(num2 * m) / m; + } else { + return args.reduce((a, b) => this.rem(a, b)) + } + }; + + /** + * n次方,仅支持整数次方(正负都可以) + * @param {Number} num 浮点数 + * @param {Number} n 整数 + */ + exactMath.pow = function (num, n) { + if (num == 0 && n == 0) { + return 1; + } + if (num == 0 && n > 0) { + return 0 + } + if (num == 0 && n < 0) { + return Infinity; + } + // num为负数,n为负小数,返回NaN + if (num < 0 && n < 0 && Math.round(n) != n) { + return NaN; + } + + if (Math.round(n) != n) { + throw new Error('n must be an integer'); + } + + let result = 1; + + if (n > 0) { + for (let index = 0; index < n; index++) { + result = this.mul(result, num); + } + } else if (n < 0) { + for (let index = 0, len = Math.abs(n); index < len; index++) { + result = this.div(result, num); + } + } + + return result; + }; + /** + * 开方运算【牛顿迭代法】 + * + * @param {Number} n + * @returns + */ + exactMath.sqrt = function (n) { + if (n < 0) return NaN; + if (n === 0) return 0; + if (n === 1) return 1; + let last = 0; + let res = 1; + let c = 50; + while (res != last && --c >= 0) { + last = res; + res = this.div(this.add(res, this.div(n, res)), 2) + } + return res; + + // float InvSqrt(float x) + // { + // float xhalf = 0.5f * x; + // int i = * (int *) & x; // get bits for floating VALUE + // i = 0x5f375a86 - (i >> 1); // gives initial guess y0 + // x = * (float *) & i; // convert bits BACK to float + // x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases accuracy + // x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases accuracy + // x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases accuracy + // return 1 / x; + // } + }; + + /****************************************************随机****************************************************/ + function getSeed(seed) { + if (isNaN(seed)) { + seed = Math.floor(Math.random() * 233280); + } else { + seed = Math.floor(seed % 233280); + } + return seed; + } + + let randomSeed = getSeed(); + + /** + * 设置随机种子 + */ + exactMath.setSeed = function (seed) { + randomSeed = getSeed(seed); + }; + + /** + * 随机 + */ + exactMath.random = function () { + randomSeed = (randomSeed * 9301 + 49297) % 233280; + return randomSeed / 233280.0; + }; + + /** + * 根据随机种子随机 + * @param {number} seed + */ + exactMath.randomBySeed = function (seed) { + seed = getSeed(seed); + seed = (seed * 9301 + 49297) % 233280; + return seed / 233280.0; + }; + + /****************************************************角度弧度转换****************************************************/ + /** + * 弧度数转角度数 + * @param {Number} radians 浮点数 + * @returns {Numbe} 浮点数 + */ + exactMath.radiansToDegrees = function (radians) { + return this.div(radians, RAD); + }; + /** + * 角度数转弧度数 + * @param {Number} degrees 浮点数 + * @returns {Numbe} 浮点数 + */ + exactMath.degreesToRadians = function (degrees) { + return this.div(degrees, DEG); + }; + /** + * 将角度值转换到[0, 360)范围内 + * @param {Number} angle 浮点数 + * @returns {Number} 整数 + */ + exactMath.get0To360Angle = function (angle) { + if (angle === 0) { + return 0; + } else if (angle < 0) { + return this.add(this.rem(angle, 360), 360); + } else { + return this.rem(angle, 360); + } + }; + /****************************************************三角函数****************************************************/ + /** + * 查表 + */ + exactMath._sin = {}; + exactMath._cos = {}; + exactMath._tan = {}; + + /** + * 3个三角函数,根据需求自行添加 + * 为了效率,应该尽量使用查表法 + * 表内查不到的,目前使用系统方法的结果并取前4位小数 + */ + exactMath.sin = function (x) { + if (this._sin.hasOwnProperty(x)) { + return this._sin[x]; + } + + // if (x == 0) { + // return 0; + // } else if (x == 90) { + // return 1; + // } + + // let n = x, sum = 0, i = 1; + // do { + // i++; + // sum = this.add(sum, n); + // // n = -n * x * x / (2 * i - 1) / (2 * i - 2); + // n = this.div(this.mul(-1, n, x, x), this.sub(this.mul(2, i), 1), this.sub(this.mul(2, i), 2)); + // } while (Math.abs(n) >= ACCURACY_SIN_ERROR); + // return sum; + + return this.toFixed(Math.sin(x), 4); + }; + exactMath.cos = function (x) { + if (this._cos.hasOwnProperty(x)) { + return this._cos[x]; + } + + return this.toFixed(Math.cos(x), 4); + }; + exactMath.tan = function (x) { + if (this._tan.hasOwnProperty(x)) { + return this._tan[x]; + } + + return this.toFixed(Math.tan(x), 4); + }; \ No newline at end of file diff --git a/server/src/index.ts b/server/src/index.ts new file mode 100644 index 0000000..b9d2d09 --- /dev/null +++ b/server/src/index.ts @@ -0,0 +1,48 @@ +import { WebSocketServer } from 'ws'; +import express from 'express' +import http from 'http' +import cors from 'cors' + +const app = express() +app.use(cors()) + +app.get("/join", (req, res) => { + + res.send([{ a: 1 }]) +}) + +const server = http.createServer(app) + +const wss = new WebSocketServer({ server }); + +wss.on('connection', function connection(socket) { + socket.on('message', function message(data) { + console.log('received: %s', data); + }); + + socket.on("close", () => { + console.log("socket close"); + }) + + socket.on("error", () => { + console.log("socket error"); + }) + + socket.send('something'); +}); + +wss.on("error", () => { + console.log("服务错误"); +}) + +wss.on("close", () => { + console.log("服务关闭"); +}) + +wss.on("listening", () => { + console.log("ws服务启动"); +}) + +server.listen(8888, () => { + console.log("http服务启动"); +}) \ No newline at end of file diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 0000000..75dcaea --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,103 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}