diff --git a/JisolGameCocos/assets/resources/UICanvas.prefab b/JisolGameCocos/assets/resources/UICanvas.prefab index 92f052b4..9cc79b76 100644 --- a/JisolGameCocos/assets/resources/UICanvas.prefab +++ b/JisolGameCocos/assets/resources/UICanvas.prefab @@ -147,7 +147,7 @@ }, "_depth": 1, "_stencil": 0, - "_clearFlags": 7, + "_clearFlags": 6, "_rect": { "__type__": "cc.Rect", "x": 0, diff --git a/JisolGameCocos/assets/resources/prefab/ui/主页/HomeView.prefab b/JisolGameCocos/assets/resources/prefab/ui/主页/HomeView.prefab index 1399fd63..35a896f0 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/主页/HomeView.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/主页/HomeView.prefab @@ -81,7 +81,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 720, + "x": 0, "y": 0, "z": 0 }, @@ -4387,8 +4387,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/主页/MainView.prefab b/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab index 98931b71..10556889 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab @@ -25,36 +25,36 @@ "__id__": 10 }, { - "__id__": 59 - }, - { - "__id__": 143 + "__id__": 78 }, { "__id__": 162 }, { - "__id__": 177 - } - ], - "_active": true, - "_components": [ - { - "__id__": 192 - }, - { - "__id__": 194 + "__id__": 181 }, { "__id__": 196 } ], + "_active": true, + "_components": [ + { + "__id__": 211 + }, + { + "__id__": 213 + }, + { + "__id__": 215 + } + ], "_prefab": { - "__id__": 198 + "__id__": 217 }, "_lpos": { "__type__": "cc.Vec3", - "x": 720, + "x": 0, "y": 0, "z": 0 }, @@ -273,19 +273,22 @@ }, { "__id__": 42 + }, + { + "__id__": 54 } ], "_active": true, "_components": [ { - "__id__": 54 + "__id__": 73 }, { - "__id__": 56 + "__id__": 75 } ], "_prefab": { - "__id__": 58 + "__id__": 77 }, "_lpos": { "__type__": "cc.Vec3", @@ -1046,6 +1049,437 @@ "z": 0 } }, + { + "__type__": "cc.Node", + "_name": "PVP按钮", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 10 + }, + "_children": [ + { + "__id__": 55 + } + ], + "_active": true, + "_components": [ + { + "__id__": 63 + }, + { + "__id__": 65 + }, + { + "__id__": 67 + }, + { + "__id__": 70 + } + ], + "_prefab": { + "__id__": 72 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 300, + "y": 60, + "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__": 54 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 56 + }, + { + "__id__": 58 + }, + { + "__id__": 60 + } + ], + "_prefab": { + "__id__": 62 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 55 + }, + "_enabled": true, + "__prefab": { + "__id__": 57 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5543Hxc/VN3LDXrSYEK3p2" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 55 + }, + "_enabled": true, + "__prefab": { + "__id__": 59 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "PVP", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 26, + "_fontSize": 26, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b2aC/W7JRHeoaR90TqFhv6" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 55 + }, + "_enabled": true, + "__prefab": { + "__id__": 61 + }, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "33q6Iur4RNkbwMGThbg0DZ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "92mB3ybUhM+LOw4apqnvwy", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 64 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 80, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ecFczOv0FM97qHeOR+X8kn" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 66 + }, + "_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": "eeSBMNXq9HaYpub7Iwl3Nn" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 68 + }, + "clickEvents": [ + { + "__id__": 69 + } + ], + "_interactable": true, + "_transition": 3, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 54 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "f4saH8hdtMZKJNlDuyPFHq" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "b51bfKvsidNPKBbFirAFgQI", + "handler": "onOpenPVP", + "customEventData": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 54 + }, + "_enabled": true, + "__prefab": { + "__id__": 71 + }, + "_alignFlags": 36, + "_target": null, + "_left": 0, + "_right": 20, + "_top": 0, + "_bottom": 20, + "_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": "e4BopbkvxCXpYmHoAmEbkE" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6WReVOwhDn57qyy7GvYbo", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -1056,7 +1490,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 74 }, "_contentSize": { "__type__": "cc.Size", @@ -1084,7 +1518,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 76 }, "_alignFlags": 45, "_target": null, @@ -1133,29 +1567,29 @@ }, "_children": [ { - "__id__": 60 + "__id__": 79 }, { - "__id__": 84 + "__id__": 103 }, { - "__id__": 98 + "__id__": 117 } ], "_active": true, "_components": [ { - "__id__": 136 + "__id__": 155 }, { - "__id__": 138 + "__id__": 157 }, { - "__id__": 140 + "__id__": 159 } ], "_prefab": { - "__id__": 142 + "__id__": 161 }, "_lpos": { "__type__": "cc.Vec3", @@ -1190,17 +1624,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 59 + "__id__": 78 }, "_prefab": { - "__id__": 61 + "__id__": 80 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 60 + "__id__": 79 }, "asset": { "__uuid__": "a9053170-1055-4272-b3fd-ad6fa75b5f25", @@ -1208,7 +1642,7 @@ }, "fileId": "cfqtEvOKpHO7NzoHh8DAIM", "instance": { - "__id__": 62 + "__id__": 81 }, "targetOverrides": null }, @@ -1221,44 +1655,44 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 63 - }, - { - "__id__": 65 - }, - { - "__id__": 66 - }, - { - "__id__": 67 - }, - { - "__id__": 68 - }, - { - "__id__": 70 - }, - { - "__id__": 72 - }, - { - "__id__": 74 - }, - { - "__id__": 76 - }, - { - "__id__": 78 - }, - { - "__id__": 80 - }, { "__id__": 82 }, { - "__id__": 83 + "__id__": 84 + }, + { + "__id__": 85 + }, + { + "__id__": 86 + }, + { + "__id__": 87 + }, + { + "__id__": 89 + }, + { + "__id__": 91 + }, + { + "__id__": 93 + }, + { + "__id__": 95 + }, + { + "__id__": 97 + }, + { + "__id__": 99 + }, + { + "__id__": 101 + }, + { + "__id__": 102 } ], "removedComponents": [] @@ -1266,7 +1700,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 64 + "__id__": 83 }, "propertyPath": [ "_name" @@ -1282,7 +1716,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 64 + "__id__": 83 }, "propertyPath": [ "_lpos" @@ -1297,7 +1731,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 64 + "__id__": 83 }, "propertyPath": [ "_lrot" @@ -1313,7 +1747,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 64 + "__id__": 83 }, "propertyPath": [ "_euler" @@ -1328,7 +1762,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 69 + "__id__": 88 }, "propertyPath": [ "_right" @@ -1344,7 +1778,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 71 + "__id__": 90 }, "propertyPath": [ "_contentSize" @@ -1364,7 +1798,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 73 + "__id__": 92 }, "propertyPath": [ "_lpos" @@ -1385,7 +1819,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 75 + "__id__": 94 }, "propertyPath": [ "_contentSize" @@ -1405,7 +1839,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 77 + "__id__": 96 }, "propertyPath": [ "_contentSize" @@ -1425,7 +1859,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 79 + "__id__": 98 }, "propertyPath": [ "_lpos" @@ -1446,7 +1880,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 81 + "__id__": 100 }, "propertyPath": [ "_lpos" @@ -1467,7 +1901,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 69 + "__id__": 88 }, "propertyPath": [ "_alignFlags" @@ -1477,7 +1911,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 69 + "__id__": 88 }, "propertyPath": [ "_top" @@ -1490,24 +1924,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 59 + "__id__": 78 }, "_children": [ { - "__id__": 85 + "__id__": 104 } ], "_active": true, "_components": [ { - "__id__": 93 + "__id__": 112 }, { - "__id__": 95 + "__id__": 114 } ], "_prefab": { - "__id__": 97 + "__id__": 116 }, "_lpos": { "__type__": "cc.Vec3", @@ -1542,17 +1976,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 84 + "__id__": 103 }, "_prefab": { - "__id__": 86 + "__id__": 105 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 85 + "__id__": 104 }, "asset": { "__uuid__": "9d7eeadb-58f6-4c42-aaed-bc402f272c84", @@ -1560,7 +1994,7 @@ }, "fileId": "a8T0NC/KpNY7MMbRkPRuwY", "instance": { - "__id__": 87 + "__id__": 106 }, "targetOverrides": null }, @@ -1574,16 +2008,16 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 88 + "__id__": 107 }, { - "__id__": 90 + "__id__": 109 }, { - "__id__": 91 + "__id__": 110 }, { - "__id__": 92 + "__id__": 111 } ], "removedComponents": [] @@ -1591,7 +2025,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 89 + "__id__": 108 }, "propertyPath": [ "_name" @@ -1607,7 +2041,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 89 + "__id__": 108 }, "propertyPath": [ "_lpos" @@ -1622,7 +2056,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 89 + "__id__": 108 }, "propertyPath": [ "_lrot" @@ -1638,7 +2072,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 89 + "__id__": 108 }, "propertyPath": [ "_euler" @@ -1656,11 +2090,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 84 + "__id__": 103 }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 113 }, "_contentSize": { "__type__": "cc.Size", @@ -1684,11 +2118,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 84 + "__id__": 103 }, "_enabled": false, "__prefab": { - "__id__": 96 + "__id__": 115 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1742,27 +2176,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 59 + "__id__": 78 }, "_children": [ { - "__id__": 99 + "__id__": 118 }, { - "__id__": 115 + "__id__": 134 } ], "_active": true, "_components": [ { - "__id__": 131 + "__id__": 150 }, { - "__id__": 133 + "__id__": 152 } ], "_prefab": { - "__id__": 135 + "__id__": 154 }, "_lpos": { "__type__": "cc.Vec3", @@ -1799,27 +2233,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 117 }, "_children": [ { - "__id__": 100 + "__id__": 119 } ], "_active": true, "_components": [ { - "__id__": 108 + "__id__": 127 }, { - "__id__": 110 + "__id__": 129 }, { - "__id__": 112 + "__id__": 131 } ], "_prefab": { - "__id__": 114 + "__id__": 133 }, "_lpos": { "__type__": "cc.Vec3", @@ -1856,23 +2290,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 99 + "__id__": 118 }, "_children": [], "_active": true, "_components": [ { - "__id__": 101 + "__id__": 120 }, { - "__id__": 103 + "__id__": 122 }, { - "__id__": 105 + "__id__": 124 } ], "_prefab": { - "__id__": 107 + "__id__": 126 }, "_lpos": { "__type__": "cc.Vec3", @@ -1909,11 +2343,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 100 + "__id__": 119 }, "_enabled": true, "__prefab": { - "__id__": 102 + "__id__": 121 }, "_contentSize": { "__type__": "cc.Size", @@ -1937,11 +2371,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 100 + "__id__": 119 }, "_enabled": true, "__prefab": { - "__id__": 104 + "__id__": 123 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1982,11 +2416,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 100 + "__id__": 119 }, "_enabled": true, "__prefab": { - "__id__": 106 + "__id__": 125 }, "_color": { "__type__": "cc.Color", @@ -2021,11 +2455,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 118 }, "_enabled": true, "__prefab": { - "__id__": 109 + "__id__": 128 }, "_contentSize": { "__type__": "cc.Size", @@ -2049,11 +2483,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 118 }, "_enabled": true, "__prefab": { - "__id__": 111 + "__id__": 130 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2094,11 +2528,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 118 }, "_enabled": true, "__prefab": { - "__id__": 113 + "__id__": 132 }, "clickEvents": [], "_interactable": true, @@ -2150,7 +2584,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 99 + "__id__": 118 }, "_id": "" }, @@ -2177,27 +2611,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 117 }, "_children": [ { - "__id__": 116 + "__id__": 135 } ], "_active": true, "_components": [ { - "__id__": 124 + "__id__": 143 }, { - "__id__": 126 + "__id__": 145 }, { - "__id__": 128 + "__id__": 147 } ], "_prefab": { - "__id__": 130 + "__id__": 149 }, "_lpos": { "__type__": "cc.Vec3", @@ -2234,23 +2668,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 115 + "__id__": 134 }, "_children": [], "_active": true, "_components": [ { - "__id__": 117 + "__id__": 136 }, { - "__id__": 119 + "__id__": 138 }, { - "__id__": 121 + "__id__": 140 } ], "_prefab": { - "__id__": 123 + "__id__": 142 }, "_lpos": { "__type__": "cc.Vec3", @@ -2287,11 +2721,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 135 }, "_enabled": true, "__prefab": { - "__id__": 118 + "__id__": 137 }, "_contentSize": { "__type__": "cc.Size", @@ -2315,11 +2749,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 135 }, "_enabled": true, "__prefab": { - "__id__": 120 + "__id__": 139 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2360,11 +2794,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 116 + "__id__": 135 }, "_enabled": true, "__prefab": { - "__id__": 122 + "__id__": 141 }, "_color": { "__type__": "cc.Color", @@ -2399,11 +2833,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 115 + "__id__": 134 }, "_enabled": true, "__prefab": { - "__id__": 125 + "__id__": 144 }, "_contentSize": { "__type__": "cc.Size", @@ -2427,11 +2861,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 115 + "__id__": 134 }, "_enabled": true, "__prefab": { - "__id__": 127 + "__id__": 146 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2472,11 +2906,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 115 + "__id__": 134 }, "_enabled": true, "__prefab": { - "__id__": 129 + "__id__": 148 }, "clickEvents": [], "_interactable": true, @@ -2528,7 +2962,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 115 + "__id__": 134 }, "_id": "" }, @@ -2555,11 +2989,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 117 }, "_enabled": true, "__prefab": { - "__id__": 132 + "__id__": 151 }, "_contentSize": { "__type__": "cc.Size", @@ -2583,11 +3017,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 117 }, "_enabled": true, "__prefab": { - "__id__": 134 + "__id__": 153 }, "_resizeMode": 1, "_layoutType": 2, @@ -2634,11 +3068,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 59 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 137 + "__id__": 156 }, "_contentSize": { "__type__": "cc.Size", @@ -2662,11 +3096,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 59 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 139 + "__id__": 158 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2707,11 +3141,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 59 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 141 + "__id__": 160 }, "_alignFlags": 44, "_target": null, @@ -2760,26 +3194,26 @@ }, "_children": [ { - "__id__": 144 + "__id__": 163 } ], "_active": true, "_components": [ { - "__id__": 152 + "__id__": 171 }, { - "__id__": 154 + "__id__": 173 }, { - "__id__": 156 + "__id__": 175 }, { - "__id__": 158 + "__id__": 177 } ], "_prefab": { - "__id__": 161 + "__id__": 180 }, "_lpos": { "__type__": "cc.Vec3", @@ -2816,23 +3250,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 143 + "__id__": 162 }, "_children": [], "_active": true, "_components": [ { - "__id__": 145 + "__id__": 164 }, { - "__id__": 147 + "__id__": 166 }, { - "__id__": 149 + "__id__": 168 } ], "_prefab": { - "__id__": 151 + "__id__": 170 }, "_lpos": { "__type__": "cc.Vec3", @@ -2869,11 +3303,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 144 + "__id__": 163 }, "_enabled": true, "__prefab": { - "__id__": 146 + "__id__": 165 }, "_contentSize": { "__type__": "cc.Size", @@ -2897,11 +3331,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 144 + "__id__": 163 }, "_enabled": true, "__prefab": { - "__id__": 148 + "__id__": 167 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2942,11 +3376,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 144 + "__id__": 163 }, "_enabled": true, "__prefab": { - "__id__": 150 + "__id__": 169 }, "_color": { "__type__": "cc.Color", @@ -2981,11 +3415,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 162 }, "_enabled": true, "__prefab": { - "__id__": 153 + "__id__": 172 }, "_contentSize": { "__type__": "cc.Size", @@ -3009,11 +3443,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 162 }, "_enabled": true, "__prefab": { - "__id__": 155 + "__id__": 174 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3054,11 +3488,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 162 }, "_enabled": true, "__prefab": { - "__id__": 157 + "__id__": 176 }, "_alignFlags": 44, "_target": null, @@ -3090,15 +3524,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 143 + "__id__": 162 }, "_enabled": true, "__prefab": { - "__id__": 159 + "__id__": 178 }, "clickEvents": [ { - "__id__": 160 + "__id__": 179 } ], "_interactable": true, @@ -3177,23 +3611,23 @@ }, "_children": [ { - "__id__": 163 + "__id__": 182 } ], "_active": true, "_components": [ { - "__id__": 169 + "__id__": 188 }, { - "__id__": 171 + "__id__": 190 }, { - "__id__": 173 + "__id__": 192 } ], "_prefab": { - "__id__": 176 + "__id__": 195 }, "_lpos": { "__type__": "cc.Vec3", @@ -3230,20 +3664,20 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 162 + "__id__": 181 }, "_children": [], "_active": true, "_components": [ { - "__id__": 164 + "__id__": 183 }, { - "__id__": 166 + "__id__": 185 } ], "_prefab": { - "__id__": 168 + "__id__": 187 }, "_lpos": { "__type__": "cc.Vec3", @@ -3280,11 +3714,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 163 + "__id__": 182 }, "_enabled": true, "__prefab": { - "__id__": 165 + "__id__": 184 }, "_contentSize": { "__type__": "cc.Size", @@ -3308,11 +3742,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 163 + "__id__": 182 }, "_enabled": true, "__prefab": { - "__id__": 167 + "__id__": 186 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3366,11 +3800,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 162 + "__id__": 181 }, "_enabled": true, "__prefab": { - "__id__": 170 + "__id__": 189 }, "_contentSize": { "__type__": "cc.Size", @@ -3394,11 +3828,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 162 + "__id__": 181 }, "_enabled": true, "__prefab": { - "__id__": 172 + "__id__": 191 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3439,15 +3873,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 162 + "__id__": 181 }, "_enabled": true, "__prefab": { - "__id__": 174 + "__id__": 193 }, "clickEvents": [ { - "__id__": 175 + "__id__": 194 } ], "_interactable": true, @@ -3499,7 +3933,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 162 + "__id__": 181 }, "_id": "" }, @@ -3540,23 +3974,23 @@ }, "_children": [ { - "__id__": 178 + "__id__": 197 } ], "_active": true, "_components": [ { - "__id__": 184 + "__id__": 203 }, { - "__id__": 186 + "__id__": 205 }, { - "__id__": 188 + "__id__": 207 } ], "_prefab": { - "__id__": 191 + "__id__": 210 }, "_lpos": { "__type__": "cc.Vec3", @@ -3593,20 +4027,20 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 177 + "__id__": 196 }, "_children": [], "_active": true, "_components": [ { - "__id__": 179 + "__id__": 198 }, { - "__id__": 181 + "__id__": 200 } ], "_prefab": { - "__id__": 183 + "__id__": 202 }, "_lpos": { "__type__": "cc.Vec3", @@ -3643,11 +4077,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 178 + "__id__": 197 }, "_enabled": true, "__prefab": { - "__id__": 180 + "__id__": 199 }, "_contentSize": { "__type__": "cc.Size", @@ -3671,11 +4105,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 178 + "__id__": 197 }, "_enabled": true, "__prefab": { - "__id__": 182 + "__id__": 201 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3729,11 +4163,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 177 + "__id__": 196 }, "_enabled": true, "__prefab": { - "__id__": 185 + "__id__": 204 }, "_contentSize": { "__type__": "cc.Size", @@ -3757,11 +4191,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 177 + "__id__": 196 }, "_enabled": true, "__prefab": { - "__id__": 187 + "__id__": 206 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3802,15 +4236,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 177 + "__id__": 196 }, "_enabled": true, "__prefab": { - "__id__": 189 + "__id__": 208 }, "clickEvents": [ { - "__id__": 190 + "__id__": 209 } ], "_interactable": true, @@ -3862,7 +4296,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 177 + "__id__": 196 }, "_id": "" }, @@ -3903,7 +4337,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 193 + "__id__": 212 }, "_contentSize": { "__type__": "cc.Size", @@ -3931,12 +4365,12 @@ }, "_enabled": true, "__prefab": { - "__id__": 195 + "__id__": 214 }, "_alignFlags": 45, "_target": null, - "_left": 720, - "_right": -720, + "_left": 0, + "_right": 0, "_top": 0, "_bottom": 0, "_horizontalCenter": 0, @@ -3967,7 +4401,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 197 + "__id__": 216 }, "mask": false, "maskOpcity": 80, @@ -3994,10 +4428,10 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": [ { - "__id__": 85 + "__id__": 104 }, { - "__id__": 60 + "__id__": 79 }, { "__id__": 42 diff --git a/JisolGameCocos/assets/resources/prefab/ui/模式.meta b/JisolGameCocos/assets/resources/prefab/ui/模式.meta new file mode 100644 index 00000000..4ed8b785 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/模式.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "80f8f41e-26fe-455a-873a-da26dfd9a169", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/模式/PVP.meta b/JisolGameCocos/assets/resources/prefab/ui/模式/PVP.meta new file mode 100644 index 00000000..ab1264be --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/模式/PVP.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "394ad8cd-f975-4785-a104-d76c781c17b8", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/模式/PVP/PVP匹配页面.prefab b/JisolGameCocos/assets/resources/prefab/ui/模式/PVP/PVP匹配页面.prefab new file mode 100644 index 00000000..1b58f4e1 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/模式/PVP/PVP匹配页面.prefab @@ -0,0 +1,1034 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "PVP匹配页面", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "PVP匹配页面", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 24 + } + ], + "_active": true, + "_components": [ + { + "__id__": 41 + }, + { + "__id__": 43 + }, + { + "__id__": 45 + } + ], + "_prefab": { + "__id__": 47 + }, + "_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__": 9 + } + ], + "_active": true, + "_components": [ + { + "__id__": 17 + }, + { + "__id__": 19 + }, + { + "__id__": 21 + } + ], + "_prefab": { + "__id__": 23 + }, + "_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": "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": 300, + "height": 300 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "1cMsYGmM5EXIgLY+DBGD2G" + }, + { + "__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": 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": "f73/xdwehEoawujOfSEUMv" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9bO3TsbbxHjJsvjefEIb6B", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "匹配中", + "_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": 216.90625, + "height": 71 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b47Dzr0NBHva/AWVFykwqr" + }, + { + "__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": 40, + "_fontSize": 40, + "_fontFamily": "Arial", + "_lineHeight": 50, + "_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": "029Cq2lmxI/42jmDK5Dfbf" + }, + { + "__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": 4, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3aiWNC25lMN6pu75cc4jFp" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "68UR5EdsFCQq9vXlw1f0vU", + "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": 300, + "height": 300 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a342LKZhVJqoESdJLA0bJd" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 20 + }, + "_type": 1, + "_inverted": false, + "_segments": 64, + "_alphaThreshold": 0.1, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "68r3Cnm6lK86QZh9R/bmBq" + }, + { + "__type__": "cc.Graphics", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 22 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_lineWidth": 1, + "_strokeColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_lineJoin": 2, + "_lineCap": 0, + "_fillColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 0 + }, + "_miterLimit": 10, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "38lPCAyz5D1Lnckw+PJRsG" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "91z1VBqDBAMqZBXEwqwbIM", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "取消匹配", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 25 + } + ], + "_active": true, + "_components": [ + { + "__id__": 33 + }, + { + "__id__": 35 + }, + { + "__id__": 37 + } + ], + "_prefab": { + "__id__": 40 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": -269.222, + "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__": 24 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + }, + { + "__id__": 28 + }, + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 32 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": { + "__id__": 27 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9a9R4kWC5OboLgJeuzNN1o" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": { + "__id__": 29 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "取消匹配", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 32, + "_fontSize": 32, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": true, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "00tevDeytESpi+dtvJ6xiJ" + }, + { + "__type__": "cc.LabelOutline", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 25 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_width": 3, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8eHMpSlchDd5+xvV85EXRn" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "aa9H+aJepAXLrObLov094q", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 24 + }, + "_enabled": true, + "__prefab": { + "__id__": 34 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 180, + "height": 70 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "297ap5l71AlqBh2eNgPbYj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 24 + }, + "_enabled": true, + "__prefab": { + "__id__": 36 + }, + "_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": "878Tc/DS9P54lrcXSyfFa7" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 24 + }, + "_enabled": true, + "__prefab": { + "__id__": 38 + }, + "clickEvents": [ + { + "__id__": 39 + } + ], + "_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__": 24 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b3cpuwXxBCA6pDGRByTioZ" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "9979dVt91REw44px2Tq6wqv", + "handler": "onClickCancel", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "48lBZ0aupOupljaxMs2Dyi", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 42 + }, + "_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__": 44 + }, + "_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__": "9979dVt91REw44px2Tq6wqv", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 46 + }, + "mask": true, + "maskOpcity": 80, + "isClickMaskeClose": false, + "content": { + "__id__": 2 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0cGxVTaIRJGYvyxR3n0dcU" + }, + { + "__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/模式/PVP/PVP匹配页面.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/模式/PVP/PVP匹配页面.prefab.meta new file mode 100644 index 00000000..d2a65a25 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/模式/PVP/PVP匹配页面.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.49", + "importer": "prefab", + "imported": true, + "uuid": "d1bca093-45af-4ae2-a896-11ed7c6f9bda", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "PVP匹配页面" + } +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab b/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab index 6ac0abe9..5e33efc9 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab @@ -2091,10 +2091,6 @@ "views": { "__id__": 37 }, - "petIconPrefab": { - "__uuid__": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae", - "__expectedType__": "cc.Prefab" - }, "spine": { "__id__": 8 }, diff --git a/JisolGameCocos/assets/script/App.ts b/JisolGameCocos/assets/script/App.ts index e98e7dca..3bfe0c4a 100644 --- a/JisolGameCocos/assets/script/App.ts +++ b/JisolGameCocos/assets/script/App.ts @@ -24,11 +24,12 @@ import { GAction } from "./consts/GAction"; import { StorageData, StorageEnum } from "./consts/GData"; import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI"; import { AppData } from "./AppData"; +import AppAction from "./AppAction"; -let APIPath = `http://localhost:8080` -let WsPath = `ws://localhost:8080/websocket` -// let APIPath = `http://192.168.0.123:8080` -// let WsPath = `ws://192.168.0.123:8080/websocket` +// let APIPath = `http://localhost:8080` +// let WsPath = `ws://localhost:8080/websocket` +let APIPath = `http://192.168.0.123:8080` +let WsPath = `ws://192.168.0.123:8080/websocket` // let APIPath = `https://api.pet.jisol.cn` // let WsPath = `wss://api.pet.jisol.cn/websocket` @@ -218,12 +219,13 @@ export const app = { config : new JNGConfig(), //配置文件 battleRes : new JLoaderBattle("battle"), //battle包 data : new AppData(), //游戏基础信息 - loading: new Loading({ + action : new AppAction(), //游戏行为 + loading : new Loading({ [JNGConfig.loading]:{title:"加载配置文件"}, [JLoaderBattle.loading]:{title:"加载战斗资源"}, [JLoaderBattle.loadingInit]:{title:"初始化战斗资源"}, [AppData.loading]:{title:"初始化信息"}, - }), + }) } app.api.addRequestInterceptors((config:JAPIConfig) => { diff --git a/JisolGameCocos/assets/script/AppAction.ts b/JisolGameCocos/assets/script/AppAction.ts new file mode 100644 index 00000000..fef2a687 --- /dev/null +++ b/JisolGameCocos/assets/script/AppAction.ts @@ -0,0 +1,23 @@ +import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase"; +import BaseAction from "./action/BaseAction"; +import PVPAction from "./action/PVPAction"; + +export default class AppAction extends SystemBase{ + + loadings:BaseAction[] = [ + PVPAction.getIns(), //PVP Action + ]; + + async onInit(): Promise { + + //初始化所有数据类 + for (let index = 0; index < this.loadings.length; index++) { + const data = this.loadings[index]; + await data.onInit(); + } + + } + +} + + diff --git a/JisolGameCocos/assets/script/AppAction.ts.meta b/JisolGameCocos/assets/script/AppAction.ts.meta new file mode 100644 index 00000000..40b61023 --- /dev/null +++ b/JisolGameCocos/assets/script/AppAction.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "b112702e-09c0-40a6-8887-ea797195488e", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/action.meta b/JisolGameCocos/assets/script/action.meta new file mode 100644 index 00000000..68ec90c7 --- /dev/null +++ b/JisolGameCocos/assets/script/action.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "df61d197-2845-4513-88af-2c4ae6cdc33f", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/action/BaseAction.ts b/JisolGameCocos/assets/script/action/BaseAction.ts new file mode 100644 index 00000000..68a211f2 --- /dev/null +++ b/JisolGameCocos/assets/script/action/BaseAction.ts @@ -0,0 +1,8 @@ +import Singleton from "../../../extensions/ngame/assets/ngame/util/Singleton"; + +export default abstract class BaseAction extends Singleton { + + //初始化 + abstract onInit(); + +} diff --git a/JisolGameCocos/assets/script/action/BaseAction.ts.meta b/JisolGameCocos/assets/script/action/BaseAction.ts.meta new file mode 100644 index 00000000..3eb4db69 --- /dev/null +++ b/JisolGameCocos/assets/script/action/BaseAction.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "60baf66e-7156-4234-847b-ea520c1e0cc1", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/action/PVPAction.ts b/JisolGameCocos/assets/script/action/PVPAction.ts new file mode 100644 index 00000000..de5dfd77 --- /dev/null +++ b/JisolGameCocos/assets/script/action/PVPAction.ts @@ -0,0 +1,41 @@ +import { app } from "../App"; +import GBattleModeManager, { BattleMode } from "../battle/GBattleModeManager"; +import { GAction } from "../consts/GAction"; +import { GActionType } from "../consts/GActionType"; +import { GUI } from "../ui/UIConfig"; +import BaseAction from "./BaseAction"; + +export interface GPVPStart{ + leftTactical:string; + rightTactical:string; +} + +export default class PVPAction extends BaseAction { + + onInit(){ + app.socket.on(GAction.C_MODE_PVP_START_WAIT,this.onModePVPStartWait,this); + app.socket.on(GAction.C_MODE_PVP_END_WAIT,this.onModePVPEndWait,this); + app.socket.on(GAction.C_MODE_PVP_START,this.onModePVPStart,this,GActionType.GPVPStart); + } + + //PVP开始等待 + onModePVPStartWait(){ + //PVP 匹配页面 + app.layer.Open(GUI.PVPModeMatchView); + } + + //PVP结束等待 + onModePVPEndWait(){ + //PVP 匹配页面 + app.layer.Close(GUI.PVPModeMatchView); + } + + //开始PVP + onModePVPStart(info:GPVPStart){ + console.log("开始PVP",info); + GBattleModeManager.getIns().Open(BattleMode.PVP,true); + } + +} + + diff --git a/JisolGameCocos/assets/script/action/PVPAction.ts.meta b/JisolGameCocos/assets/script/action/PVPAction.ts.meta new file mode 100644 index 00000000..6fc21b0b --- /dev/null +++ b/JisolGameCocos/assets/script/action/PVPAction.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "20d83911-fbc5-40d3-b970-b48ab4a529bf", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts index 8aea6f1e..66f751a1 100644 --- a/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts +++ b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts @@ -64,7 +64,7 @@ export default class GPVPMode extends GBaseMode<{}>{ //调整相机 let camreaPos = this.camera.node.worldPosition; - this.camera.node.worldPosition = v3(0,100,camreaPos.z) + this.camera.node.worldPosition = v3(0,800,camreaPos.z) //初始化战斗 console.log("GPVPMode 模式初始化"); diff --git a/JisolGameCocos/assets/script/consts/GAPI.ts b/JisolGameCocos/assets/script/consts/GAPI.ts index 71e3e018..3eaa7c91 100644 --- a/JisolGameCocos/assets/script/consts/GAPI.ts +++ b/JisolGameCocos/assets/script/consts/GAPI.ts @@ -11,6 +11,6 @@ export const GAPI = { //捕捉野怪 GOnHookCatchCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onCatchCreeps/${creepId}`)) as PlayerPetOV, //出售野怪 - GOnHookSellCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onSellCreeps/${creepId}`)), + GOnHookSellCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onSellCreeps/${creepId}`)) as boolean, } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/consts/GAction.ts b/JisolGameCocos/assets/script/consts/GAction.ts index dbbc103f..85e796a0 100644 --- a/JisolGameCocos/assets/script/consts/GAction.ts +++ b/JisolGameCocos/assets/script/consts/GAction.ts @@ -6,7 +6,14 @@ export enum GAction { CHAT_MESSAGE = 2001, //发送聊天消息 CHAT_RECEIVE_MESSAGE = 2002, //接受聊天消息 - /*************** 游戏模式 : 无尽模式(OnHook) **************/ + /*************** 游戏模式 : PVP模式 **************/ + S_MODE_PVP_JOIN = 3001, //加入PVP + S_MODE_PVP_LEAVE = 3002, //离开PVP + C_MODE_PVP_WAIT = 3003, //等待PVP开始 + C_MODE_PVP_START = 3004, //PVP开始 + C_MODE_PVP_END = 3005, //PVP结束 + C_MODE_PVP_START_WAIT = 3006, //开始等待PVP开始 + C_MODE_PVP_END_WAIT = 3007, //结束等待PVP开始 } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/consts/GActionType.ts b/JisolGameCocos/assets/script/consts/GActionType.ts index 25861da6..03ec0196 100644 --- a/JisolGameCocos/assets/script/consts/GActionType.ts +++ b/JisolGameCocos/assets/script/consts/GActionType.ts @@ -8,7 +8,10 @@ export enum GActionType { /*************** 游戏模式 : 无尽模式(OnHook) **************/ - GOnHookPet = "GOnHookPet", //野怪 - GOnHookPets = "GOnHookPets", //野怪列表 + GOnHookPet = "GOnHookPet", //野怪 + GOnHookPets = "GOnHookPets", //野怪列表 + + /*************** 游戏模式 : PVP **************/ + GPVPStart = "GPVPStart", //PVP 开始 } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/ui/Home/MainView.ts b/JisolGameCocos/assets/script/ui/Home/MainView.ts index 6ebd7dd6..4037bca1 100644 --- a/JisolGameCocos/assets/script/ui/Home/MainView.ts +++ b/JisolGameCocos/assets/script/ui/Home/MainView.ts @@ -5,6 +5,7 @@ import PlayerData from '../../data/PlayerData'; import GBattleModeManager, { BattleMode } from '../../battle/GBattleModeManager'; import { JNGLayerBase } from '../../components/JNComponent'; import { app } from '../../App'; +import { GAction } from '../../consts/GAction'; const { ccclass, property } = _decorator; @ccclass('MainView') @@ -47,6 +48,11 @@ export class MainView extends JNGLayerBase { GBattleModeManager.getIns().Open(BattleMode.OnHook,true); } + //点击PVP模式 + onOpenPVP(){ + app.socket.Send(GAction.S_MODE_PVP_JOIN); + } + } diff --git a/JisolGameCocos/assets/script/ui/Mode.meta b/JisolGameCocos/assets/script/ui/Mode.meta new file mode 100644 index 00000000..1424e6e6 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Mode.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "7767a760-8e96-4bf8-8289-030e5a8c91c5", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/Mode/PVP.meta b/JisolGameCocos/assets/script/ui/Mode/PVP.meta new file mode 100644 index 00000000..cabfe28d --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Mode/PVP.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "37638c81-4459-4c8d-8054-e5789bce2590", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/Mode/PVP/PVPMatchView.ts b/JisolGameCocos/assets/script/ui/Mode/PVP/PVPMatchView.ts new file mode 100644 index 00000000..22db7903 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Mode/PVP/PVPMatchView.ts @@ -0,0 +1,37 @@ +import { _decorator, Component, Node } from 'cc'; +import { JNGLayerBase } from '../../../components/JNComponent'; +import { tween } from 'cc'; +import { v3 } from 'cc'; +import { app } from '../../../App'; +import { GAction } from '../../../consts/GAction'; +const { ccclass, property } = _decorator; + +/** + * 游戏匹配页面 + */ +@ccclass('PVPMatchView') +export class PVPMatchView extends JNGLayerBase { + + @property(Node) + content:Node; + + onJNLoad(data?: any): void { + super.onJNLoad(data); + tween(this.content) + .repeatForever( + tween() + .to(.5,{scale:v3(.8,.8,.8)}) + .to(.5,{scale:v3(1,1,1)}) + ) + .start(); + + } + + //取消匹配 + onClickCancel(){ + app.socket.Send(GAction.S_MODE_PVP_LEAVE) + } + +} + + diff --git a/JisolGameCocos/assets/script/ui/Mode/PVP/PVPMatchView.ts.meta b/JisolGameCocos/assets/script/ui/Mode/PVP/PVPMatchView.ts.meta new file mode 100644 index 00000000..63a6d6c3 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Mode/PVP/PVPMatchView.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "9979d56d-f754-44c3-8e29-c764eaeb0aaf", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/UIConfig.ts b/JisolGameCocos/assets/script/ui/UIConfig.ts index e3181d69..3c8ce362 100644 --- a/JisolGameCocos/assets/script/ui/UIConfig.ts +++ b/JisolGameCocos/assets/script/ui/UIConfig.ts @@ -23,6 +23,9 @@ export enum GUI{ IntoBattleView = "IntoBattleView", //上阵页面 + /**游戏模式页面 */ + PVPModeMatchView = "PVPModeMatchView", //PVP模式匹配页面 + Home = "Home", //主页面 Main = "Main", //主页面2 } @@ -97,6 +100,17 @@ const UINoviceConfig:{ [key: string]: JNLayerInfo; } = { } +//游戏模式页面 +const UIGModeConfig:{ [key: string]: JNLayerInfo; } = { + + [GUI.PVPModeMatchView]:{ + layer:GLayer.Popup, + uri: "prefab/ui/模式/PVP/PVP匹配页面", + anims:BackOutScale + }, + +} + export const UIConfig:{ [key: string]: JNLayerInfo; } = { [GUI.Home]:{ layer:GLayer.View, @@ -121,5 +135,6 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = { ...UISystemConfig, //系统页面 ...UINoviceConfig, //新手引导页面 ...UIMainConfig, //主页面 + ...UIGModeConfig, //游戏模式页面 } diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index be42908e..ddba7560 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit be42908eaecd47d952a79d2f1549bd0dd4176765 +Subproject commit ddba756071599f88801c2001235b59b152117740 diff --git a/JisolGameCocos/proto/GPVPMessage.proto b/JisolGameCocos/proto/GPVPMessage.proto new file mode 100644 index 00000000..907b6e08 --- /dev/null +++ b/JisolGameCocos/proto/GPVPMessage.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +option java_package = "cn.jisol.ngame.proto"; + + +//PVP 开始 +message GPVPStart { + string leftTactical = 1; //左边的布阵 + string rightTactical = 2; //右边的布阵 +} + + diff --git a/JisolGameServer/JNGame b/JisolGameServer/JNGame index f3c05c98..9e2487e3 160000 --- a/JisolGameServer/JNGame +++ b/JisolGameServer/JNGame @@ -1 +1 @@ -Subproject commit f3c05c98992ccc4c4bc45ca120b3fcaf5ff6af58 +Subproject commit 9e2487e3e4ab43fe9c1f4e736bc7f75244f2f21b diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/JGameApplication.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/JGameApplication.java index 47f8efa3..20faf52b 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/JGameApplication.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/JGameApplication.java @@ -1,5 +1,6 @@ package cn.jisol.game; +import cn.jisol.ngame.util.spring.SpringBeanUtils; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -10,6 +11,6 @@ import org.springframework.context.ApplicationContext; @SpringBootApplication public class JGameApplication { public static void main(String[] args) { - ApplicationContext applicationContext = SpringApplication.run(JGameApplication.class); + SpringBeanUtils.context = SpringApplication.run(JGameApplication.class); } } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java index 24ce5fb4..0a2aae04 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java @@ -8,4 +8,13 @@ public interface GActionEnum { int CHAT_MESSAGE = 2001; //发送聊天消息 int CHAT_RECEIVE_MESSAGE = 2002; //接受聊天消息 + /*************** PVP *********************/ + int S_MODE_PVP_JOIN = 3001; //加入PVP + int S_MODE_PVP_LEAVE = 3002; //离开PVP + int C_MODE_PVP_WAIT = 3003; //等待PVP开始 + int C_MODE_PVP_START = 3004; //PVP开始 + int C_MODE_PVP_END = 3005; //PVP结束 + int C_MODE_PVP_START_WAIT = 3006; //开始等待PVP开始 + int C_MODE_PVP_END_WAIT = 3007; //结束等待PVP开始 + } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java new file mode 100644 index 00000000..5a87da99 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java @@ -0,0 +1,120 @@ +package cn.jisol.game.actions.onhook; + +import cn.jisol.game.actions.GActionEnum; +import cn.jisol.game.controller.game.GPlayerTacticalController; +import cn.jisol.game.entity.game.PlayerTactical; +import cn.jisol.game.network.client.GClient; +import cn.jisol.game.proto.GPVPMessage; +import cn.jisol.game.service.PlayerTacticalService; +import cn.jisol.ngame.actions.core.NAction; +import cn.jisol.ngame.actions.core.NActionMethod; +import cn.jisol.ngame.util.spring.SpringBeanUtils; + +import java.util.*; + +//PVP 模式 +@NAction +public class GPVPAction { + + //当前等待PVP的玩家 + static LinkedList pool = new LinkedList<>(); + + //等待通知定时器 + static Timer timer; + + static { + + timer = new Timer(); + timer.schedule(new TimerTask() { + @Override + public void run() { + GPVPAction.onWaitTimer(); + } + },0,1000); + + } + + //加入PVP + @NActionMethod(GActionEnum.S_MODE_PVP_JOIN) + public static synchronized void onJoinPVP(GClient client){ + + //如果加入过 PVP 则返回 + if(pool.contains(client)) return; + + for (int i = 0; i < pool.size(); i++) { + GClient item = pool.get(i); + if (item.player.getPlayerId().equals(client.player.getPlayerId())){ + //移除玩家 + pool.remove(item); + } + } + + //如果没有加入则加入 + pool.add(client); + + //通知开始等待 + client.invoke(GActionEnum.C_MODE_PVP_START_WAIT); + + GPVPAction.onUpdateMatchGame(); + + } + + //离开PVP + @NActionMethod(GActionEnum.S_MODE_PVP_LEAVE) + public static void onJoinLeave(GClient client){ + + //如果加入过 则 离开 + if(pool.contains(client)) { + pool.remove(client); + client.invoke(GActionEnum.C_MODE_PVP_END_WAIT); + } + + } + + //刷新匹配 + public static void onUpdateMatchGame(){ + + //判断是否有两人在等待 有 则两人匹配成功 + while (pool.size() >= 2){ + //匹配成功 + GClient client1 = pool.poll(); + GClient client2 = pool.poll(); + + if(Objects.isNull(client1) || Objects.isNull(client2)) continue; + //确保玩家都在线 + if(!(client1.isOpen() && client2.isOpen())){ + if(client2.isOpen()) pool.addFirst(client2); + if(client1.isOpen()) pool.addFirst(client1); + continue; + } + + //获取双方的阵型 + GPlayerTacticalController tactical = SpringBeanUtils.getBean(GPlayerTacticalController.class); + + //构建匹配信息 + GPVPMessage.GPVPStart info = GPVPMessage.GPVPStart.newBuilder() + .setLeftTactical(tactical.getInfo(client1.player).data.getTacticalData()) + .setRightTactical(tactical.getInfo(client2.player).data.getTacticalData()) + .build(); + + //取消等待 + client1.invoke(GActionEnum.C_MODE_PVP_END_WAIT); + client2.invoke(GActionEnum.C_MODE_PVP_END_WAIT); + + //PVP 开始 + client1.invoke(GActionEnum.C_MODE_PVP_START, info); + client2.invoke(GActionEnum.C_MODE_PVP_START, info); + + } + + } + + //通知玩家等待定时器 + public static void onWaitTimer(){ + //向所有玩家发送等待 + pool.forEach(client -> { + client.invoke(GActionEnum.C_MODE_PVP_WAIT); + }); + } + +} diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java index c88ad5d5..89c7e61e 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java @@ -47,6 +47,11 @@ public class GPlayerTacticalController { info = playerTacticalService.getById(player.getPlayerId()); } + //如果没有阵法则默认一个阵法 + if(Objects.isNull(info.getTacticalData())){ + info.setTacticalData("[0,0,0,0,0,0,0,0,0]"); + } + return NewsContext.onSuccess("获取成功",info); } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java index fb26952a..450e9a3e 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java @@ -43,4 +43,8 @@ public class GClient extends QueueNClient { } } + @Override + public boolean isOpen() { + return session.isOpen(); + } } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java new file mode 100644 index 00000000..998b9b1b --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GPVPMessage.proto + +package cn.jisol.game.proto; + +public final class GPVPMessage { + private GPVPMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface GPVPStartOrBuilder extends + // @@protoc_insertion_point(interface_extends:GPVPStart) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The leftTactical. + */ + java.lang.String getLeftTactical(); + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The bytes for leftTactical. + */ + com.google.protobuf.ByteString + getLeftTacticalBytes(); + + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The rightTactical. + */ + java.lang.String getRightTactical(); + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The bytes for rightTactical. + */ + com.google.protobuf.ByteString + getRightTacticalBytes(); + } + /** + *
+   *PVP 开始
+   * 
+ * + * Protobuf type {@code GPVPStart} + */ + public static final class GPVPStart extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GPVPStart) + GPVPStartOrBuilder { + private static final long serialVersionUID = 0L; + // Use GPVPStart.newBuilder() to construct. + private GPVPStart(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GPVPStart() { + leftTactical_ = ""; + rightTactical_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GPVPStart(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GPVPStart( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + leftTactical_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + rightTactical_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GPVPMessage.internal_static_GPVPStart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return GPVPMessage.internal_static_GPVPStart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GPVPMessage.GPVPStart.class, GPVPMessage.GPVPStart.Builder.class); + } + + public static final int LEFTTACTICAL_FIELD_NUMBER = 1; + private volatile java.lang.Object leftTactical_; + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The leftTactical. + */ + @java.lang.Override + public java.lang.String getLeftTactical() { + java.lang.Object ref = leftTactical_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leftTactical_ = s; + return s; + } + } + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The bytes for leftTactical. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeftTacticalBytes() { + java.lang.Object ref = leftTactical_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leftTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RIGHTTACTICAL_FIELD_NUMBER = 2; + private volatile java.lang.Object rightTactical_; + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The rightTactical. + */ + @java.lang.Override + public java.lang.String getRightTactical() { + java.lang.Object ref = rightTactical_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rightTactical_ = s; + return s; + } + } + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The bytes for rightTactical. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRightTacticalBytes() { + java.lang.Object ref = rightTactical_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rightTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leftTactical_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, leftTactical_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rightTactical_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rightTactical_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leftTactical_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, leftTactical_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rightTactical_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rightTactical_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GPVPMessage.GPVPStart)) { + return super.equals(obj); + } + GPVPMessage.GPVPStart other = (GPVPMessage.GPVPStart) obj; + + if (!getLeftTactical() + .equals(other.getLeftTactical())) return false; + if (!getRightTactical() + .equals(other.getRightTactical())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEFTTACTICAL_FIELD_NUMBER; + hash = (53 * hash) + getLeftTactical().hashCode(); + hash = (37 * hash) + RIGHTTACTICAL_FIELD_NUMBER; + hash = (53 * hash) + getRightTactical().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GPVPMessage.GPVPStart parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GPVPMessage.GPVPStart parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GPVPMessage.GPVPStart parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GPVPMessage.GPVPStart parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GPVPMessage.GPVPStart parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GPVPMessage.GPVPStart parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GPVPMessage.GPVPStart parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GPVPMessage.GPVPStart parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GPVPMessage.GPVPStart parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GPVPMessage.GPVPStart parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GPVPMessage.GPVPStart parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GPVPMessage.GPVPStart parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GPVPMessage.GPVPStart prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *PVP 开始
+     * 
+ * + * Protobuf type {@code GPVPStart} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GPVPStart) + GPVPMessage.GPVPStartOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GPVPMessage.internal_static_GPVPStart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return GPVPMessage.internal_static_GPVPStart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GPVPMessage.GPVPStart.class, GPVPMessage.GPVPStart.Builder.class); + } + + // Construct using cn.jisol.game.proto.GPVPMessage.GPVPStart.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + leftTactical_ = ""; + + rightTactical_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GPVPMessage.internal_static_GPVPStart_descriptor; + } + + @java.lang.Override + public GPVPMessage.GPVPStart getDefaultInstanceForType() { + return GPVPMessage.GPVPStart.getDefaultInstance(); + } + + @java.lang.Override + public GPVPMessage.GPVPStart build() { + GPVPMessage.GPVPStart result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public GPVPMessage.GPVPStart buildPartial() { + GPVPMessage.GPVPStart result = new GPVPMessage.GPVPStart(this); + result.leftTactical_ = leftTactical_; + result.rightTactical_ = rightTactical_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GPVPMessage.GPVPStart) { + return mergeFrom((GPVPMessage.GPVPStart)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GPVPMessage.GPVPStart other) { + if (other == GPVPMessage.GPVPStart.getDefaultInstance()) return this; + if (!other.getLeftTactical().isEmpty()) { + leftTactical_ = other.leftTactical_; + onChanged(); + } + if (!other.getRightTactical().isEmpty()) { + rightTactical_ = other.rightTactical_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GPVPMessage.GPVPStart parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GPVPMessage.GPVPStart) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object leftTactical_ = ""; + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @return The leftTactical. + */ + public java.lang.String getLeftTactical() { + java.lang.Object ref = leftTactical_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leftTactical_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @return The bytes for leftTactical. + */ + public com.google.protobuf.ByteString + getLeftTacticalBytes() { + java.lang.Object ref = leftTactical_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leftTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @param value The leftTactical to set. + * @return This builder for chaining. + */ + public Builder setLeftTactical( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + leftTactical_ = value; + onChanged(); + return this; + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @return This builder for chaining. + */ + public Builder clearLeftTactical() { + + leftTactical_ = getDefaultInstance().getLeftTactical(); + onChanged(); + return this; + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @param value The bytes for leftTactical to set. + * @return This builder for chaining. + */ + public Builder setLeftTacticalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + leftTactical_ = value; + onChanged(); + return this; + } + + private java.lang.Object rightTactical_ = ""; + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @return The rightTactical. + */ + public java.lang.String getRightTactical() { + java.lang.Object ref = rightTactical_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rightTactical_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @return The bytes for rightTactical. + */ + public com.google.protobuf.ByteString + getRightTacticalBytes() { + java.lang.Object ref = rightTactical_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rightTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @param value The rightTactical to set. + * @return This builder for chaining. + */ + public Builder setRightTactical( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rightTactical_ = value; + onChanged(); + return this; + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @return This builder for chaining. + */ + public Builder clearRightTactical() { + + rightTactical_ = getDefaultInstance().getRightTactical(); + onChanged(); + return this; + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @param value The bytes for rightTactical to set. + * @return This builder for chaining. + */ + public Builder setRightTacticalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rightTactical_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GPVPStart) + } + + // @@protoc_insertion_point(class_scope:GPVPStart) + private static final GPVPMessage.GPVPStart DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GPVPMessage.GPVPStart(); + } + + public static GPVPMessage.GPVPStart getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GPVPStart parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GPVPStart(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public GPVPMessage.GPVPStart getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GPVPStart_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GPVPStart_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021GPVPMessage.proto\"8\n\tGPVPStart\022\024\n\014left" + + "Tactical\030\001 \001(\t\022\025\n\rrightTactical\030\002 \001(\tB\026\n" + + "\024cn.jisol.ngame.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_GPVPStart_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GPVPStart_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GPVPStart_descriptor, + new java.lang.String[] { "LeftTactical", "RightTactical", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto new file mode 100644 index 00000000..907b6e08 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +option java_package = "cn.jisol.ngame.proto"; + + +//PVP 开始 +message GPVPStart { + string leftTactical = 1; //左边的布阵 + string rightTactical = 2; //右边的布阵 +} + +