From c4e279843092edd6cd17b9b670d3b3651020b261 Mon Sep 17 00:00:00 2001 From: "DESKTOP-5RP3AKU\\Jisol" <2858626794@qq.com> Date: Wed, 8 Nov 2023 02:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/prefab/ui/Home/HomeView.prefab | 384 +++- .../prefab/ui/Loading/LoadingView.prefab | 6 +- .../assets/resources/prefab/ui/System.meta | 9 + .../prefab/ui/System/LoginView.prefab | 2014 +++++++++++++++++ .../prefab/ui/System/LoginView.prefab.meta | 13 + .../resources/prefab/ui/System/Tips.meta | 9 + .../prefab/ui/System/Tips/TipsView.prefab | 601 +++++ .../ui/System/Tips/TipsView.prefab.meta | 13 + JisolGameCocos/assets/script/App.ts | 28 +- JisolGameCocos/assets/script/GData.ts | 9 - JisolGameCocos/assets/script/Main.ts | 8 +- .../battle/base/bullet/GButtleDefault.ts | 2 +- .../script/battle/base/common/GEffectUtil.ts | 2 +- .../assets/script/battle/base/common/GNode.ts | 2 +- JisolGameCocos/assets/script/consts.meta | 9 + JisolGameCocos/assets/script/consts/API.ts | 32 + .../assets/script/consts/API.ts.meta | 9 + .../assets/script/{ => consts}/GActionEnum.ts | 0 .../script/{ => consts}/GActionEnum.ts.meta | 2 +- JisolGameCocos/assets/script/consts/GData.ts | 30 + .../assets/script/{ => consts}/GData.ts.meta | 2 +- .../assets/script/ui/Home/HomeView.ts | 9 + JisolGameCocos/assets/script/ui/System.meta | 9 + .../assets/script/ui/System/LoginView.ts | 58 + .../assets/script/ui/System/LoginView.ts.meta | 9 + .../assets/script/ui/System/Tips.meta | 9 + .../assets/script/ui/System/Tips/TipsView.ts | 35 + .../script/ui/System/Tips/TipsView.ts.meta | 9 + JisolGameCocos/assets/script/ui/UIConfig.ts | 38 +- JisolGameCocos/extensions/ngame | 2 +- JisolGameServer/JNGame | 2 +- .../jisol/game/controller/UserController.java | 7 +- .../jisol/game/listener/InitGameListener.java | 8 +- .../{dto/LoginDTO.java => vo/LoginVO.java} | 4 +- 34 files changed, 3330 insertions(+), 53 deletions(-) create mode 100644 JisolGameCocos/assets/resources/prefab/ui/System.meta create mode 100644 JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab create mode 100644 JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab.meta create mode 100644 JisolGameCocos/assets/resources/prefab/ui/System/Tips.meta create mode 100644 JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab create mode 100644 JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab.meta delete mode 100644 JisolGameCocos/assets/script/GData.ts create mode 100644 JisolGameCocos/assets/script/consts.meta create mode 100644 JisolGameCocos/assets/script/consts/API.ts create mode 100644 JisolGameCocos/assets/script/consts/API.ts.meta rename JisolGameCocos/assets/script/{ => consts}/GActionEnum.ts (100%) rename JisolGameCocos/assets/script/{ => consts}/GActionEnum.ts.meta (70%) create mode 100644 JisolGameCocos/assets/script/consts/GData.ts rename JisolGameCocos/assets/script/{ => consts}/GData.ts.meta (70%) create mode 100644 JisolGameCocos/assets/script/ui/System.meta create mode 100644 JisolGameCocos/assets/script/ui/System/LoginView.ts create mode 100644 JisolGameCocos/assets/script/ui/System/LoginView.ts.meta create mode 100644 JisolGameCocos/assets/script/ui/System/Tips.meta create mode 100644 JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts create mode 100644 JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts.meta rename JisolGameServer/Main/src/main/java/cn/jisol/game/{dto/LoginDTO.java => vo/LoginVO.java} (81%) diff --git a/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab b/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab index 67e40c60..c0134c50 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab @@ -44,22 +44,25 @@ }, { "__id__": 113 + }, + { + "__id__": 128 } ], "_active": true, "_components": [ { - "__id__": 128 + "__id__": 143 }, { - "__id__": 130 + "__id__": 145 }, { - "__id__": 132 + "__id__": 147 } ], "_prefab": { - "__id__": 134 + "__id__": 149 }, "_lpos": { "__type__": "cc.Vec3", @@ -2358,7 +2361,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": -257.954, - "y": 414.543, + "y": 444.499, "z": 0 }, "_lrot": { @@ -2721,7 +2724,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": -122.84, - "y": 414.543, + "y": 444.499, "z": 0 }, "_lrot": { @@ -3053,6 +3056,369 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "Button-004", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 129 + } + ], + "_active": true, + "_components": [ + { + "__id__": 135 + }, + { + "__id__": 137 + }, + { + "__id__": 139 + } + ], + "_prefab": { + "__id__": 142 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -257.216, + "y": 388.865, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 128 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 130 + }, + { + "__id__": 132 + } + ], + "_prefab": { + "__id__": 134 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 129 + }, + "_enabled": true, + "__prefab": { + "__id__": 131 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0dYLifIW9OqYbvWJwA9FIw" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 129 + }, + "_enabled": true, + "__prefab": { + "__id__": 133 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "清除登录", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "78eEBfEAJCZ76oiIOAdJLy" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0bQ8J+1HpGQJw+S7QHXV1Z", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 128 + }, + "_enabled": true, + "__prefab": { + "__id__": 136 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b4khKqgSZBh58V5TThdbxj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 128 + }, + "_enabled": true, + "__prefab": { + "__id__": 138 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@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": "72VDDxVNFE76GqA+sf39oX" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 128 + }, + "_enabled": true, + "__prefab": { + "__id__": 140 + }, + "clickEvents": [ + { + "__id__": 141 + } + ], + "_interactable": true, + "_transition": 2, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 128 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f2hvwmdOlKJZs7O6wGRUDM" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "15051raQgZN6J5ICgY2OfSS", + "handler": "onClickToken", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "37fEjaHr5OLJgNvj0MHHmo", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -3063,7 +3429,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 129 + "__id__": 144 }, "_contentSize": { "__type__": "cc.Size", @@ -3091,7 +3457,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 131 + "__id__": 146 }, "_alignFlags": 45, "_target": null, @@ -3127,7 +3493,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 133 + "__id__": 148 }, "frameText": { "__id__": 19 diff --git a/JisolGameCocos/assets/resources/prefab/ui/Loading/LoadingView.prefab b/JisolGameCocos/assets/resources/prefab/ui/Loading/LoadingView.prefab index f3c4acb3..3c378cf2 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/Loading/LoadingView.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/Loading/LoadingView.prefab @@ -45,7 +45,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 720, + "x": 0, "y": 0, "z": 0 }, @@ -758,8 +758,8 @@ }, "_alignFlags": 45, "_target": null, - "_left": 720, - "_right": -720, + "_left": 0, + "_right": 0, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, diff --git a/JisolGameCocos/assets/resources/prefab/ui/System.meta b/JisolGameCocos/assets/resources/prefab/ui/System.meta new file mode 100644 index 00000000..b765c542 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/System.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "1a5aef95-e0fa-4f73-816a-78c297501d3d", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab b/JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab new file mode 100644 index 00000000..ee2fb3dd --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab @@ -0,0 +1,2014 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "LoginView", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "LoginView", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 82 + }, + { + "__id__": 84 + }, + { + "__id__": 86 + } + ], + "_prefab": { + "__id__": 88 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 23 + }, + { + "__id__": 43 + }, + { + "__id__": 60 + } + ], + "_active": true, + "_components": [ + { + "__id__": 77 + }, + { + "__id__": 79 + } + ], + "_prefab": { + "__id__": 81 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "EditBox", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 4 + }, + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + }, + { + "__id__": 18 + }, + { + "__id__": 20 + } + ], + "_prefab": { + "__id__": 22 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 91.91999999999996, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "TEXT_LABEL", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 5 + }, + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 9 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -148, + "y": 25, + "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__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 298, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0cu+InkgVC47dVQqZq/RQW" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 8 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 40, + "_fontSize": 26, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c1jGu0OulF8pfQYXbi+FsV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "88wwMIvQFPh5jxwiiNtJxP", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "PLACEHOLDER_LABEL", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 3 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 15 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -148, + "y": 25, + "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__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 12 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 298, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b3ze4x4IZASqOa/dC7ZDjg" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 10 + }, + "_enabled": true, + "__prefab": { + "__id__": 14 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 187, + "g": 187, + "b": 187, + "a": 255 + }, + "_string": "输入账号", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 26, + "_fontSize": 26, + "_fontFamily": "Arial", + "_lineHeight": 50, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "54cUDIomFIIafV8s99QuRg" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f3kd/9W7ZDAaQqcAR9n+Pg", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ec2/RLFE5NGZ7IwBtOAdN/" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "bd1bcaba-bd7d-4a71-b143-997c882383e4@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": "0e0wCDWfVEkrLF33AibIz/" + }, + { + "__type__": "cc.EditBox", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 21 + }, + "editingDidBegan": [], + "textChanged": [], + "editingDidEnded": [], + "editingReturn": [], + "_textLabel": { + "__id__": 7 + }, + "_placeholderLabel": { + "__id__": 13 + }, + "_returnType": 0, + "_string": "", + "_tabIndex": 0, + "_backgroundImage": { + "__uuid__": "bd1bcaba-bd7d-4a71-b143-997c882383e4@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_inputFlag": 5, + "_inputMode": 6, + "_maxLength": 8, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "d9MYMEhd9C9oqqInVc2l7m" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "df1bRQNAFFkbI3afR9docZ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "EditBox-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 24 + }, + { + "__id__": 30 + } + ], + "_active": true, + "_components": [ + { + "__id__": 36 + }, + { + "__id__": 38 + }, + { + "__id__": 40 + } + ], + "_prefab": { + "__id__": 42 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 23.876, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "TEXT_LABEL", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 23 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 29 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -148, + "y": 25, + "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__": 24 + }, + "_enabled": true, + "__prefab": { + "__id__": 26 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 298, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b1VEmX9tdEULVtzOhglpC2" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 24 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 40, + "_fontSize": 26, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e2qzi8pI5PWJXIeHRslkyS" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6bTi4gmotF5ZfyZuahfNqx", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "PLACEHOLDER_LABEL", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 23 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 31 + }, + { + "__id__": 33 + } + ], + "_prefab": { + "__id__": 35 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -148, + "y": 25, + "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__": 30 + }, + "_enabled": true, + "__prefab": { + "__id__": 32 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 298, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a1C4yti6lAlqrxc3gF0uQ8" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 30 + }, + "_enabled": true, + "__prefab": { + "__id__": 34 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 187, + "g": 187, + "b": 187, + "a": 255 + }, + "_string": "输入密码", + "_horizontalAlign": 0, + "_verticalAlign": 1, + "_actualFontSize": 26, + "_fontSize": 26, + "_fontFamily": "Arial", + "_lineHeight": 50, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "fdOKvQW7BBFo0ddCW8u263" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "efOQ4wch5Kfod4yyaFv4p8", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 23 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cc3HwBUTBBDb1jth82EUjL" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 23 + }, + "_enabled": true, + "__prefab": { + "__id__": 39 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "bd1bcaba-bd7d-4a71-b143-997c882383e4@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": "c1j4W0lPBNe4qXAvZSr+iN" + }, + { + "__type__": "cc.EditBox", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 23 + }, + "_enabled": true, + "__prefab": { + "__id__": 41 + }, + "editingDidBegan": [], + "textChanged": [], + "editingDidEnded": [], + "editingReturn": [], + "_textLabel": { + "__id__": 27 + }, + "_placeholderLabel": { + "__id__": 33 + }, + "_returnType": 0, + "_string": "", + "_tabIndex": 0, + "_backgroundImage": { + "__uuid__": "bd1bcaba-bd7d-4a71-b143-997c882383e4@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_inputFlag": 5, + "_inputMode": 6, + "_maxLength": 8, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "89oRwWEt1A6IDzFea5l8JI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7fflqnhhpPYL1jMXmm/GdF", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Button", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 44 + } + ], + "_active": true, + "_components": [ + { + "__id__": 52 + }, + { + "__id__": 54 + }, + { + "__id__": 56 + } + ], + "_prefab": { + "__id__": 59 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -149.159, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 43 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 45 + }, + { + "__id__": 47 + }, + { + "__id__": 49 + } + ], + "_prefab": { + "__id__": 51 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 44 + }, + "_enabled": true, + "__prefab": { + "__id__": 46 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9ct7uviLtJeL62ijNjnJlu" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 44 + }, + "_enabled": true, + "__prefab": { + "__id__": 48 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "注册", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 24, + "_fontSize": 24, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "75QENn+WVJrqFnCGU/30Vj" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 44 + }, + "_enabled": true, + "__prefab": { + "__id__": 50 + }, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "fc2TsNn/tHD6Z55jUfPXvv" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a3ArWYqQRMs4KUvbZKwi+C", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 43 + }, + "_enabled": true, + "__prefab": { + "__id__": 53 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "22sWDaOZNGC5L77pK46M5k" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 43 + }, + "_enabled": false, + "__prefab": { + "__id__": 55 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@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": "74cG5mZuBKcqi8//yP4rv9" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 43 + }, + "_enabled": true, + "__prefab": { + "__id__": 57 + }, + "clickEvents": [ + { + "__id__": 58 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 43 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "76DYADeGBDKKxK1ifS8MtV" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "d36bcqouzBBm74l7Z8QrvOH", + "handler": "onClickRegister", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "42FCw3N7ZF85hyK997/2t4", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Button-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 61 + } + ], + "_active": true, + "_components": [ + { + "__id__": 69 + }, + { + "__id__": 71 + }, + { + "__id__": 73 + } + ], + "_prefab": { + "__id__": 76 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -80.402, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 60 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 62 + }, + { + "__id__": 64 + }, + { + "__id__": 66 + } + ], + "_prefab": { + "__id__": 68 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 61 + }, + "_enabled": true, + "__prefab": { + "__id__": 63 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2fOoe6fsxBjIfDm7DTclle" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 61 + }, + "_enabled": true, + "__prefab": { + "__id__": 65 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "登录", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 36, + "_fontSize": 36, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1eNq0veRlD6KELBvBEtveJ" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 61 + }, + "_enabled": true, + "__prefab": { + "__id__": 67 + }, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cfjoMY3A1O+L5DEQRrMvbz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "begPCPI1BC1Y0dZT83rSRQ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 60 + }, + "_enabled": true, + "__prefab": { + "__id__": 70 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 70 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6eHCqTVSRDK47/TAmxzC6a" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 60 + }, + "_enabled": true, + "__prefab": { + "__id__": 72 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@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": "d2kO+cojNMbLCw4Cz46F0n" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 60 + }, + "_enabled": true, + "__prefab": { + "__id__": 74 + }, + "clickEvents": [ + { + "__id__": 75 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 60 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9dDzwhfvlO4oSAx9h0kBmH" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "d36bcqouzBBm74l7Z8QrvOH", + "handler": "onClickLogin", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1fzFs/Iz1NCoHvBiwchbW4", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 78 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 500, + "height": 400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ecidKUxkNEfqK97cDYGil+" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 80 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2aCxNjeeBBeK2AfMf3007n" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4c3ek41YFH37tQ9DpgRw3G", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 83 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 720, + "height": 1280 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1dgJxmIH5HIpXD6y0/xMwI" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 85 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "582zBz6m5DKqmkTkiS/LE0" + }, + { + "__type__": "d36bcqouzBBm74l7Z8QrvOH", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 87 + }, + "account": { + "__id__": 20 + }, + "password": { + "__id__": 40 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "13dJCa1M9D573/pt6oSBxt" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "08xLpDDa9NlK3pgR7XiOqb", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab.meta new file mode 100644 index 00000000..7e5fc329 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/System/LoginView.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.49", + "importer": "prefab", + "imported": true, + "uuid": "ab426a3a-eda6-4ddb-a87f-9eff7359e351", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "LoginView" + } +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/System/Tips.meta b/JisolGameCocos/assets/resources/prefab/ui/System/Tips.meta new file mode 100644 index 00000000..96a8dcc1 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/System/Tips.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "048f388d-5001-44c6-b9ee-10d65348b551", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab b/JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab new file mode 100644 index 00000000..e97b5331 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab @@ -0,0 +1,601 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "TipsView", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "TipsView", + "_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": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "tips", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 9 + } + ], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 21 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 490, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__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 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 500, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "bcShr1JEFCyIp8BaO1nE+o" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 7 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f70O4oDUJDA7XXDFf5bytv" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "19ZAH9lVNDN7qtcsLjO0zS", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 10 + }, + { + "__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": 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__": 9 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 148, + "height": 54.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3auNhBKbFIDrRZBSoyfsPl" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 9 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "这是一个提示", + "_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": "29UjfyEClH24RGffdP33o3" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 9 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4eoEbFXjNLCrsBdIXgKOB5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "eap34/Hj9C2Z/ZH5X2XSmX", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 18 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "80aM9gzLxLGb+zb/MnhRiR" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_alignFlags": 1, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 100, + "_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": "c4w4iM4n1AdJY5o2IqHxM5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9a0GHPs5FIgIRrpt3OoezN", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 23 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 720, + "height": 1280 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1dgJxmIH5HIpXD6y0/xMwI" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "582zBz6m5DKqmkTkiS/LE0" + }, + { + "__type__": "76584YE7/1K9rPvckaow3Jg", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "text": { + "__id__": 12 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2dwIuZkhpJJbECbfdTbZNH" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "08xLpDDa9NlK3pgR7XiOqb", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab.meta new file mode 100644 index 00000000..15950d7f --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/System/Tips/TipsView.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.49", + "importer": "prefab", + "imported": true, + "uuid": "e6448a2d-8905-4c78-b693-d7cb42c22021", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "TipsView" + } +} diff --git a/JisolGameCocos/assets/script/App.ts b/JisolGameCocos/assets/script/App.ts index 545de8d5..17f5bfef 100644 --- a/JisolGameCocos/assets/script/App.ts +++ b/JisolGameCocos/assets/script/App.ts @@ -14,20 +14,21 @@ import { JsonLoad, JsonUtil } from "../../extensions/ngame/assets/ngame/util/Jso import NGameMessage from "../../extensions/ngame/assets/ngame/util/NGameMessage"; import axios from "../../extensions/ngame/assets/plugins/axios.js"; import GBattleModeManager from "./battle/GBattleModeManager"; -import { GLayer, UIConfig } from "./ui/UIConfig"; +import { GLayer, GUI, UIConfig } from "./ui/UIConfig"; import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSystem"; import { sp } from "cc"; import { SpriteFrame } from "cc"; import Loading from "../../extensions/ngame/assets/ngame/util/Loading"; import { TB, Tables } from "../resources/config/data/schema"; import { JsonAsset } from "cc"; -import { GAction } from "./GActionEnum"; +import { GAction } from "./consts/GActionEnum"; +import { StorageData, StorageEnum } from "./consts/GData"; -let IP = "localhost"; +let IP = "kyu.jisol.cn"; //重写UI class JNGLayer extends JNLayer{ - layers: string[] = [GLayer.View]; + layers: string[] = [GLayer.View,GLayer.Popup,GLayer.Tips]; views: { [key: string]: JNLayerInfo; } = UIConfig; } @@ -37,12 +38,27 @@ class JNGSocket extends JNSocket{ this.on(GAction.TOKEN_EXPIRED,this.onTokenExpired.bind(this)); await super.onInit(); } - public url() { - return `ws://${IP}:8080/websocket/b113a866e5664f46b386c12c985d394a`; + public url():Promise { + return new Promise(resolve => { + //获取Token + let token = StorageData.get(StorageEnum.Token); + if(token){ + resolve(`ws://${IP}:8080/websocket/${token}`) + return; + } + + const loginResolve = (token:string) => { + resolve(`ws://${IP}:8080/websocket/${token}`); + } + //如果没有Token则弹出登入页面 + app.layer.Open(GUI.Login,loginResolve); + }); } //Token失效 onTokenExpired(){ console.log("onTokenExpired"); + //清除Token + StorageData.delect(StorageEnum.Token); } } diff --git a/JisolGameCocos/assets/script/GData.ts b/JisolGameCocos/assets/script/GData.ts deleted file mode 100644 index 38ef597c..00000000 --- a/JisolGameCocos/assets/script/GData.ts +++ /dev/null @@ -1,9 +0,0 @@ - -export const GData = { - - layer: { - World: 1, - } - -} - diff --git a/JisolGameCocos/assets/script/Main.ts b/JisolGameCocos/assets/script/Main.ts index 39614648..92fd8e1f 100644 --- a/JisolGameCocos/assets/script/Main.ts +++ b/JisolGameCocos/assets/script/Main.ts @@ -23,11 +23,11 @@ export class Main extends Component { {path:"proto/GDemo"} ]); - // //发生帧同步开始 - // app.socket.Send(JNSyncAction.NSyncFrameStart); + //发生帧同步开始 + app.socket.Send(JNSyncAction.NSyncFrameStart); - // // 创建世界 - // director.getScene().addChild(instantiate(this.WorldPrefab)); + // 创建世界 + director.getScene().addChild(instantiate(this.WorldPrefab)); } diff --git a/JisolGameCocos/assets/script/battle/base/bullet/GButtleDefault.ts b/JisolGameCocos/assets/script/battle/base/bullet/GButtleDefault.ts index 6ffc7611..ec58a0e1 100644 --- a/JisolGameCocos/assets/script/battle/base/bullet/GButtleDefault.ts +++ b/JisolGameCocos/assets/script/battle/base/bullet/GButtleDefault.ts @@ -7,7 +7,7 @@ import { size } from "cc"; import { Size } from "cc"; import { v3 } from "cc"; import { Vec2 } from "cc"; -import { GData } from "../../../GData"; +import { GData } from "../../../consts/GData"; const { ccclass, property } = _decorator; export interface GButtleDefaultInfo{ diff --git a/JisolGameCocos/assets/script/battle/base/common/GEffectUtil.ts b/JisolGameCocos/assets/script/battle/base/common/GEffectUtil.ts index bd1ac717..f8eadb63 100644 --- a/JisolGameCocos/assets/script/battle/base/common/GEffectUtil.ts +++ b/JisolGameCocos/assets/script/battle/base/common/GEffectUtil.ts @@ -2,7 +2,7 @@ import { UITransform } from "cc"; import { Node } from "cc"; import { sp } from "cc"; import JNSkeleton from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/spine/JNFrameSkeleton"; -import { GData } from "../../../GData"; +import { GData } from "../../../consts/GData"; import GNode from "./GNode"; export default class GEffectUtil { diff --git a/JisolGameCocos/assets/script/battle/base/common/GNode.ts b/JisolGameCocos/assets/script/battle/base/common/GNode.ts index 8ebbff08..f505c91e 100644 --- a/JisolGameCocos/assets/script/battle/base/common/GNode.ts +++ b/JisolGameCocos/assets/script/battle/base/common/GNode.ts @@ -1,5 +1,5 @@ import { Node } from "cc"; -import { GData } from "../../../GData"; +import { GData } from "../../../consts/GData"; import { UITransform } from "cc"; diff --git a/JisolGameCocos/assets/script/consts.meta b/JisolGameCocos/assets/script/consts.meta new file mode 100644 index 00000000..0c90c559 --- /dev/null +++ b/JisolGameCocos/assets/script/consts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "c8e51348-b270-4894-9e0e-d27172e9324e", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/consts/API.ts b/JisolGameCocos/assets/script/consts/API.ts new file mode 100644 index 00000000..bdcfd840 --- /dev/null +++ b/JisolGameCocos/assets/script/consts/API.ts @@ -0,0 +1,32 @@ +import { app } from "../App"; +import { GUI } from "../ui/UIConfig"; + +const http = app.api; + +const RData = (data:any) => { + if(data.data.state == 200){ + return data.data.data; + }else{ + //弹出提示 + app.layer.Open(GUI.Tips,{text:data.data.msg}); + return null; + } +} + +export interface UserVO{ + userId:number, //玩家Id + userName:string, //玩家名称 + userPass:string, //玩家密码 +} +export interface UserLoginVO{ + token:string, //token + user:UserVO, //玩家信息 +} + +export const API = { + + 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, + +} + diff --git a/JisolGameCocos/assets/script/consts/API.ts.meta b/JisolGameCocos/assets/script/consts/API.ts.meta new file mode 100644 index 00000000..2d0ade2b --- /dev/null +++ b/JisolGameCocos/assets/script/consts/API.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "503f2086-2c48-470c-90e0-98e92c5dd354", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/GActionEnum.ts b/JisolGameCocos/assets/script/consts/GActionEnum.ts similarity index 100% rename from JisolGameCocos/assets/script/GActionEnum.ts rename to JisolGameCocos/assets/script/consts/GActionEnum.ts diff --git a/JisolGameCocos/assets/script/GActionEnum.ts.meta b/JisolGameCocos/assets/script/consts/GActionEnum.ts.meta similarity index 70% rename from JisolGameCocos/assets/script/GActionEnum.ts.meta rename to JisolGameCocos/assets/script/consts/GActionEnum.ts.meta index 6c211ca7..5063a85a 100644 --- a/JisolGameCocos/assets/script/GActionEnum.ts.meta +++ b/JisolGameCocos/assets/script/consts/GActionEnum.ts.meta @@ -2,7 +2,7 @@ "ver": "4.0.23", "importer": "typescript", "imported": true, - "uuid": "b0d5a426-cf84-4bbb-b06f-533234076520", + "uuid": "ed7dee3c-9396-4f08-bd29-deb690ca6cf8", "files": [], "subMetas": {}, "userData": {} diff --git a/JisolGameCocos/assets/script/consts/GData.ts b/JisolGameCocos/assets/script/consts/GData.ts new file mode 100644 index 00000000..e5f8e852 --- /dev/null +++ b/JisolGameCocos/assets/script/consts/GData.ts @@ -0,0 +1,30 @@ +import { sys } from "cc"; + +export enum StorageEnum{ + + Token = "Storage_Token", // Token + +} + +export class StorageData { + + static get(key:string):string{ + return sys.localStorage.getItem(key); + } + + static set(key:string,value:string){ + sys.localStorage.setItem(key,value); + } + + static delect(key:string){ + sys.localStorage.removeItem(key); + } + +} + +export const GData = { + layer: { + World: 1, + } +} + diff --git a/JisolGameCocos/assets/script/GData.ts.meta b/JisolGameCocos/assets/script/consts/GData.ts.meta similarity index 70% rename from JisolGameCocos/assets/script/GData.ts.meta rename to JisolGameCocos/assets/script/consts/GData.ts.meta index 4ec714ad..1e15b107 100644 --- a/JisolGameCocos/assets/script/GData.ts.meta +++ b/JisolGameCocos/assets/script/consts/GData.ts.meta @@ -2,7 +2,7 @@ "ver": "4.0.23", "importer": "typescript", "imported": true, - "uuid": "e04ba6b5-5d91-4424-969a-8faa3dacf167", + "uuid": "d784fece-1a89-44ad-9119-29b965912c7d", "files": [], "subMetas": {}, "userData": {} diff --git a/JisolGameCocos/assets/script/ui/Home/HomeView.ts b/JisolGameCocos/assets/script/ui/Home/HomeView.ts index f1657eb6..fe3fda08 100644 --- a/JisolGameCocos/assets/script/ui/Home/HomeView.ts +++ b/JisolGameCocos/assets/script/ui/Home/HomeView.ts @@ -4,6 +4,8 @@ import { Toggle } from 'cc'; import { JNSyncAction } from '../../../../extensions/ngame/assets/ngame/sync/JNSyncAction'; import { director } from 'cc'; import { WorldCanvas } from '../../WorldCanvas'; +import { StorageData, StorageEnum } from '../../consts/GData'; +import { GUI } from '../UIConfig'; const { ccclass, property } = _decorator; @ccclass('HomeView') @@ -39,10 +41,17 @@ export class HomeView extends JNGLayerBase { //前往PVP onClickGoPVP(){ director.getScene().getComponentInChildren(WorldCanvas).index = 0; + app.layer.Open(GUI.Tips,{text:"切换成功 请点击重置"}); } //前往无尽 onClickGoOnHook(){ director.getScene().getComponentInChildren(WorldCanvas).index = 1; + app.layer.Open(GUI.Tips,{text:"切换成功 请点击重置"}); + } + //清除Token + onClickToken(){ + StorageData.delect(StorageEnum.Token); + app.layer.Open(GUI.Tips,{text:"清除成功"}); } } diff --git a/JisolGameCocos/assets/script/ui/System.meta b/JisolGameCocos/assets/script/ui/System.meta new file mode 100644 index 00000000..e1924d74 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/System.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "beb0794b-9e15-4b22-8b23-48017459df89", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/System/LoginView.ts b/JisolGameCocos/assets/script/ui/System/LoginView.ts new file mode 100644 index 00000000..03030ebc --- /dev/null +++ b/JisolGameCocos/assets/script/ui/System/LoginView.ts @@ -0,0 +1,58 @@ +import { _decorator, Component, Node } from 'cc'; +import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase'; +import { API } from '../../consts/API'; +import { EditBox } from 'cc'; +import { app } from '../../App'; +import { GUI } from '../UIConfig'; +import { StorageData, StorageEnum } from '../../consts/GData'; +const { ccclass, property } = _decorator; + +@ccclass('LoginView') +export class LoginView extends JNLayerBase { + + resolve:(token:string) => void; + + @property(EditBox) + account:EditBox; + @property(EditBox) + password:EditBox; + + onJNLoad(resolve?: (token:string) => void): void { + super.onJNLoad(); + this.resolve = resolve; + } + + + //点击登录 + async onClickLogin(){ + //校验 + if(!(this.account.string.length) || !(this.password.string.length)){ + app.layer.Open(GUI.Tips,{text:"请输入账号密码"}); + return; + } + + //登录账号 + let info = await API.UserLogin(this.account.string,this.password.string); + if(info){ + app.layer.Open(GUI.Tips,{text:"登录成功"}); + //保存Token + StorageData.set(StorageEnum.Token,info.token); + this.resolve(info.token); + this.onJNClose(); + } + } + + //点击注册账号 + async onClickRegister(){ + //注册账号 + let info = await API.UserRegister(); + //显示提示 + app.layer.Open(GUI.Tips,{text:"注册成功"}); + //显示账号和密码 + this.account.string = `${info.userId}`; + this.password.string = info.userPass; + } + +} + + diff --git a/JisolGameCocos/assets/script/ui/System/LoginView.ts.meta b/JisolGameCocos/assets/script/ui/System/LoginView.ts.meta new file mode 100644 index 00000000..df2f5857 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/System/LoginView.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "d36bcaa8-bb30-419b-be25-ed9f10aef387", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/System/Tips.meta b/JisolGameCocos/assets/script/ui/System/Tips.meta new file mode 100644 index 00000000..961bf851 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/System/Tips.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "072aa010-a6b8-4ff4-b104-5bc19b5ac2fb", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts b/JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts new file mode 100644 index 00000000..a66f39d9 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts @@ -0,0 +1,35 @@ +import { _decorator, Component, Node } from 'cc'; +import JNLayerBase from '../../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase'; +import { app } from '../../../App'; +import { Label } from 'cc'; +const { ccclass, property } = _decorator; + +export interface TipsArgs{ + text?:string; //内容 + time?:number; //显示时间 +} + +@ccclass('TipsView') +export class TipsView extends JNLayerBase { + + @property(Label) + text:Label; + + onJNLoad(data: TipsArgs = {}): void { + if(!data) data = {}; + + data.text = data.text || "这是一个提示"; + data.time = data.time || 3; + + //显示弹窗内容 + this.text.string = data.text; + + this.scheduleOnce(() => { + this.onJNClose(); + },data.time) + + } + +} + + diff --git a/JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts.meta b/JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts.meta new file mode 100644 index 00000000..593a0829 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/System/Tips/TipsView.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "76584604-effd-4af6-b3ef-7246a8c37260", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/UIConfig.ts b/JisolGameCocos/assets/script/ui/UIConfig.ts index b78251e1..3d6b60c5 100644 --- a/JisolGameCocos/assets/script/ui/UIConfig.ts +++ b/JisolGameCocos/assets/script/ui/UIConfig.ts @@ -3,15 +3,39 @@ import { JNLayerAnim, JNLayerInfo } from "../../../extensions/ngame/assets/ngame export enum GLayer{ View = "View", + Popup = "Popup", + Tips = "Tips", } export enum GUI{ - Loading = "Loading", - Home = "Home", + /** 系统UI */ + Login = "Login", //登录页面 + Loading = "Loading", //加载页面 + Tips = "Tips", //提示 + + Home = "Home", //主页面 } -export const UIConfig:{ [key: string]: JNLayerInfo; } = { - [GUI.Loading]:{ + +//系统UI +const UISystemConfig:{ [key: string]: JNLayerInfo; } = { + [GUI.Tips]:{ + layer:GLayer.Tips, + uri: "prefab/ui/System/Tips/TipsView", + anims:{ + front:JNLayerAnim.BackOutOpen, + back:JNLayerAnim.BackInClose + } + }, + [GUI.Login]:{ + layer:GLayer.Popup, + uri: "prefab/ui/System/LoginView", + anims:{ + front:JNLayerAnim.BackOutOpen, + back:JNLayerAnim.BackInClose + } + }, + [GUI.Loading]:{ layer:GLayer.View, uri: "prefab/ui/Loading/LoadingView", anims:{ @@ -19,7 +43,10 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = { backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)} }, }, - [GUI.Home]:{ +} + +export const UIConfig:{ [key: string]: JNLayerInfo; } = { + [GUI.Home]:{ layer:GLayer.View, uri: "prefab/ui/Home/HomeView", anims:{ @@ -29,5 +56,6 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = { backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)} }, }, + ...UISystemConfig } diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index 661098ae..dd626085 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit 661098aefe9d7e1c6f0d3a4c587b3b15cc27abd8 +Subproject commit dd626085f5719916c1732693c1e09546e1ef4756 diff --git a/JisolGameServer/JNGame b/JisolGameServer/JNGame index a23b0bc2..b2141048 160000 --- a/JisolGameServer/JNGame +++ b/JisolGameServer/JNGame @@ -1 +1 @@ -Subproject commit a23b0bc24282b113594d777e7db34d03379f07b6 +Subproject commit b2141048e531cd2d44bea27887b570d0a2f300cd diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/UserController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/UserController.java index 8edd0aa2..8b1cdf7c 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/UserController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/UserController.java @@ -3,9 +3,8 @@ package cn.jisol.game.controller; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.RandomUtil; import cn.jisol.game.data.Cache; -import cn.jisol.game.dto.LoginDTO; +import cn.jisol.game.vo.LoginVO; import cn.jisol.game.entity.User; -import cn.jisol.game.service.UserService; import cn.jisol.game.service.impl.UserServiceImpl; import cn.jisol.ngame.util.NewsContext; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -44,7 +43,7 @@ public class UserController { @ApiImplicitParams({}) @ApiOperation(value = "登录账号") @PostMapping("/login") - public NewsContext login(@RequestBody User user){ + public NewsContext login(@RequestBody User user){ if(Objects.isNull(user.getUserId()) || Objects.isNull(user.getUserPass())){ return NewsContext.onFail("登录失败"); } @@ -56,7 +55,7 @@ public class UserController { //生成Token String token = IdUtil.simpleUUID(); Cache.TOKEN.put(token,user); - return NewsContext.onSuccess("登录成功", LoginDTO.builder().user(user).token(token).build()); + return NewsContext.onSuccess("登录成功", LoginVO.builder().user(user).token(token).build()); }else{ return NewsContext.onFail("登录失败"); } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/listener/InitGameListener.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/listener/InitGameListener.java index d30e6519..7a11001c 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/listener/InitGameListener.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/listener/InitGameListener.java @@ -1,15 +1,16 @@ package cn.jisol.game.listener; import cfg.Tables; +import cn.hutool.core.io.resource.ResourceUtil; import cn.jisol.game.data.TD; import com.google.gson.JsonParser; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component; -import org.springframework.util.ResourceUtils; import java.io.FileReader; import java.io.IOException; +import java.io.InputStream; @Component public class InitGameListener { @@ -18,11 +19,10 @@ public class InitGameListener { public void onApplicationEvent(ContextRefreshedEvent event) { try { + InputStream fileInputStream; TD.DATA = new Tables(file -> { System.out.println("加载配置表:"+file); - return JsonParser.parseReader( - new FileReader(ResourceUtils.getFile("classpath:json/"+file+".json")) - ); + return JsonParser.parseString(ResourceUtil.readUtf8Str("json/"+file+".json")); }); } catch (IOException e) { e.printStackTrace(); diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/dto/LoginDTO.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/vo/LoginVO.java similarity index 81% rename from JisolGameServer/Main/src/main/java/cn/jisol/game/dto/LoginDTO.java rename to JisolGameServer/Main/src/main/java/cn/jisol/game/vo/LoginVO.java index 567ac9d2..5f06ac88 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/dto/LoginDTO.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/vo/LoginVO.java @@ -1,4 +1,4 @@ -package cn.jisol.game.dto; +package cn.jisol.game.vo; import cn.jisol.game.entity.User; import io.swagger.annotations.ApiModel; @@ -8,7 +8,7 @@ import lombok.Data; @ApiModel(value = "登录返回") @Builder @Data -public class LoginDTO { +public class LoginVO { User user; //玩家信息 String token; //登录token }