mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
提交
This commit is contained in:
parent
487219e6aa
commit
ebf99de47a
BIN
DataTables/Datas/~$__tables__.xlsx
Normal file
BIN
DataTables/Datas/~$__tables__.xlsx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,6 +6,7 @@
|
|||||||
"files": [],
|
"files": [],
|
||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {
|
"userData": {
|
||||||
"isBundle": true
|
"isBundle": true,
|
||||||
|
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {
|
"userData": {
|
||||||
"isBundle": true,
|
"isBundle": true,
|
||||||
"bundleConfigID": "default",
|
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt",
|
||||||
"bundleName": "resources",
|
"bundleName": "resources",
|
||||||
"priority": 8,
|
"priority": 8,
|
||||||
"compressionType": {},
|
"compressionType": {},
|
||||||
|
@ -47,22 +47,34 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 128
|
"__id__": 128
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 143
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 149
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 155
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 161
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 143
|
"__id__": 167
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 145
|
"__id__": 169
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 147
|
"__id__": 171
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 149
|
"__id__": 173
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@ -3419,6 +3431,554 @@
|
|||||||
"targetOverrides": null,
|
"targetOverrides": null,
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "001妙蛙种子",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 144
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 146
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 148
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": -271.702,
|
||||||
|
"y": -580.56,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 143
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 145
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 643.989990234375,
|
||||||
|
"height": 385.94000244140625
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.6291246759115515,
|
||||||
|
"y": 0.7755350460309831
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "24mjCxtbJAIYhkSGJS2XGL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "sp.Skeleton",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 143
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 147
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_skeletonData": {
|
||||||
|
"__uuid__": "29e1c6dc-6549-4f30-ad94-fe92d3cead0c",
|
||||||
|
"__expectedType__": "sp.SkeletonData"
|
||||||
|
},
|
||||||
|
"defaultSkin": "default",
|
||||||
|
"defaultAnimation": "atk",
|
||||||
|
"_premultipliedAlpha": true,
|
||||||
|
"_timeScale": 1,
|
||||||
|
"_preCacheMode": 0,
|
||||||
|
"_cacheMode": 0,
|
||||||
|
"_defaultCacheMode": 0,
|
||||||
|
"_sockets": [],
|
||||||
|
"_useTint": false,
|
||||||
|
"_debugMesh": false,
|
||||||
|
"_debugBones": false,
|
||||||
|
"_debugSlots": false,
|
||||||
|
"_enableBatch": false,
|
||||||
|
"loop": true,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "02mvi2yPpIvajNGIKqQDxP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "03QOgvM5ZPaLJxWwx9tYtd",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "guaiA1a",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 152
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 154
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": -123.079,
|
||||||
|
"y": -580.56,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 149
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 151
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 84.5999984741211,
|
||||||
|
"height": 116.54000091552734
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.4938534223742009,
|
||||||
|
"y": 0.024026084866309822
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "8dVNo47axGpJRFT8NW+dax"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "sp.Skeleton",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 149
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 153
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_skeletonData": {
|
||||||
|
"__uuid__": "14d2a9b1-50ad-4051-a96a-b1c194651259",
|
||||||
|
"__expectedType__": "sp.SkeletonData"
|
||||||
|
},
|
||||||
|
"defaultSkin": "default",
|
||||||
|
"defaultAnimation": "atk",
|
||||||
|
"_premultipliedAlpha": true,
|
||||||
|
"_timeScale": 1,
|
||||||
|
"_preCacheMode": 0,
|
||||||
|
"_cacheMode": 0,
|
||||||
|
"_defaultCacheMode": 0,
|
||||||
|
"_sockets": [],
|
||||||
|
"_useTint": false,
|
||||||
|
"_debugMesh": false,
|
||||||
|
"_debugBones": false,
|
||||||
|
"_debugSlots": false,
|
||||||
|
"_enableBatch": false,
|
||||||
|
"loop": true,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "63+7zF/35IIatyyta5jw8G"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "9cYPe89alNLpO1Qn8AI3Y5",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "guaiA1a",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 156
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 158
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 160
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 11.611,
|
||||||
|
"y": -580.56,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 155
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 157
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 100.08000183105469,
|
||||||
|
"height": 113.76000213623047
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5040967210222901,
|
||||||
|
"y": 0.07770745417182541
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "fdXo7ORJpDv6JVChYlXVuX"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "sp.Skeleton",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 155
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 159
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_skeletonData": {
|
||||||
|
"__uuid__": "42029fae-0ee0-48c1-b7c5-850c03664ae4",
|
||||||
|
"__expectedType__": "sp.SkeletonData"
|
||||||
|
},
|
||||||
|
"defaultSkin": "default",
|
||||||
|
"defaultAnimation": "atk",
|
||||||
|
"_premultipliedAlpha": true,
|
||||||
|
"_timeScale": 1,
|
||||||
|
"_preCacheMode": 0,
|
||||||
|
"_cacheMode": 0,
|
||||||
|
"_defaultCacheMode": 0,
|
||||||
|
"_sockets": [],
|
||||||
|
"_useTint": false,
|
||||||
|
"_debugMesh": false,
|
||||||
|
"_debugBones": false,
|
||||||
|
"_debugSlots": false,
|
||||||
|
"_enableBatch": false,
|
||||||
|
"loop": true,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "d8a1mv3UxMQI8rwba1ICfW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "87tzkjpopJ6YTEDK3Fvt9k",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "guaiA4e",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 162
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 164
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 166
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 171.846,
|
||||||
|
"y": -589.848,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 161
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 163
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 162.3699951171875,
|
||||||
|
"height": 188.55999755859375
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5011394050227984,
|
||||||
|
"y": 0.04884387016013313
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "27Mc3b9O5A9b5AOEEyyaCO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "sp.Skeleton",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 161
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 165
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_skeletonData": {
|
||||||
|
"__uuid__": "51104c05-e5db-4274-a66e-1de9ab511e4f",
|
||||||
|
"__expectedType__": "sp.SkeletonData"
|
||||||
|
},
|
||||||
|
"defaultSkin": "default",
|
||||||
|
"defaultAnimation": "atk",
|
||||||
|
"_premultipliedAlpha": true,
|
||||||
|
"_timeScale": 1,
|
||||||
|
"_preCacheMode": 0,
|
||||||
|
"_cacheMode": 0,
|
||||||
|
"_defaultCacheMode": 0,
|
||||||
|
"_sockets": [],
|
||||||
|
"_useTint": false,
|
||||||
|
"_debugMesh": false,
|
||||||
|
"_debugBones": false,
|
||||||
|
"_debugSlots": false,
|
||||||
|
"_enableBatch": false,
|
||||||
|
"loop": true,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "89C5gFHAdBlJbIYn4ncYCm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "ff9s+mSCdOhIPYSW36LMEs",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.UITransform",
|
"__type__": "cc.UITransform",
|
||||||
"_name": "",
|
"_name": "",
|
||||||
@ -3429,7 +3989,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 144
|
"__id__": 168
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@ -3457,7 +4017,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 146
|
"__id__": 170
|
||||||
},
|
},
|
||||||
"_alignFlags": 45,
|
"_alignFlags": 45,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
@ -3493,7 +4053,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 148
|
"__id__": 172
|
||||||
},
|
},
|
||||||
"frameText": {
|
"frameText": {
|
||||||
"__id__": 19
|
"__id__": 19
|
||||||
|
@ -1201,7 +1201,7 @@
|
|||||||
"b": 255,
|
"b": 255,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_string": "注册",
|
"_string": "快速注册",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 24,
|
"_actualFontSize": 24,
|
||||||
|
@ -12,7 +12,6 @@ import JNLayerBase from "../../extensions/ngame/assets/ngame/ui/base/JNLayerBase
|
|||||||
import { EventDispatcher } from "../../extensions/ngame/assets/ngame/util/EventDispatcher";
|
import { EventDispatcher } from "../../extensions/ngame/assets/ngame/util/EventDispatcher";
|
||||||
import { JsonLoad, JsonUtil } from "../../extensions/ngame/assets/ngame/util/JsonUtil";
|
import { JsonLoad, JsonUtil } from "../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||||
import NGameMessage from "../../extensions/ngame/assets/ngame/util/NGameMessage";
|
import NGameMessage from "../../extensions/ngame/assets/ngame/util/NGameMessage";
|
||||||
import axios from "../../extensions/ngame/assets/plugins/axios.js";
|
|
||||||
import GBattleModeManager from "./battle/GBattleModeManager";
|
import GBattleModeManager from "./battle/GBattleModeManager";
|
||||||
import { GLayer, GUI, UIConfig } from "./ui/UIConfig";
|
import { GLayer, GUI, UIConfig } from "./ui/UIConfig";
|
||||||
import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSystem";
|
import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSystem";
|
||||||
@ -23,8 +22,12 @@ import { TB, Tables } from "../resources/config/data/schema";
|
|||||||
import { JsonAsset } from "cc";
|
import { JsonAsset } from "cc";
|
||||||
import { GAction } from "./consts/GActionEnum";
|
import { GAction } from "./consts/GActionEnum";
|
||||||
import { StorageData, StorageEnum } from "./consts/GData";
|
import { StorageData, StorageEnum } from "./consts/GData";
|
||||||
|
import { Axios, Env, JNGame } from "../../extensions/ngame/assets/ngame/JNGame";
|
||||||
|
|
||||||
let IP = "kyu.jisol.cn";
|
//设置微信环境
|
||||||
|
JNGame.setEnv(Env.WX);
|
||||||
|
|
||||||
|
let IP = "localhost";
|
||||||
|
|
||||||
//重写UI
|
//重写UI
|
||||||
class JNGLayer extends JNLayer{
|
class JNGLayer extends JNLayer{
|
||||||
@ -231,9 +234,10 @@ export const app = {
|
|||||||
sync : new JNGSyncFrame(), //同步
|
sync : new JNGSyncFrame(), //同步
|
||||||
event : EventDispatcher.getIns(), //通知
|
event : EventDispatcher.getIns(), //通知
|
||||||
proto : NGameMessage.getIns(), //消息
|
proto : NGameMessage.getIns(), //消息
|
||||||
api : axios.create({
|
// api : Axios.create({
|
||||||
baseURL: `http://${IP}:8080`,
|
// baseURL: `http://${IP}:8080`,
|
||||||
}), //请求
|
// }), //请求
|
||||||
|
// api : {}, //请求
|
||||||
battle : GBattleModeManager.getIns(), //战斗
|
battle : GBattleModeManager.getIns(), //战斗
|
||||||
config : new JNGConfig(), //配置文件
|
config : new JNGConfig(), //配置文件
|
||||||
battleRes : new JLoaderBattle("battle"), //battle包
|
battleRes : new JLoaderBattle("battle"), //battle包
|
||||||
@ -243,3 +247,9 @@ export const app = {
|
|||||||
[JLoaderBattle.loadingInit]:{title:"初始化战斗资源"},
|
[JLoaderBattle.loadingInit]:{title:"初始化战斗资源"},
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// app.api.interceptors.request.use(function(config){
|
||||||
|
// //设置Token
|
||||||
|
// config.headers.set("Token",StorageData.get(StorageEnum.Token));
|
||||||
|
// return config;
|
||||||
|
// })
|
@ -1,6 +1,6 @@
|
|||||||
import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
|
import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
|
||||||
import { app } from './App';
|
import { app } from './App';
|
||||||
import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
import { Env, JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||||
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
|
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
@ -13,6 +13,11 @@ const RData = (data:any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NewsContext{
|
||||||
|
state:number,
|
||||||
|
msg:string,
|
||||||
|
data:any,
|
||||||
|
}
|
||||||
export interface UserVO{
|
export interface UserVO{
|
||||||
userId:number, //玩家Id
|
userId:number, //玩家Id
|
||||||
userName:string, //玩家名称
|
userName:string, //玩家名称
|
||||||
@ -25,8 +30,9 @@ export interface UserLoginVO{
|
|||||||
|
|
||||||
export const API = {
|
export const API = {
|
||||||
|
|
||||||
UserRegister : async () => RData(await http.post(`/user/register`)) as UserVO,
|
UserRegister : async () => RData(await http.post(`/user/register`)) as UserVO, //玩家注册
|
||||||
UserLogin : async (account:string,password:string) => RData(await http.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO,
|
UserLogin : async (account:string,password:string) => RData(await http.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO, //玩家登录
|
||||||
|
GetPlayerInfo : async () => (await http.get(`/game/player/info`)).data as NewsContext, //获取玩家信息
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import { director } from 'cc';
|
|||||||
import { WorldCanvas } from '../../WorldCanvas';
|
import { WorldCanvas } from '../../WorldCanvas';
|
||||||
import { StorageData, StorageEnum } from '../../consts/GData';
|
import { StorageData, StorageEnum } from '../../consts/GData';
|
||||||
import { GUI } from '../UIConfig';
|
import { GUI } from '../UIConfig';
|
||||||
|
import { API } from '../../consts/API';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('HomeView')
|
@ccclass('HomeView')
|
||||||
@ -14,6 +15,10 @@ export class HomeView extends JNGLayerBase {
|
|||||||
@property(Label)
|
@property(Label)
|
||||||
frameText:Label;
|
frameText:Label;
|
||||||
|
|
||||||
|
async onLoad(){
|
||||||
|
app.layer.Open(GUI.Tips,{text:(await API.GetPlayerInfo()).msg});
|
||||||
|
}
|
||||||
|
|
||||||
update(){
|
update(){
|
||||||
this.frameText.string = `当前帧数: ${app.sync.frame}`;
|
this.frameText.string = `当前帧数: ${app.sync.frame}`;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 20392fca1c6b8b903d2c517fbab15cde450cc9f9
|
Subproject commit eed71d5820b3a313f6daf848e4d91abdcb55b367
|
@ -1,6 +1,82 @@
|
|||||||
{
|
{
|
||||||
"__version__": "1.3.7",
|
"__version__": "1.3.7",
|
||||||
"bundleConfig": {
|
"bundleConfig": {
|
||||||
"custom": {}
|
"custom": {
|
||||||
|
"514cB4o1lDLr4YHgRwsEVt": {
|
||||||
|
"displayName": "远程",
|
||||||
|
"configs": {
|
||||||
|
"native": {
|
||||||
|
"preferredOptions": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web": {
|
||||||
|
"preferredOptions": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"fallbackOptions": {
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"miniGame": {
|
||||||
|
"fallbackOptions": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"configMode": "fallback",
|
||||||
|
"overwriteSettings": {
|
||||||
|
"alipay-mini-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"bytedance-mini-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"fb-instant-games": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"huawei-quick-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"oppo-mini-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"taobao-creative-app": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"taobao-mini-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"vivo-mini-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"wechatgame": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
},
|
||||||
|
"xiaomi-quick-game": {
|
||||||
|
"isRemote": true,
|
||||||
|
"compressionType": "merge_dep"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"splash-setting": {
|
||||||
|
"logo": {
|
||||||
|
"type": "default"
|
||||||
|
},
|
||||||
|
"totalTime": 500
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"label": "customSplash",
|
"label": "customSplash",
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"customSplash": {
|
"customSplash": {
|
||||||
"complete": false,
|
"complete": true,
|
||||||
"form": "https://creator-api.cocos.com/api/form/show?sid=1b8a08a3e3a81e84a39b39c967858a15"
|
"form": "https://creator-api.cocos.com/api/form/show?sid=1b8a08a3e3a81e84a39b39c967858a15"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b2141048e531cd2d44bea27887b570d0a2f300cd
|
Subproject commit f3a45363cab5962aed80e50d2f01827b3e7b9704
|
@ -1,17 +1,24 @@
|
|||||||
package cn.jisol.game.config;
|
package cn.jisol.game.config;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
|
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
|
import org.springframework.web.filter.CorsFilter;
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
class CorsConfig implements WebMvcConfigurer {
|
class CorsConfig {
|
||||||
@Override
|
@Bean
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public CorsFilter corsFilter() {
|
||||||
registry.addMapping("/**")
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||||
.allowedOrigins("*")
|
corsConfiguration.addAllowedOrigin("*");
|
||||||
.allowedMethods("GET","HEAD","POST","PUT","DELETE","OPTIONS")
|
corsConfiguration.addAllowedHeader("*");
|
||||||
.allowCredentials(true)
|
corsConfiguration.addAllowedMethod("*");
|
||||||
.maxAge(3600)
|
corsConfiguration.setAllowCredentials(true);
|
||||||
.allowedHeaders("*");
|
|
||||||
|
UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
|
||||||
|
urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
|
||||||
|
return new CorsFilter(urlBasedCorsConfigurationSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
package cn.jisol.game.config;
|
||||||
|
|
||||||
|
import cn.jisol.game.controller.argsresolver.UserMethodArgumentResolver;
|
||||||
|
import cn.jisol.game.interceptor.LoginInterceptor;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class WebConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加登录拦截器
|
||||||
|
* @param registry
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
WebMvcConfigurer.super.addInterceptors(registry);
|
||||||
|
registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/game/**");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
|
||||||
|
WebMvcConfigurer.super.addArgumentResolvers(resolvers);
|
||||||
|
resolvers.add(new UserMethodArgumentResolver());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package cn.jisol.game.controller;
|
||||||
|
|
||||||
|
public interface HttpCode {
|
||||||
|
|
||||||
|
//没有创建用户
|
||||||
|
int NOT_CREATE_PLAYER_INFO = 2001;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package cn.jisol.game.controller.argsresolver;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Target({ElementType.PARAMETER})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface CurrentUser {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package cn.jisol.game.controller.argsresolver;
|
||||||
|
|
||||||
|
import cn.jisol.game.controller.exception.TokenException;
|
||||||
|
import cn.jisol.game.data.Cache;
|
||||||
|
import cn.jisol.game.entity.User;
|
||||||
|
import org.springframework.core.MethodParameter;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.bind.support.WebDataBinderFactory;
|
||||||
|
import org.springframework.web.context.request.NativeWebRequest;
|
||||||
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||||
|
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserMethodArgumentResolver implements HandlerMethodArgumentResolver {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsParameter(MethodParameter parameter) {
|
||||||
|
if (parameter.hasParameterAnnotation(CurrentUser.class)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object resolveArgument(MethodParameter methodParameter, ModelAndViewContainer modelAndViewContainer, NativeWebRequest nativeWebRequest, WebDataBinderFactory webDataBinderFactory) throws Exception {
|
||||||
|
|
||||||
|
//获取Token
|
||||||
|
String token = nativeWebRequest.getHeader(Cache.KEY_TOKEN);
|
||||||
|
User user;
|
||||||
|
if(Objects.isNull(token) || Objects.isNull(user = Cache.TOKEN.get(token))){
|
||||||
|
//抛出Token异常
|
||||||
|
throw new TokenException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return user;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package cn.jisol.game.controller.exception;
|
||||||
|
|
||||||
|
public interface ExceptionEnum {
|
||||||
|
|
||||||
|
//Token 失效
|
||||||
|
Integer LOGIN_TOKEN = 1001;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package cn.jisol.game.controller.exception;
|
||||||
|
|
||||||
|
import cn.jisol.ngame.util.NewsContext;
|
||||||
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import static cn.jisol.game.controller.exception.ExceptionEnum.LOGIN_TOKEN;
|
||||||
|
|
||||||
|
@ControllerAdvice
|
||||||
|
public class HTTPExceptionHandler {
|
||||||
|
|
||||||
|
//登录异常
|
||||||
|
@ExceptionHandler(value = TokenException.class)
|
||||||
|
@ResponseBody
|
||||||
|
public NewsContext<String> loginExceptionHandler(TokenException e){
|
||||||
|
return NewsContext.onMessage("Token 失效",null,LOGIN_TOKEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
//全局异常
|
||||||
|
@ExceptionHandler(value = Exception.class)
|
||||||
|
@ResponseBody
|
||||||
|
public NewsContext<String> exceptionHandler(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
return NewsContext.onFail("异常错误:"+e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package cn.jisol.game.controller.exception;
|
||||||
|
|
||||||
|
public class TokenException extends Exception{
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package cn.jisol.game.controller.game;
|
||||||
|
|
||||||
|
import cn.jisol.game.controller.HttpCode;
|
||||||
|
import cn.jisol.game.controller.argsresolver.CurrentUser;
|
||||||
|
import cn.jisol.game.entity.User;
|
||||||
|
import cn.jisol.game.entity.game.Player;
|
||||||
|
import cn.jisol.game.service.PlayerService;
|
||||||
|
import cn.jisol.game.service.impl.PlayerServiceImpl;
|
||||||
|
import cn.jisol.ngame.util.NewsContext;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新手API
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/game/player")
|
||||||
|
@ResponseBody
|
||||||
|
public class PlayerController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
PlayerServiceImpl playerService;
|
||||||
|
|
||||||
|
//获取玩家信息
|
||||||
|
@GetMapping("/info")
|
||||||
|
public NewsContext<Player> getPlayerInfo(@CurrentUser User user){
|
||||||
|
|
||||||
|
Player info = playerService.getOne(Wrappers.lambdaQuery(Player.class).eq(Player::getUserId,user.getUserId()));
|
||||||
|
|
||||||
|
if (Objects.isNull(info)){
|
||||||
|
//玩家没有进入过游戏 前往 新手引导
|
||||||
|
return NewsContext.onMessage("前往新手引导",null, HttpCode.NOT_CREATE_PLAYER_INFO);
|
||||||
|
}else{
|
||||||
|
return NewsContext.onSuccess("获取成功",info);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -10,6 +10,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class Cache {
|
public class Cache {
|
||||||
|
|
||||||
|
public static String KEY_TOKEN = "Token";
|
||||||
public static Map<String, User> TOKEN = new HashMap<>();
|
public static Map<String, User> TOKEN = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package cn.jisol.game.entity.game;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@TableName("`player`")
|
||||||
|
public class Player {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long playerId; //游戏玩家Id
|
||||||
|
private String userId; //玩家Id
|
||||||
|
private String playerName; //游戏玩家名称
|
||||||
|
private Long playerCreateTime; //玩家创建时间
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package cn.jisol.game.entity.game;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 玩家宠物
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@TableName("`player_pet`")
|
||||||
|
public class PlayerPet {
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long petId; //宠物唯一Id
|
||||||
|
private String petTbId; //宠物配置表Id
|
||||||
|
private String petGrade; //宠物等级
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package cn.jisol.game.interceptor;
|
||||||
|
|
||||||
|
import cn.jisol.game.controller.exception.TokenException;
|
||||||
|
import cn.jisol.game.data.Cache;
|
||||||
|
import cn.jisol.game.entity.User;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游戏登录拦截器
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class LoginInterceptor implements HandlerInterceptor {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||||
|
//获取Token
|
||||||
|
String token = request.getHeader(Cache.KEY_TOKEN);
|
||||||
|
if(Objects.isNull(token) || Objects.isNull(Cache.TOKEN.get(token))) {
|
||||||
|
//抛出Token异常
|
||||||
|
throw new TokenException();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package cn.jisol.game.mapper;
|
||||||
|
|
||||||
|
import cn.jisol.game.entity.game.Player;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface PlayerMapper extends BaseMapper<Player> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package cn.jisol.game.service;
|
||||||
|
|
||||||
|
import cn.jisol.game.entity.User;
|
||||||
|
import cn.jisol.game.entity.game.Player;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
public interface PlayerService extends IService<Player> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.jisol.game.service.impl;
|
||||||
|
|
||||||
|
import cn.jisol.game.entity.User;
|
||||||
|
import cn.jisol.game.entity.game.Player;
|
||||||
|
import cn.jisol.game.mapper.PlayerMapper;
|
||||||
|
import cn.jisol.game.mapper.UserMapper;
|
||||||
|
import cn.jisol.game.service.PlayerService;
|
||||||
|
import cn.jisol.game.service.UserService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PlayerServiceImpl extends ServiceImpl<PlayerMapper, Player> implements PlayerService {
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user