├── CCHexagon ├── .gitignore ├── README.md ├── assets │ ├── Perfab.meta │ ├── Perfab │ │ ├── hexPrefab.prefab │ │ ├── hexPrefab.prefab.meta │ │ ├── order-item.prefab │ │ ├── order-item.prefab.meta │ │ ├── randomShape.prefab │ │ ├── randomShape.prefab.meta │ │ ├── resultPrefab.prefab │ │ └── resultPrefab.prefab.meta │ ├── Scene.meta │ ├── Scene │ │ ├── Hexagon.fire │ │ └── Hexagon.fire.meta │ ├── Script.meta │ ├── Script │ │ ├── CountUp.js │ │ ├── Game.js │ │ ├── Global.js │ │ ├── HelloWorld.js │ │ ├── HelloWorld.js.meta │ │ ├── HexPrefab.js │ │ ├── HexPrefab.js.meta │ │ ├── db.js │ │ ├── resultPrefab.js │ │ ├── resultPrefab.js.meta │ │ ├── shapePrefab.js │ │ └── shapePrefab.js.meta │ ├── Texture.meta │ ├── Texture │ │ ├── HelloWorld.png │ │ ├── HelloWorld.png.meta │ │ ├── black_mask.jpg │ │ ├── black_mask.jpg.meta │ │ ├── color_0.png │ │ ├── color_0.png.meta │ │ ├── color_1.png │ │ ├── color_1.png.meta │ │ ├── color_2.png │ │ ├── color_2.png.meta │ │ ├── color_3.png │ │ ├── color_3.png.meta │ │ ├── color_4.png │ │ ├── color_4.png.meta │ │ ├── h_gray.png │ │ ├── h_gray.png.meta │ │ ├── popout.png │ │ └── popout.png.meta │ ├── font.meta │ ├── font │ │ ├── DIN-Regular.ttf │ │ ├── DIN-Regular.ttf.meta │ │ ├── DINCond-Light.ttf │ │ └── DINCond-Light.ttf.meta │ ├── order.meta │ ├── order │ │ ├── board-item.prefab │ │ ├── board-item.prefab.meta │ │ ├── boardItem.js │ │ ├── boardItem.js.meta │ │ ├── popout.js │ │ ├── popout.js.meta │ │ ├── popout.prefab │ │ ├── popout.prefab.meta │ │ ├── texture.meta │ │ └── texture │ │ │ ├── avatar.jpg │ │ │ ├── avatar.jpg.meta │ │ │ ├── black_mask.jpg │ │ │ ├── black_mask.jpg.meta │ │ │ ├── board-item-bg.jpg │ │ │ ├── board-item-bg.jpg.meta │ │ │ ├── popout.png │ │ │ └── popout.png.meta │ ├── singleColor.png │ └── singleColor.png.meta ├── creator.d.ts ├── jsconfig.json ├── project.json ├── settings │ ├── builder.json │ ├── builder.panel.json │ └── project.json ├── template-banner.png └── template.json └── README.md /CCHexagon/.gitignore: -------------------------------------------------------------------------------- 1 | #///////////////////////////////////////////////////////////////////////////// 2 | # Fireball Projects 3 | #///////////////////////////////////////////////////////////////////////////// 4 | 5 | library/ 6 | temp/ 7 | local/ 8 | build/ 9 | 10 | #///////////////////////////////////////////////////////////////////////////// 11 | # Logs and databases 12 | #///////////////////////////////////////////////////////////////////////////// 13 | 14 | *.log 15 | *.sql 16 | *.sqlite 17 | 18 | #///////////////////////////////////////////////////////////////////////////// 19 | # files for debugger 20 | #///////////////////////////////////////////////////////////////////////////// 21 | 22 | *.sln 23 | *.csproj 24 | *.pidb 25 | *.unityproj 26 | *.suo 27 | 28 | #///////////////////////////////////////////////////////////////////////////// 29 | # OS generated files 30 | #///////////////////////////////////////////////////////////////////////////// 31 | 32 | .DS_Store 33 | ehthumbs.db 34 | Thumbs.db 35 | 36 | #///////////////////////////////////////////////////////////////////////////// 37 | # exvim files 38 | #///////////////////////////////////////////////////////////////////////////// 39 | 40 | *UnityVS.meta 41 | *.err 42 | *.err.meta 43 | *.exvim 44 | *.exvim.meta 45 | *.vimentry 46 | *.vimentry.meta 47 | *.vimproject 48 | *.vimproject.meta 49 | .vimfiles.*/ 50 | .exvim.*/ 51 | quick_gen_project_*_autogen.bat 52 | quick_gen_project_*_autogen.bat.meta 53 | quick_gen_project_*_autogen.sh 54 | quick_gen_project_*_autogen.sh.meta 55 | .exvim.app 56 | 57 | #///////////////////////////////////////////////////////////////////////////// 58 | # webstorm files 59 | #///////////////////////////////////////////////////////////////////////////// 60 | 61 | .idea/ 62 | -------------------------------------------------------------------------------- /CCHexagon/README.md: -------------------------------------------------------------------------------- 1 | # hello-world 2 | Hello world new project template. 3 | -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "08d1b96e-b87e-4101-9791-e7f19f303e53", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/hexPrefab.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "data": { 7 | "__id__": 1 8 | } 9 | }, 10 | { 11 | "__type__": "cc.Node", 12 | "_name": "hexPrefab", 13 | "_objFlags": 0, 14 | "_opacity": 255, 15 | "_color": { 16 | "__type__": "cc.Color", 17 | "r": 255, 18 | "g": 255, 19 | "b": 255, 20 | "a": 255 21 | }, 22 | "_cascadeOpacityEnabled": true, 23 | "_parent": null, 24 | "_anchorPoint": { 25 | "__type__": "cc.Vec2", 26 | "x": 0.5, 27 | "y": 0.5 28 | }, 29 | "_contentSize": { 30 | "__type__": "cc.Size", 31 | "width": 66, 32 | "height": 78 33 | }, 34 | "_children": [ 35 | { 36 | "__id__": 2 37 | } 38 | ], 39 | "_rotationX": 0, 40 | "_rotationY": 0, 41 | "_scaleX": 1, 42 | "_scaleY": 1, 43 | "_position": { 44 | "__type__": "cc.Vec2", 45 | "x": -375, 46 | "y": -600 47 | }, 48 | "_skewX": 0, 49 | "_skewY": 0, 50 | "_localZOrder": 0, 51 | "_globalZOrder": 0, 52 | "_tag": -1, 53 | "_opacityModifyRGB": false, 54 | "_reorderChildDirty": false, 55 | "_id": "", 56 | "_active": true, 57 | "_components": [ 58 | { 59 | "__id__": 5 60 | } 61 | ], 62 | "_prefab": { 63 | "__id__": 6 64 | } 65 | }, 66 | { 67 | "__type__": "cc.Node", 68 | "_name": "avatar", 69 | "_objFlags": 0, 70 | "_opacity": 255, 71 | "_color": { 72 | "__type__": "cc.Color", 73 | "r": 255, 74 | "g": 255, 75 | "b": 255, 76 | "a": 255 77 | }, 78 | "_cascadeOpacityEnabled": true, 79 | "_parent": { 80 | "__id__": 1 81 | }, 82 | "_anchorPoint": { 83 | "__type__": "cc.Vec2", 84 | "x": 0.5, 85 | "y": 0.5 86 | }, 87 | "_contentSize": { 88 | "__type__": "cc.Size", 89 | "width": 66, 90 | "height": 78 91 | }, 92 | "_children": [], 93 | "_rotationX": 0, 94 | "_rotationY": 0, 95 | "_scaleX": 1, 96 | "_scaleY": 1, 97 | "_position": { 98 | "__type__": "cc.Vec2", 99 | "x": 0, 100 | "y": 0 101 | }, 102 | "_skewX": 0, 103 | "_skewY": 0, 104 | "_localZOrder": 0, 105 | "_globalZOrder": 0, 106 | "_tag": -1, 107 | "_opacityModifyRGB": false, 108 | "_reorderChildDirty": false, 109 | "_id": "", 110 | "_active": true, 111 | "_components": [ 112 | { 113 | "__id__": 3 114 | } 115 | ], 116 | "_prefab": { 117 | "__id__": 4 118 | } 119 | }, 120 | { 121 | "__type__": "cc.Sprite", 122 | "_name": "", 123 | "_objFlags": 0, 124 | "node": { 125 | "__id__": 2 126 | }, 127 | "_enabled": true, 128 | "_spriteFrame": { 129 | "__uuid__": "24e18cca-67de-4435-98fb-f456d1fb69cb" 130 | }, 131 | "_type": 0, 132 | "_sizeMode": 0, 133 | "_fillType": 0, 134 | "_fillCenter": { 135 | "__type__": "cc.Vec2", 136 | "x": 0, 137 | "y": 0 138 | }, 139 | "_fillStart": 0, 140 | "_fillRange": 0, 141 | "_isTrimmedMode": true, 142 | "_srcBlendFactor": 770, 143 | "_dstBlendFactor": 771, 144 | "_atlas": null 145 | }, 146 | { 147 | "__type__": "cc.PrefabInfo", 148 | "root": { 149 | "__id__": 1 150 | }, 151 | "asset": null, 152 | "fileId": "0bbceWENAtFvrZTSyYF5LCu" 153 | }, 154 | { 155 | "__type__": "f25acTcRzFMZI/klWvUO2k6", 156 | "_name": "", 157 | "_objFlags": 0, 158 | "node": { 159 | "__id__": 1 160 | }, 161 | "_enabled": true, 162 | "avatar": { 163 | "__id__": 3 164 | }, 165 | "avatars": [ 166 | { 167 | "__uuid__": "e3a01eab-fd76-4b0d-bd75-9343ba8ac571" 168 | }, 169 | { 170 | "__uuid__": "9636802f-10ed-4e32-bdb9-1ae7ad541bc0" 171 | }, 172 | { 173 | "__uuid__": "ec739cae-fb30-41e4-b11d-ad4c6d514aac" 174 | }, 175 | { 176 | "__uuid__": "1a15557b-bef1-40ea-9146-0e169b302e3b" 177 | }, 178 | { 179 | "__uuid__": "904d03f4-ea76-4945-a510-ee734561ea8e" 180 | }, 181 | { 182 | "__uuid__": "24e18cca-67de-4435-98fb-f456d1fb69cb" 183 | } 184 | ] 185 | }, 186 | { 187 | "__type__": "cc.PrefabInfo", 188 | "root": { 189 | "__id__": 1 190 | }, 191 | "asset": null, 192 | "fileId": "4005dDN0ZhEhIXMudYOxo/I" 193 | } 194 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/hexPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "5c564553-c983-49ae-b6f2-b02c496bce12", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/order-item.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "data": { 7 | "__id__": 1 8 | } 9 | }, 10 | { 11 | "__type__": "cc.Node", 12 | "_name": "order-item", 13 | "_objFlags": 0, 14 | "_opacity": 255, 15 | "_color": { 16 | "__type__": "cc.Color", 17 | "r": 255, 18 | "g": 255, 19 | "b": 255, 20 | "a": 255 21 | }, 22 | "_cascadeOpacityEnabled": true, 23 | "_parent": null, 24 | "_anchorPoint": { 25 | "__type__": "cc.Vec2", 26 | "x": 0.5, 27 | "y": 0.5 28 | }, 29 | "_contentSize": { 30 | "__type__": "cc.Size", 31 | "width": 0, 32 | "height": 0 33 | }, 34 | "_children": [ 35 | { 36 | "__id__": 2 37 | }, 38 | { 39 | "__id__": 8 40 | } 41 | ], 42 | "_rotationX": 0, 43 | "_rotationY": 0, 44 | "_scaleX": 1, 45 | "_scaleY": 1, 46 | "_position": { 47 | "__type__": "cc.Vec2", 48 | "x": 0, 49 | "y": 0 50 | }, 51 | "_skewX": 0, 52 | "_skewY": 0, 53 | "_localZOrder": 0, 54 | "_globalZOrder": 0, 55 | "_tag": -1, 56 | "_opacityModifyRGB": false, 57 | "_reorderChildDirty": false, 58 | "_id": "", 59 | "_active": true, 60 | "_components": [], 61 | "_prefab": { 62 | "__id__": 11 63 | } 64 | }, 65 | { 66 | "__type__": "cc.Node", 67 | "_name": "mask", 68 | "_objFlags": 0, 69 | "_opacity": 255, 70 | "_color": { 71 | "__type__": "cc.Color", 72 | "r": 255, 73 | "g": 255, 74 | "b": 255, 75 | "a": 255 76 | }, 77 | "_cascadeOpacityEnabled": true, 78 | "_parent": { 79 | "__id__": 1 80 | }, 81 | "_anchorPoint": { 82 | "__type__": "cc.Vec2", 83 | "x": 0.5, 84 | "y": 0.5 85 | }, 86 | "_contentSize": { 87 | "__type__": "cc.Size", 88 | "width": 40, 89 | "height": 40 90 | }, 91 | "_children": [ 92 | { 93 | "__id__": 3 94 | } 95 | ], 96 | "_rotationX": 0, 97 | "_rotationY": 0, 98 | "_scaleX": 1, 99 | "_scaleY": 1, 100 | "_position": { 101 | "__type__": "cc.Vec2", 102 | "x": 0, 103 | "y": 0 104 | }, 105 | "_skewX": 0, 106 | "_skewY": 0, 107 | "_localZOrder": 0, 108 | "_globalZOrder": 0, 109 | "_tag": -1, 110 | "_opacityModifyRGB": false, 111 | "_reorderChildDirty": false, 112 | "_id": "", 113 | "_active": true, 114 | "_components": [ 115 | { 116 | "__id__": 6 117 | } 118 | ], 119 | "_prefab": { 120 | "__id__": 7 121 | } 122 | }, 123 | { 124 | "__type__": "cc.Node", 125 | "_name": "avatar", 126 | "_objFlags": 0, 127 | "_opacity": 255, 128 | "_color": { 129 | "__type__": "cc.Color", 130 | "r": 255, 131 | "g": 255, 132 | "b": 255, 133 | "a": 255 134 | }, 135 | "_cascadeOpacityEnabled": true, 136 | "_parent": { 137 | "__id__": 2 138 | }, 139 | "_anchorPoint": { 140 | "__type__": "cc.Vec2", 141 | "x": 0.5, 142 | "y": 0.5 143 | }, 144 | "_contentSize": { 145 | "__type__": "cc.Size", 146 | "width": 45, 147 | "height": 45 148 | }, 149 | "_children": [], 150 | "_rotationX": 0, 151 | "_rotationY": 0, 152 | "_scaleX": 1, 153 | "_scaleY": 1, 154 | "_position": { 155 | "__type__": "cc.Vec2", 156 | "x": 0, 157 | "y": 0 158 | }, 159 | "_skewX": 0, 160 | "_skewY": 0, 161 | "_localZOrder": 0, 162 | "_globalZOrder": 0, 163 | "_tag": -1, 164 | "_opacityModifyRGB": false, 165 | "_reorderChildDirty": false, 166 | "_id": "", 167 | "_active": true, 168 | "_components": [ 169 | { 170 | "__id__": 4 171 | } 172 | ], 173 | "_prefab": { 174 | "__id__": 5 175 | } 176 | }, 177 | { 178 | "__type__": "cc.Sprite", 179 | "_name": "", 180 | "_objFlags": 0, 181 | "node": { 182 | "__id__": 3 183 | }, 184 | "_enabled": true, 185 | "_spriteFrame": { 186 | "__uuid__": "ee5e3c03-9532-4292-b4e0-fd0e940fdba0" 187 | }, 188 | "_type": 0, 189 | "_sizeMode": 0, 190 | "_fillType": 0, 191 | "_fillCenter": { 192 | "__type__": "cc.Vec2", 193 | "x": 0, 194 | "y": 0 195 | }, 196 | "_fillStart": 0, 197 | "_fillRange": 0, 198 | "_isTrimmedMode": true, 199 | "_srcBlendFactor": 770, 200 | "_dstBlendFactor": 771, 201 | "_atlas": null 202 | }, 203 | { 204 | "__type__": "cc.PrefabInfo", 205 | "root": { 206 | "__id__": 1 207 | }, 208 | "asset": { 209 | "__uuid__": "a77cf6e4-fdb0-46ac-ba41-33b1ed028fad" 210 | }, 211 | "fileId": "07627cWrFhF77hPkwHcUa4L" 212 | }, 213 | { 214 | "__type__": "cc.Mask", 215 | "_name": "", 216 | "_objFlags": 0, 217 | "node": { 218 | "__id__": 2 219 | }, 220 | "_enabled": true, 221 | "_type": 1, 222 | "_segements": 300 223 | }, 224 | { 225 | "__type__": "cc.PrefabInfo", 226 | "root": { 227 | "__id__": 1 228 | }, 229 | "asset": { 230 | "__uuid__": "a77cf6e4-fdb0-46ac-ba41-33b1ed028fad" 231 | }, 232 | "fileId": "a0208q0QhRCmqwtn4zNeXxC" 233 | }, 234 | { 235 | "__type__": "cc.Node", 236 | "_name": "grade", 237 | "_objFlags": 0, 238 | "_opacity": 255, 239 | "_color": { 240 | "__type__": "cc.Color", 241 | "r": 153, 242 | "g": 153, 243 | "b": 153, 244 | "a": 255 245 | }, 246 | "_cascadeOpacityEnabled": true, 247 | "_parent": { 248 | "__id__": 1 249 | }, 250 | "_anchorPoint": { 251 | "__type__": "cc.Vec2", 252 | "x": 0.5, 253 | "y": 0.5 254 | }, 255 | "_contentSize": { 256 | "__type__": "cc.Size", 257 | "width": 62.28, 258 | "height": 60 259 | }, 260 | "_children": [], 261 | "_rotationX": 0, 262 | "_rotationY": 0, 263 | "_scaleX": 0.5, 264 | "_scaleY": 0.5, 265 | "_position": { 266 | "__type__": "cc.Vec2", 267 | "x": 50, 268 | "y": 0 269 | }, 270 | "_skewX": 0, 271 | "_skewY": 0, 272 | "_localZOrder": 0, 273 | "_globalZOrder": 0, 274 | "_tag": -1, 275 | "_opacityModifyRGB": false, 276 | "_reorderChildDirty": false, 277 | "_id": "", 278 | "_active": true, 279 | "_components": [ 280 | { 281 | "__id__": 9 282 | } 283 | ], 284 | "_prefab": { 285 | "__id__": 10 286 | } 287 | }, 288 | { 289 | "__type__": "cc.Label", 290 | "_name": "", 291 | "_objFlags": 0, 292 | "node": { 293 | "__id__": 8 294 | }, 295 | "_enabled": true, 296 | "_useOriginalSize": false, 297 | "_fontSize": 60, 298 | "_lineHeight": 60, 299 | "_enableWrapText": true, 300 | "_isSystemFontUsed": false, 301 | "_N$string": "100", 302 | "_N$horizontalAlign": 1, 303 | "_N$verticalAlign": 1, 304 | "_N$overflow": 0, 305 | "_N$file": { 306 | "__uuid__": "a8241f55-5024-42aa-b287-89ede1a335a5" 307 | } 308 | }, 309 | { 310 | "__type__": "cc.PrefabInfo", 311 | "root": { 312 | "__id__": 1 313 | }, 314 | "asset": { 315 | "__uuid__": "a77cf6e4-fdb0-46ac-ba41-33b1ed028fad" 316 | }, 317 | "fileId": "f78f3w1e3dPgYir2MmnhGyq" 318 | }, 319 | { 320 | "__type__": "cc.PrefabInfo", 321 | "root": { 322 | "__id__": 1 323 | }, 324 | "asset": { 325 | "__uuid__": "a77cf6e4-fdb0-46ac-ba41-33b1ed028fad" 326 | }, 327 | "fileId": "4431fSAXlpMZKw1jBI+bzSk" 328 | } 329 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/order-item.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "65dd89a3-447f-4d5d-9f04-8ba058aae301", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/randomShape.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "data": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Node", 13 | "_name": "randomShape", 14 | "_objFlags": 0, 15 | "_opacity": 255, 16 | "_color": { 17 | "__type__": "cc.Color", 18 | "r": 255, 19 | "g": 255, 20 | "b": 255, 21 | "a": 255 22 | }, 23 | "_cascadeOpacityEnabled": true, 24 | "_parent": null, 25 | "_anchorPoint": { 26 | "__type__": "cc.Vec2", 27 | "x": 0.5, 28 | "y": 0.5 29 | }, 30 | "_contentSize": { 31 | "__type__": "cc.Size", 32 | "width": 0, 33 | "height": 0 34 | }, 35 | "_children": [], 36 | "_rotationX": 0, 37 | "_rotationY": 0, 38 | "_scaleX": 1, 39 | "_scaleY": 1, 40 | "_position": { 41 | "__type__": "cc.Vec2", 42 | "x": 0, 43 | "y": 0 44 | }, 45 | "_skewX": 0, 46 | "_skewY": 0, 47 | "_localZOrder": 0, 48 | "_globalZOrder": 0, 49 | "_tag": -1, 50 | "_opacityModifyRGB": false, 51 | "_reorderChildDirty": false, 52 | "_id": "", 53 | "_active": true, 54 | "_components": [ 55 | { 56 | "__id__": 2 57 | } 58 | ], 59 | "_prefab": { 60 | "__id__": 3 61 | }, 62 | "groupIndex": 0 63 | }, 64 | { 65 | "__type__": "eeabcIHa3JI3aHEKhoz9400", 66 | "_name": "", 67 | "_objFlags": 0, 68 | "node": { 69 | "__id__": 1 70 | }, 71 | "_enabled": true, 72 | "hexPrefab": { 73 | "__uuid__": "5c564553-c983-49ae-b6f2-b02c496bce12" 74 | }, 75 | "mBlocks": [] 76 | }, 77 | { 78 | "__type__": "cc.PrefabInfo", 79 | "root": { 80 | "__id__": 1 81 | }, 82 | "asset": { 83 | "__uuid__": "8ac41512-abc2-495f-911a-028fee558aaa" 84 | }, 85 | "fileId": "fdb00Yq+WVJ8ZOHW8IfZSqC" 86 | } 87 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/randomShape.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8ac41512-abc2-495f-911a-028fee558aaa", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/resultPrefab.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "data": { 7 | "__id__": 1 8 | } 9 | }, 10 | { 11 | "__type__": "cc.Node", 12 | "_name": "resultPrefab", 13 | "_objFlags": 0, 14 | "_opacity": 255, 15 | "_color": { 16 | "__type__": "cc.Color", 17 | "r": 255, 18 | "g": 255, 19 | "b": 255, 20 | "a": 255 21 | }, 22 | "_cascadeOpacityEnabled": true, 23 | "_parent": null, 24 | "_anchorPoint": { 25 | "__type__": "cc.Vec2", 26 | "x": 0.5, 27 | "y": 0.5 28 | }, 29 | "_contentSize": { 30 | "__type__": "cc.Size", 31 | "width": 0, 32 | "height": 0 33 | }, 34 | "_children": [ 35 | { 36 | "__id__": 2 37 | }, 38 | { 39 | "__id__": 5 40 | } 41 | ], 42 | "_rotationX": 0, 43 | "_rotationY": 0, 44 | "_scaleX": 1, 45 | "_scaleY": 1, 46 | "_position": { 47 | "__type__": "cc.Vec2", 48 | "x": 0, 49 | "y": 0 50 | }, 51 | "_skewX": 0, 52 | "_skewY": 0, 53 | "_localZOrder": 0, 54 | "_globalZOrder": 0, 55 | "_tag": -1, 56 | "_opacityModifyRGB": false, 57 | "_reorderChildDirty": false, 58 | "_id": "", 59 | "_active": false, 60 | "_components": [ 61 | { 62 | "__id__": 19 63 | } 64 | ], 65 | "_prefab": { 66 | "__id__": 20 67 | } 68 | }, 69 | { 70 | "__type__": "cc.Node", 71 | "_name": "mask", 72 | "_objFlags": 0, 73 | "_opacity": 100, 74 | "_color": { 75 | "__type__": "cc.Color", 76 | "r": 0, 77 | "g": 0, 78 | "b": 0, 79 | "a": 255 80 | }, 81 | "_cascadeOpacityEnabled": true, 82 | "_parent": { 83 | "__id__": 1 84 | }, 85 | "_anchorPoint": { 86 | "__type__": "cc.Vec2", 87 | "x": 0.5, 88 | "y": 0.5 89 | }, 90 | "_contentSize": { 91 | "__type__": "cc.Size", 92 | "width": 1000, 93 | "height": 1300 94 | }, 95 | "_children": [], 96 | "_rotationX": 0, 97 | "_rotationY": 0, 98 | "_scaleX": 1, 99 | "_scaleY": 1, 100 | "_position": { 101 | "__type__": "cc.Vec2", 102 | "x": 0, 103 | "y": 0 104 | }, 105 | "_skewX": 0, 106 | "_skewY": 0, 107 | "_localZOrder": 0, 108 | "_globalZOrder": 0, 109 | "_tag": -1, 110 | "_opacityModifyRGB": false, 111 | "_reorderChildDirty": false, 112 | "_id": "", 113 | "_active": true, 114 | "_components": [ 115 | { 116 | "__id__": 3 117 | } 118 | ], 119 | "_prefab": { 120 | "__id__": 4 121 | } 122 | }, 123 | { 124 | "__type__": "cc.Sprite", 125 | "_name": "", 126 | "_objFlags": 0, 127 | "node": { 128 | "__id__": 2 129 | }, 130 | "_enabled": true, 131 | "_spriteFrame": { 132 | "__uuid__": "3f013750-dcaf-4302-9629-2b9bd9b31e52" 133 | }, 134 | "_type": 0, 135 | "_sizeMode": 0, 136 | "_fillType": 0, 137 | "_fillCenter": { 138 | "__type__": "cc.Vec2", 139 | "x": 0, 140 | "y": 0 141 | }, 142 | "_fillStart": 0, 143 | "_fillRange": 0, 144 | "_isTrimmedMode": true, 145 | "_srcBlendFactor": 770, 146 | "_dstBlendFactor": 771, 147 | "_atlas": null 148 | }, 149 | { 150 | "__type__": "cc.PrefabInfo", 151 | "root": { 152 | "__id__": 1 153 | }, 154 | "asset": null, 155 | "fileId": "d09a6mzxq9NxJlrxyE7uTYC" 156 | }, 157 | { 158 | "__type__": "cc.Node", 159 | "_name": "board", 160 | "_objFlags": 0, 161 | "_opacity": 255, 162 | "_color": { 163 | "__type__": "cc.Color", 164 | "r": 255, 165 | "g": 255, 166 | "b": 255, 167 | "a": 255 168 | }, 169 | "_cascadeOpacityEnabled": true, 170 | "_parent": { 171 | "__id__": 1 172 | }, 173 | "_anchorPoint": { 174 | "__type__": "cc.Vec2", 175 | "x": 0.5, 176 | "y": 0.5 177 | }, 178 | "_contentSize": { 179 | "__type__": "cc.Size", 180 | "width": 500, 181 | "height": 400 182 | }, 183 | "_children": [ 184 | { 185 | "__id__": 6 186 | }, 187 | { 188 | "__id__": 9 189 | }, 190 | { 191 | "__id__": 12 192 | } 193 | ], 194 | "_rotationX": 0, 195 | "_rotationY": 0, 196 | "_scaleX": 1, 197 | "_scaleY": 1, 198 | "_position": { 199 | "__type__": "cc.Vec2", 200 | "x": 0, 201 | "y": 0 202 | }, 203 | "_skewX": 0, 204 | "_skewY": 0, 205 | "_localZOrder": 0, 206 | "_globalZOrder": 0, 207 | "_tag": -1, 208 | "_opacityModifyRGB": false, 209 | "_reorderChildDirty": false, 210 | "_id": "", 211 | "_active": true, 212 | "_components": [ 213 | { 214 | "__id__": 17 215 | } 216 | ], 217 | "_prefab": { 218 | "__id__": 18 219 | } 220 | }, 221 | { 222 | "__type__": "cc.Node", 223 | "_name": "title", 224 | "_objFlags": 0, 225 | "_opacity": 255, 226 | "_color": { 227 | "__type__": "cc.Color", 228 | "r": 153, 229 | "g": 153, 230 | "b": 153, 231 | "a": 255 232 | }, 233 | "_cascadeOpacityEnabled": true, 234 | "_parent": { 235 | "__id__": 5 236 | }, 237 | "_anchorPoint": { 238 | "__type__": "cc.Vec2", 239 | "x": 0.5, 240 | "y": 0.5 241 | }, 242 | "_contentSize": { 243 | "__type__": "cc.Size", 244 | "width": 160, 245 | "height": 40 246 | }, 247 | "_children": [], 248 | "_rotationX": 0, 249 | "_rotationY": 0, 250 | "_scaleX": 1, 251 | "_scaleY": 1, 252 | "_position": { 253 | "__type__": "cc.Vec2", 254 | "x": 0, 255 | "y": 131 256 | }, 257 | "_skewX": 0, 258 | "_skewY": 0, 259 | "_localZOrder": 0, 260 | "_globalZOrder": 0, 261 | "_tag": -1, 262 | "_opacityModifyRGB": false, 263 | "_reorderChildDirty": false, 264 | "_id": "", 265 | "_active": true, 266 | "_components": [ 267 | { 268 | "__id__": 7 269 | } 270 | ], 271 | "_prefab": { 272 | "__id__": 8 273 | } 274 | }, 275 | { 276 | "__type__": "cc.Label", 277 | "_name": "", 278 | "_objFlags": 0, 279 | "node": { 280 | "__id__": 6 281 | }, 282 | "_enabled": true, 283 | "_useOriginalSize": false, 284 | "_fontSize": 40, 285 | "_lineHeight": 40, 286 | "_enableWrapText": true, 287 | "_isSystemFontUsed": true, 288 | "_N$string": "游戏结束", 289 | "_N$horizontalAlign": 1, 290 | "_N$verticalAlign": 1, 291 | "_N$overflow": 0 292 | }, 293 | { 294 | "__type__": "cc.PrefabInfo", 295 | "root": { 296 | "__id__": 1 297 | }, 298 | "asset": null, 299 | "fileId": "5270aPBHDdBwp/Vi2Rm6hHA" 300 | }, 301 | { 302 | "__type__": "cc.Node", 303 | "_name": "score", 304 | "_objFlags": 0, 305 | "_opacity": 255, 306 | "_color": { 307 | "__type__": "cc.Color", 308 | "r": 0, 309 | "g": 0, 310 | "b": 0, 311 | "a": 255 312 | }, 313 | "_cascadeOpacityEnabled": true, 314 | "_parent": { 315 | "__id__": 5 316 | }, 317 | "_anchorPoint": { 318 | "__type__": "cc.Vec2", 319 | "x": 0.5, 320 | "y": 0.5 321 | }, 322 | "_contentSize": { 323 | "__type__": "cc.Size", 324 | "width": 133.48, 325 | "height": 80 326 | }, 327 | "_children": [], 328 | "_rotationX": 0, 329 | "_rotationY": 0, 330 | "_scaleX": 1, 331 | "_scaleY": 1, 332 | "_position": { 333 | "__type__": "cc.Vec2", 334 | "x": 0, 335 | "y": 9 336 | }, 337 | "_skewX": 0, 338 | "_skewY": 0, 339 | "_localZOrder": 0, 340 | "_globalZOrder": 0, 341 | "_tag": -1, 342 | "_opacityModifyRGB": false, 343 | "_reorderChildDirty": false, 344 | "_id": "", 345 | "_active": true, 346 | "_components": [ 347 | { 348 | "__id__": 10 349 | } 350 | ], 351 | "_prefab": { 352 | "__id__": 11 353 | } 354 | }, 355 | { 356 | "__type__": "cc.Label", 357 | "_name": "", 358 | "_objFlags": 0, 359 | "node": { 360 | "__id__": 9 361 | }, 362 | "_enabled": true, 363 | "_useOriginalSize": false, 364 | "_fontSize": 80, 365 | "_lineHeight": 80, 366 | "_enableWrapText": true, 367 | "_isSystemFontUsed": true, 368 | "_N$string": "200", 369 | "_N$horizontalAlign": 1, 370 | "_N$verticalAlign": 1, 371 | "_N$overflow": 0 372 | }, 373 | { 374 | "__type__": "cc.PrefabInfo", 375 | "root": { 376 | "__id__": 1 377 | }, 378 | "asset": null, 379 | "fileId": "e6f2crLpNdEZ6Xxcm1EjRak" 380 | }, 381 | { 382 | "__type__": "cc.Node", 383 | "_name": "btnPlay", 384 | "_objFlags": 0, 385 | "_opacity": 255, 386 | "_color": { 387 | "__type__": "cc.Color", 388 | "r": 255, 389 | "g": 255, 390 | "b": 255, 391 | "a": 255 392 | }, 393 | "_cascadeOpacityEnabled": true, 394 | "_parent": { 395 | "__id__": 5 396 | }, 397 | "_anchorPoint": { 398 | "__type__": "cc.Vec2", 399 | "x": 0.5, 400 | "y": 0.5 401 | }, 402 | "_contentSize": { 403 | "__type__": "cc.Size", 404 | "width": 400, 405 | "height": 100 406 | }, 407 | "_children": [ 408 | { 409 | "__id__": 13 410 | } 411 | ], 412 | "_rotationX": 0, 413 | "_rotationY": 0, 414 | "_scaleX": 1, 415 | "_scaleY": 1, 416 | "_position": { 417 | "__type__": "cc.Vec2", 418 | "x": 0, 419 | "y": -129 420 | }, 421 | "_skewX": 0, 422 | "_skewY": 0, 423 | "_localZOrder": 0, 424 | "_globalZOrder": 0, 425 | "_tag": -1, 426 | "_opacityModifyRGB": false, 427 | "_reorderChildDirty": false, 428 | "_id": "", 429 | "_active": true, 430 | "_components": [], 431 | "_prefab": { 432 | "__id__": 16 433 | } 434 | }, 435 | { 436 | "__type__": "cc.Node", 437 | "_name": "label", 438 | "_objFlags": 0, 439 | "_opacity": 255, 440 | "_color": { 441 | "__type__": "cc.Color", 442 | "r": 30, 443 | "g": 120, 444 | "b": 235, 445 | "a": 255 446 | }, 447 | "_cascadeOpacityEnabled": true, 448 | "_parent": { 449 | "__id__": 12 450 | }, 451 | "_anchorPoint": { 452 | "__type__": "cc.Vec2", 453 | "x": 0.5, 454 | "y": 0.5 455 | }, 456 | "_contentSize": { 457 | "__type__": "cc.Size", 458 | "width": 200, 459 | "height": 50 460 | }, 461 | "_children": [], 462 | "_rotationX": 0, 463 | "_rotationY": 0, 464 | "_scaleX": 1, 465 | "_scaleY": 1, 466 | "_position": { 467 | "__type__": "cc.Vec2", 468 | "x": 0, 469 | "y": 0 470 | }, 471 | "_skewX": 0, 472 | "_skewY": 0, 473 | "_localZOrder": 0, 474 | "_globalZOrder": 0, 475 | "_tag": -1, 476 | "_opacityModifyRGB": false, 477 | "_reorderChildDirty": false, 478 | "_id": "", 479 | "_active": true, 480 | "_components": [ 481 | { 482 | "__id__": 14 483 | } 484 | ], 485 | "_prefab": { 486 | "__id__": 15 487 | } 488 | }, 489 | { 490 | "__type__": "cc.Label", 491 | "_name": "", 492 | "_objFlags": 0, 493 | "node": { 494 | "__id__": 13 495 | }, 496 | "_enabled": true, 497 | "_useOriginalSize": false, 498 | "_fontSize": 50, 499 | "_lineHeight": 50, 500 | "_enableWrapText": true, 501 | "_isSystemFontUsed": true, 502 | "_N$string": "再来一局", 503 | "_N$horizontalAlign": 1, 504 | "_N$verticalAlign": 1, 505 | "_N$overflow": 0 506 | }, 507 | { 508 | "__type__": "cc.PrefabInfo", 509 | "root": { 510 | "__id__": 1 511 | }, 512 | "asset": null, 513 | "fileId": "3b4a9duq6tB3r2e4d5Boi+u" 514 | }, 515 | { 516 | "__type__": "cc.PrefabInfo", 517 | "root": { 518 | "__id__": 1 519 | }, 520 | "asset": null, 521 | "fileId": "8172cns67RCu7Vi5HkMwKwv" 522 | }, 523 | { 524 | "__type__": "cc.Sprite", 525 | "_name": "", 526 | "_objFlags": 0, 527 | "node": { 528 | "__id__": 5 529 | }, 530 | "_enabled": true, 531 | "_spriteFrame": { 532 | "__uuid__": "6f00b4cf-920d-4a6b-842c-f10788c68e41" 533 | }, 534 | "_type": 0, 535 | "_sizeMode": 0, 536 | "_fillType": 0, 537 | "_fillCenter": { 538 | "__type__": "cc.Vec2", 539 | "x": 0, 540 | "y": 0 541 | }, 542 | "_fillStart": 0, 543 | "_fillRange": 0, 544 | "_isTrimmedMode": true, 545 | "_srcBlendFactor": 770, 546 | "_dstBlendFactor": 771, 547 | "_atlas": null 548 | }, 549 | { 550 | "__type__": "cc.PrefabInfo", 551 | "root": { 552 | "__id__": 1 553 | }, 554 | "asset": null, 555 | "fileId": "316abHcDO1O5ZLhkYSp+VrS" 556 | }, 557 | { 558 | "__type__": "ebb18wJtdlBE4NF8OFK+3Yk", 559 | "_name": "", 560 | "_objFlags": 0, 561 | "node": { 562 | "__id__": 1 563 | }, 564 | "_enabled": true, 565 | "title": { 566 | "__id__": 6 567 | }, 568 | "score": { 569 | "__id__": 9 570 | }, 571 | "btnPlay": { 572 | "__id__": 12 573 | } 574 | }, 575 | { 576 | "__type__": "cc.PrefabInfo", 577 | "root": { 578 | "__id__": 1 579 | }, 580 | "asset": null, 581 | "fileId": "dea7a5WdhNEvq7sreaH0Mdd" 582 | } 583 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/Perfab/resultPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "d87005de-2fd7-4a55-969e-66cc0a4a4114", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Scene/Hexagon.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "scene": { 7 | "__id__": 1 8 | } 9 | }, 10 | { 11 | "__type__": "cc.Scene", 12 | "_name": "Hexagon", 13 | "_objFlags": 0, 14 | "_opacity": 255, 15 | "_color": { 16 | "__type__": "cc.Color", 17 | "r": 255, 18 | "g": 255, 19 | "b": 255, 20 | "a": 255 21 | }, 22 | "_cascadeOpacityEnabled": true, 23 | "_parent": null, 24 | "_anchorPoint": { 25 | "__type__": "cc.Vec2", 26 | "x": 0, 27 | "y": 0 28 | }, 29 | "_contentSize": { 30 | "__type__": "cc.Size", 31 | "width": 0, 32 | "height": 0 33 | }, 34 | "_children": [ 35 | { 36 | "__id__": 2 37 | }, 38 | { 39 | "__id__": 28 40 | }, 41 | { 42 | "__id__": 32 43 | } 44 | ], 45 | "_localZOrder": 0, 46 | "_globalZOrder": 0, 47 | "_tag": -1, 48 | "_opacityModifyRGB": false, 49 | "_reorderChildDirty": false, 50 | "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" 51 | }, 52 | { 53 | "__type__": "cc.Node", 54 | "_name": "Canvas", 55 | "_objFlags": 0, 56 | "_opacity": 255, 57 | "_color": { 58 | "__type__": "cc.Color", 59 | "r": 252, 60 | "g": 252, 61 | "b": 252, 62 | "a": 255 63 | }, 64 | "_cascadeOpacityEnabled": true, 65 | "_parent": { 66 | "__id__": 1 67 | }, 68 | "_anchorPoint": { 69 | "__type__": "cc.Vec2", 70 | "x": 0.5, 71 | "y": 0.5 72 | }, 73 | "_contentSize": { 74 | "__type__": "cc.Size", 75 | "width": 750, 76 | "height": 1200 77 | }, 78 | "_children": [ 79 | { 80 | "__id__": 3 81 | }, 82 | { 83 | "__id__": 6 84 | }, 85 | { 86 | "__id__": 8 87 | }, 88 | { 89 | "__id__": 9 90 | }, 91 | { 92 | "__id__": 10 93 | }, 94 | { 95 | "__id__": 13 96 | }, 97 | { 98 | "__id__": 16 99 | }, 100 | { 101 | "__id__": 19 102 | } 103 | ], 104 | "_rotationX": 0, 105 | "_rotationY": 0, 106 | "_scaleX": 1, 107 | "_scaleY": 1, 108 | "_position": { 109 | "__type__": "cc.Vec2", 110 | "x": 375, 111 | "y": 600 112 | }, 113 | "_skewX": 0, 114 | "_skewY": 0, 115 | "_localZOrder": 0, 116 | "_globalZOrder": 0, 117 | "_tag": -1, 118 | "_opacityModifyRGB": false, 119 | "_reorderChildDirty": false, 120 | "_id": "a286bbGknJLZpRpxROV6M94", 121 | "_active": true, 122 | "_components": [ 123 | { 124 | "__id__": 26 125 | }, 126 | { 127 | "__id__": 27 128 | } 129 | ], 130 | "_prefab": null 131 | }, 132 | { 133 | "__type__": "cc.Node", 134 | "_name": "background", 135 | "_objFlags": 0, 136 | "_opacity": 255, 137 | "_color": { 138 | "__type__": "cc.Color", 139 | "r": 255, 140 | "g": 255, 141 | "b": 255, 142 | "a": 255 143 | }, 144 | "_cascadeOpacityEnabled": true, 145 | "_parent": { 146 | "__id__": 2 147 | }, 148 | "_anchorPoint": { 149 | "__type__": "cc.Vec2", 150 | "x": 0.5, 151 | "y": 0.5 152 | }, 153 | "_contentSize": { 154 | "__type__": "cc.Size", 155 | "width": 750, 156 | "height": 1200 157 | }, 158 | "_children": [], 159 | "_rotationX": 0, 160 | "_rotationY": 0, 161 | "_scaleX": 1, 162 | "_scaleY": 1, 163 | "_position": { 164 | "__type__": "cc.Vec2", 165 | "x": 0, 166 | "y": 0 167 | }, 168 | "_skewX": 0, 169 | "_skewY": 0, 170 | "_localZOrder": 0, 171 | "_globalZOrder": 0, 172 | "_tag": -1, 173 | "_opacityModifyRGB": false, 174 | "_reorderChildDirty": false, 175 | "_id": "e2e0crkOLxGrpMxpbC4iQg1", 176 | "_active": true, 177 | "_components": [ 178 | { 179 | "__id__": 4 180 | }, 181 | { 182 | "__id__": 5 183 | } 184 | ], 185 | "_prefab": null 186 | }, 187 | { 188 | "__type__": "cc.Widget", 189 | "_name": "", 190 | "_objFlags": 0, 191 | "node": { 192 | "__id__": 3 193 | }, 194 | "_enabled": true, 195 | "isAlignOnce": true, 196 | "_alignFlags": 45, 197 | "_left": 0, 198 | "_right": 0, 199 | "_top": 0, 200 | "_bottom": 0, 201 | "_isAbsLeft": true, 202 | "_isAbsRight": true, 203 | "_isAbsTop": true, 204 | "_isAbsBottom": true, 205 | "_originalWidth": 200, 206 | "_originalHeight": 150 207 | }, 208 | { 209 | "__type__": "cc.Sprite", 210 | "_name": "", 211 | "_objFlags": 0, 212 | "node": { 213 | "__id__": 3 214 | }, 215 | "_enabled": true, 216 | "_spriteFrame": { 217 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7" 218 | }, 219 | "_type": 1, 220 | "_sizeMode": 0, 221 | "_fillType": 0, 222 | "_fillCenter": { 223 | "__type__": "cc.Vec2", 224 | "x": 0, 225 | "y": 0 226 | }, 227 | "_fillStart": 0, 228 | "_fillRange": 0, 229 | "_isTrimmedMode": true, 230 | "_srcBlendFactor": 770, 231 | "_dstBlendFactor": 771, 232 | "_atlas": null 233 | }, 234 | { 235 | "__type__": "cc.Node", 236 | "_name": "shapeHolder1", 237 | "_objFlags": 0, 238 | "_opacity": 255, 239 | "_color": { 240 | "__type__": "cc.Color", 241 | "r": 255, 242 | "g": 255, 243 | "b": 255, 244 | "a": 255 245 | }, 246 | "_cascadeOpacityEnabled": true, 247 | "_parent": { 248 | "__id__": 2 249 | }, 250 | "_anchorPoint": { 251 | "__type__": "cc.Vec2", 252 | "x": 0.5, 253 | "y": 0.5 254 | }, 255 | "_contentSize": { 256 | "__type__": "cc.Size", 257 | "width": 200, 258 | "height": 200 259 | }, 260 | "_children": [], 261 | "_rotationX": 0, 262 | "_rotationY": 0, 263 | "_scaleX": 1, 264 | "_scaleY": 1, 265 | "_position": { 266 | "__type__": "cc.Vec2", 267 | "x": -260, 268 | "y": -490 269 | }, 270 | "_skewX": 0, 271 | "_skewY": 0, 272 | "_localZOrder": 0, 273 | "_globalZOrder": 0, 274 | "_tag": -1, 275 | "_opacityModifyRGB": false, 276 | "_reorderChildDirty": false, 277 | "_id": "9fb19I1wXxEh4fxTVbz1z2e", 278 | "_active": true, 279 | "_components": [ 280 | { 281 | "__id__": 7 282 | } 283 | ], 284 | "_prefab": null 285 | }, 286 | { 287 | "__type__": "cc.Sprite", 288 | "_name": "", 289 | "_objFlags": 0, 290 | "node": { 291 | "__id__": 6 292 | }, 293 | "_enabled": false, 294 | "_spriteFrame": { 295 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 296 | }, 297 | "_type": 0, 298 | "_sizeMode": 0, 299 | "_fillType": 0, 300 | "_fillCenter": { 301 | "__type__": "cc.Vec2", 302 | "x": 0, 303 | "y": 0 304 | }, 305 | "_fillStart": 0, 306 | "_fillRange": 0, 307 | "_isTrimmedMode": true, 308 | "_srcBlendFactor": 770, 309 | "_dstBlendFactor": 771, 310 | "_atlas": null 311 | }, 312 | { 313 | "__type__": "cc.Node", 314 | "_name": "shapeHolder2", 315 | "_objFlags": 0, 316 | "_opacity": 255, 317 | "_color": { 318 | "__type__": "cc.Color", 319 | "r": 255, 320 | "g": 255, 321 | "b": 255, 322 | "a": 255 323 | }, 324 | "_cascadeOpacityEnabled": true, 325 | "_parent": { 326 | "__id__": 2 327 | }, 328 | "_anchorPoint": { 329 | "__type__": "cc.Vec2", 330 | "x": 0.5, 331 | "y": 0.5 332 | }, 333 | "_contentSize": { 334 | "__type__": "cc.Size", 335 | "width": 200, 336 | "height": 200 337 | }, 338 | "_children": [], 339 | "_rotationX": 0, 340 | "_rotationY": 0, 341 | "_scaleX": 1, 342 | "_scaleY": 1, 343 | "_position": { 344 | "__type__": "cc.Vec2", 345 | "x": 0, 346 | "y": -490 347 | }, 348 | "_skewX": 0, 349 | "_skewY": 0, 350 | "_localZOrder": 0, 351 | "_globalZOrder": 0, 352 | "_tag": -1, 353 | "_opacityModifyRGB": false, 354 | "_reorderChildDirty": false, 355 | "_id": "a41f52yC0BN44Ah58zfk2I1", 356 | "_active": true, 357 | "_components": [], 358 | "_prefab": null 359 | }, 360 | { 361 | "__type__": "cc.Node", 362 | "_name": "shapeHolder3", 363 | "_objFlags": 0, 364 | "_opacity": 255, 365 | "_color": { 366 | "__type__": "cc.Color", 367 | "r": 255, 368 | "g": 255, 369 | "b": 255, 370 | "a": 255 371 | }, 372 | "_cascadeOpacityEnabled": true, 373 | "_parent": { 374 | "__id__": 2 375 | }, 376 | "_anchorPoint": { 377 | "__type__": "cc.Vec2", 378 | "x": 0.5, 379 | "y": 0.5 380 | }, 381 | "_contentSize": { 382 | "__type__": "cc.Size", 383 | "width": 200, 384 | "height": 200 385 | }, 386 | "_children": [], 387 | "_rotationX": 0, 388 | "_rotationY": 0, 389 | "_scaleX": 1, 390 | "_scaleY": 1, 391 | "_position": { 392 | "__type__": "cc.Vec2", 393 | "x": 261, 394 | "y": -490 395 | }, 396 | "_skewX": 0, 397 | "_skewY": 0, 398 | "_localZOrder": 0, 399 | "_globalZOrder": 0, 400 | "_tag": -1, 401 | "_opacityModifyRGB": false, 402 | "_reorderChildDirty": false, 403 | "_id": "4ccc5ZzB/tJmZ6Oz1p0AfgJ", 404 | "_active": true, 405 | "_components": [], 406 | "_prefab": null 407 | }, 408 | { 409 | "__type__": "cc.Node", 410 | "_name": "currentScore", 411 | "_objFlags": 0, 412 | "_opacity": 255, 413 | "_color": { 414 | "__type__": "cc.Color", 415 | "r": 0, 416 | "g": 0, 417 | "b": 0, 418 | "a": 255 419 | }, 420 | "_cascadeOpacityEnabled": true, 421 | "_parent": { 422 | "__id__": 2 423 | }, 424 | "_anchorPoint": { 425 | "__type__": "cc.Vec2", 426 | "x": 0.5, 427 | "y": 0.5 428 | }, 429 | "_contentSize": { 430 | "__type__": "cc.Size", 431 | "width": 33.37, 432 | "height": 60 433 | }, 434 | "_children": [], 435 | "_rotationX": 0, 436 | "_rotationY": 0, 437 | "_scaleX": 1, 438 | "_scaleY": 1, 439 | "_position": { 440 | "__type__": "cc.Vec2", 441 | "x": 0, 442 | "y": 485 443 | }, 444 | "_skewX": 0, 445 | "_skewY": 0, 446 | "_localZOrder": 0, 447 | "_globalZOrder": 0, 448 | "_tag": -1, 449 | "_opacityModifyRGB": false, 450 | "_reorderChildDirty": false, 451 | "_id": "d1db1J11v5LM7mgDF2ny0NL", 452 | "_active": true, 453 | "_components": [ 454 | { 455 | "__id__": 11 456 | }, 457 | { 458 | "__id__": 12 459 | } 460 | ], 461 | "_prefab": null 462 | }, 463 | { 464 | "__type__": "cc.Label", 465 | "_name": "", 466 | "_objFlags": 0, 467 | "node": { 468 | "__id__": 10 469 | }, 470 | "_enabled": true, 471 | "_useOriginalSize": false, 472 | "_fontSize": 60, 473 | "_lineHeight": 60, 474 | "_enableWrapText": true, 475 | "_isSystemFontUsed": true, 476 | "_N$string": "0", 477 | "_N$horizontalAlign": 1, 478 | "_N$verticalAlign": 1, 479 | "_N$overflow": 0 480 | }, 481 | { 482 | "__type__": "cc.Widget", 483 | "_name": "", 484 | "_objFlags": 0, 485 | "node": { 486 | "__id__": 10 487 | }, 488 | "_enabled": true, 489 | "isAlignOnce": false, 490 | "_alignFlags": 17, 491 | "_left": 330.51, 492 | "_right": 330.51, 493 | "_top": 85, 494 | "_bottom": 0, 495 | "_isAbsLeft": true, 496 | "_isAbsRight": true, 497 | "_isAbsTop": true, 498 | "_isAbsBottom": true, 499 | "_originalWidth": 88.98, 500 | "_originalHeight": 0 501 | }, 502 | { 503 | "__type__": "cc.Node", 504 | "_name": "addScore", 505 | "_objFlags": 0, 506 | "_opacity": 255, 507 | "_color": { 508 | "__type__": "cc.Color", 509 | "r": 0, 510 | "g": 0, 511 | "b": 0, 512 | "a": 255 513 | }, 514 | "_cascadeOpacityEnabled": true, 515 | "_parent": { 516 | "__id__": 2 517 | }, 518 | "_anchorPoint": { 519 | "__type__": "cc.Vec2", 520 | "x": 0.5, 521 | "y": 0.5 522 | }, 523 | "_contentSize": { 524 | "__type__": "cc.Size", 525 | "width": 8.33, 526 | "height": 30 527 | }, 528 | "_children": [], 529 | "_rotationX": 0, 530 | "_rotationY": 0, 531 | "_scaleX": 1, 532 | "_scaleY": 1, 533 | "_position": { 534 | "__type__": "cc.Vec2", 535 | "x": 0, 536 | "y": 365 537 | }, 538 | "_skewX": 0, 539 | "_skewY": 0, 540 | "_localZOrder": 0, 541 | "_globalZOrder": 0, 542 | "_tag": -1, 543 | "_opacityModifyRGB": false, 544 | "_reorderChildDirty": false, 545 | "_id": "5c8ceb6IXZNf4i66sQ+lzOp", 546 | "_active": true, 547 | "_components": [ 548 | { 549 | "__id__": 14 550 | }, 551 | { 552 | "__id__": 15 553 | } 554 | ], 555 | "_prefab": null 556 | }, 557 | { 558 | "__type__": "cc.Label", 559 | "_name": "", 560 | "_objFlags": 0, 561 | "node": { 562 | "__id__": 13 563 | }, 564 | "_enabled": true, 565 | "_useOriginalSize": false, 566 | "_fontSize": 30, 567 | "_lineHeight": 30, 568 | "_enableWrapText": true, 569 | "_isSystemFontUsed": true, 570 | "_N$string": " ", 571 | "_N$horizontalAlign": 1, 572 | "_N$verticalAlign": 1, 573 | "_N$overflow": 0 574 | }, 575 | { 576 | "__type__": "cc.Widget", 577 | "_name": "", 578 | "_objFlags": 0, 579 | "node": { 580 | "__id__": 13 581 | }, 582 | "_enabled": true, 583 | "isAlignOnce": false, 584 | "_alignFlags": 0, 585 | "_left": 330.51, 586 | "_right": 330.51, 587 | "_top": 220, 588 | "_bottom": 0, 589 | "_isAbsLeft": true, 590 | "_isAbsRight": true, 591 | "_isAbsTop": true, 592 | "_isAbsBottom": true, 593 | "_originalWidth": 88.98, 594 | "_originalHeight": 0 595 | }, 596 | { 597 | "__type__": "cc.Node", 598 | "_name": "gameOver", 599 | "_objFlags": 0, 600 | "_opacity": 255, 601 | "_color": { 602 | "__type__": "cc.Color", 603 | "r": 255, 604 | "g": 255, 605 | "b": 255, 606 | "a": 255 607 | }, 608 | "_cascadeOpacityEnabled": true, 609 | "_parent": { 610 | "__id__": 2 611 | }, 612 | "_anchorPoint": { 613 | "__type__": "cc.Vec2", 614 | "x": 0.5, 615 | "y": 0.5 616 | }, 617 | "_contentSize": { 618 | "__type__": "cc.Size", 619 | "width": 0, 620 | "height": 0 621 | }, 622 | "_children": [], 623 | "_rotationX": 0, 624 | "_rotationY": 0, 625 | "_scaleX": 1, 626 | "_scaleY": 1, 627 | "_position": { 628 | "__type__": "cc.Vec2", 629 | "x": 0, 630 | "y": 0 631 | }, 632 | "_skewX": 0, 633 | "_skewY": 0, 634 | "_localZOrder": 0, 635 | "_globalZOrder": 0, 636 | "_tag": -1, 637 | "_opacityModifyRGB": false, 638 | "_reorderChildDirty": false, 639 | "_id": "a30f6z38kdFNJoH9zGPHBBx", 640 | "_active": true, 641 | "_components": [ 642 | { 643 | "__id__": 17 644 | }, 645 | { 646 | "__id__": 18 647 | } 648 | ], 649 | "_prefab": null 650 | }, 651 | { 652 | "__type__": "cc.Sprite", 653 | "_name": "", 654 | "_objFlags": 0, 655 | "node": { 656 | "__id__": 16 657 | }, 658 | "_enabled": true, 659 | "_spriteFrame": { 660 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 661 | }, 662 | "_type": 0, 663 | "_sizeMode": 0, 664 | "_fillType": 0, 665 | "_fillCenter": { 666 | "__type__": "cc.Vec2", 667 | "x": 0, 668 | "y": 0 669 | }, 670 | "_fillStart": 0, 671 | "_fillRange": 0, 672 | "_isTrimmedMode": true, 673 | "_srcBlendFactor": 770, 674 | "_dstBlendFactor": 771, 675 | "_atlas": null 676 | }, 677 | { 678 | "__type__": "cc.Widget", 679 | "_name": "", 680 | "_objFlags": 0, 681 | "node": { 682 | "__id__": 16 683 | }, 684 | "_enabled": true, 685 | "isAlignOnce": false, 686 | "_alignFlags": 18, 687 | "_left": 0, 688 | "_right": 0, 689 | "_top": 0, 690 | "_bottom": 0, 691 | "_isAbsLeft": true, 692 | "_isAbsRight": true, 693 | "_isAbsTop": true, 694 | "_isAbsBottom": true, 695 | "_originalWidth": 0, 696 | "_originalHeight": 0 697 | }, 698 | { 699 | "__type__": "cc.Node", 700 | "_name": "step", 701 | "_objFlags": 0, 702 | "_opacity": 255, 703 | "_color": { 704 | "__type__": "cc.Color", 705 | "r": 255, 706 | "g": 255, 707 | "b": 255, 708 | "a": 255 709 | }, 710 | "_cascadeOpacityEnabled": true, 711 | "_parent": { 712 | "__id__": 2 713 | }, 714 | "_anchorPoint": { 715 | "__type__": "cc.Vec2", 716 | "x": 0.5, 717 | "y": 0.5 718 | }, 719 | "_contentSize": { 720 | "__type__": "cc.Size", 721 | "width": 200, 722 | "height": 80 723 | }, 724 | "_children": [ 725 | { 726 | "__id__": 20 727 | }, 728 | { 729 | "__id__": 22 730 | } 731 | ], 732 | "_rotationX": 0, 733 | "_rotationY": 0, 734 | "_scaleX": 1, 735 | "_scaleY": 1, 736 | "_position": { 737 | "__type__": "cc.Vec2", 738 | "x": 275, 739 | "y": 485 740 | }, 741 | "_skewX": 0, 742 | "_skewY": 0, 743 | "_localZOrder": 0, 744 | "_globalZOrder": 0, 745 | "_tag": -1, 746 | "_opacityModifyRGB": false, 747 | "_reorderChildDirty": false, 748 | "_id": "ed84cUQImhAybb1FdLSt6DE", 749 | "_active": true, 750 | "_components": [ 751 | { 752 | "__id__": 24 753 | }, 754 | { 755 | "__id__": 25 756 | } 757 | ], 758 | "_prefab": null 759 | }, 760 | { 761 | "__type__": "cc.Node", 762 | "_name": "name", 763 | "_objFlags": 0, 764 | "_opacity": 255, 765 | "_color": { 766 | "__type__": "cc.Color", 767 | "r": 141, 768 | "g": 141, 769 | "b": 141, 770 | "a": 255 771 | }, 772 | "_cascadeOpacityEnabled": true, 773 | "_parent": { 774 | "__id__": 19 775 | }, 776 | "_anchorPoint": { 777 | "__type__": "cc.Vec2", 778 | "x": 0.5, 779 | "y": 0.5 780 | }, 781 | "_contentSize": { 782 | "__type__": "cc.Size", 783 | "width": 120, 784 | "height": 80 785 | }, 786 | "_children": [], 787 | "_rotationX": 0, 788 | "_rotationY": 0, 789 | "_scaleX": 0.55, 790 | "_scaleY": 0.5, 791 | "_position": { 792 | "__type__": "cc.Vec2", 793 | "x": -57, 794 | "y": 0 795 | }, 796 | "_skewX": 0, 797 | "_skewY": 0, 798 | "_localZOrder": 0, 799 | "_globalZOrder": 0, 800 | "_tag": -1, 801 | "_opacityModifyRGB": false, 802 | "_reorderChildDirty": false, 803 | "_id": "d36d1uscJhAc6Ina4877RCM", 804 | "_active": true, 805 | "_components": [ 806 | { 807 | "__id__": 21 808 | } 809 | ], 810 | "_prefab": null 811 | }, 812 | { 813 | "__type__": "cc.Label", 814 | "_name": "", 815 | "_objFlags": 0, 816 | "node": { 817 | "__id__": 20 818 | }, 819 | "_enabled": true, 820 | "_useOriginalSize": false, 821 | "_fontSize": 60, 822 | "_lineHeight": 80, 823 | "_enableWrapText": true, 824 | "_isSystemFontUsed": true, 825 | "_N$string": "步数", 826 | "_N$horizontalAlign": 1, 827 | "_N$verticalAlign": 1, 828 | "_N$overflow": 0 829 | }, 830 | { 831 | "__type__": "cc.Node", 832 | "_name": "count", 833 | "_objFlags": 0, 834 | "_opacity": 255, 835 | "_color": { 836 | "__type__": "cc.Color", 837 | "r": 141, 838 | "g": 141, 839 | "b": 141, 840 | "a": 255 841 | }, 842 | "_cascadeOpacityEnabled": true, 843 | "_parent": { 844 | "__id__": 19 845 | }, 846 | "_anchorPoint": { 847 | "__type__": "cc.Vec2", 848 | "x": 0, 849 | "y": 0.5 850 | }, 851 | "_contentSize": { 852 | "__type__": "cc.Size", 853 | "width": 20.76, 854 | "height": 60 855 | }, 856 | "_children": [], 857 | "_rotationX": 0, 858 | "_rotationY": 0, 859 | "_scaleX": 0.5, 860 | "_scaleY": 0.5, 861 | "_position": { 862 | "__type__": "cc.Vec2", 863 | "x": -10, 864 | "y": 0 865 | }, 866 | "_skewX": 0, 867 | "_skewY": 0, 868 | "_localZOrder": 0, 869 | "_globalZOrder": 0, 870 | "_tag": -1, 871 | "_opacityModifyRGB": false, 872 | "_reorderChildDirty": false, 873 | "_id": "002628q6SRB66Mc444risVk", 874 | "_active": true, 875 | "_components": [ 876 | { 877 | "__id__": 23 878 | } 879 | ], 880 | "_prefab": null 881 | }, 882 | { 883 | "__type__": "cc.Label", 884 | "_name": "", 885 | "_objFlags": 0, 886 | "node": { 887 | "__id__": 22 888 | }, 889 | "_enabled": true, 890 | "_useOriginalSize": false, 891 | "_fontSize": 60, 892 | "_lineHeight": 60, 893 | "_enableWrapText": true, 894 | "_isSystemFontUsed": false, 895 | "_N$string": "0", 896 | "_N$horizontalAlign": 0, 897 | "_N$verticalAlign": 1, 898 | "_N$overflow": 0, 899 | "_N$file": { 900 | "__uuid__": "a8241f55-5024-42aa-b287-89ede1a335a5" 901 | } 902 | }, 903 | { 904 | "__type__": "cc.Sprite", 905 | "_name": "", 906 | "_objFlags": 0, 907 | "node": { 908 | "__id__": 19 909 | }, 910 | "_enabled": true, 911 | "_spriteFrame": { 912 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 913 | }, 914 | "_type": 0, 915 | "_sizeMode": 0, 916 | "_fillType": 0, 917 | "_fillCenter": { 918 | "__type__": "cc.Vec2", 919 | "x": 0, 920 | "y": 0 921 | }, 922 | "_fillStart": 0, 923 | "_fillRange": 0, 924 | "_isTrimmedMode": true, 925 | "_srcBlendFactor": 770, 926 | "_dstBlendFactor": 771, 927 | "_atlas": null 928 | }, 929 | { 930 | "__type__": "cc.Widget", 931 | "_name": "", 932 | "_objFlags": 0, 933 | "node": { 934 | "__id__": 19 935 | }, 936 | "_enabled": true, 937 | "isAlignOnce": false, 938 | "_alignFlags": 33, 939 | "_left": 0, 940 | "_right": 0, 941 | "_top": 75, 942 | "_bottom": 0, 943 | "_isAbsLeft": true, 944 | "_isAbsRight": true, 945 | "_isAbsTop": true, 946 | "_isAbsBottom": true, 947 | "_originalWidth": 0, 948 | "_originalHeight": 0 949 | }, 950 | { 951 | "__type__": "cc.Canvas", 952 | "_name": "", 953 | "_objFlags": 1835008, 954 | "node": { 955 | "__id__": 2 956 | }, 957 | "_enabled": true, 958 | "_designResolution": { 959 | "__type__": "cc.Size", 960 | "width": 750, 961 | "height": 1200 962 | }, 963 | "_fitWidth": false, 964 | "_fitHeight": true 965 | }, 966 | { 967 | "__type__": "cf121EjTDVJ+LGGPwKeedtc", 968 | "_name": "", 969 | "_objFlags": 0, 970 | "node": { 971 | "__id__": 2 972 | }, 973 | "_enabled": true, 974 | "hexPrefab": { 975 | "__uuid__": "5c564553-c983-49ae-b6f2-b02c496bce12" 976 | }, 977 | "shapePrefab": { 978 | "__uuid__": "8ac41512-abc2-495f-911a-028fee558aaa" 979 | }, 980 | "shapeHolder1": { 981 | "__id__": 6 982 | }, 983 | "shapeHolder2": { 984 | "__id__": 8 985 | }, 986 | "shapeHolder3": { 987 | "__id__": 9 988 | }, 989 | "gameOver": { 990 | "__id__": 16 991 | }, 992 | "resultPrefab": { 993 | "__uuid__": "d87005de-2fd7-4a55-969e-66cc0a4a4114" 994 | }, 995 | "currentScore": { 996 | "__id__": 11 997 | }, 998 | "addScore": { 999 | "__id__": 14 1000 | }, 1001 | "order": { 1002 | "__id__": 28 1003 | }, 1004 | "prefabOrderItem": { 1005 | "__uuid__": "65dd89a3-447f-4d5d-9f04-8ba058aae301" 1006 | }, 1007 | "prefabPopout": { 1008 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1009 | }, 1010 | "holder": { 1011 | "__id__": 32 1012 | }, 1013 | "stepCount": { 1014 | "__id__": 23 1015 | } 1016 | }, 1017 | { 1018 | "__type__": "cc.Node", 1019 | "_name": "order", 1020 | "_objFlags": 0, 1021 | "_opacity": 255, 1022 | "_color": { 1023 | "__type__": "cc.Color", 1024 | "r": 255, 1025 | "g": 255, 1026 | "b": 255, 1027 | "a": 255 1028 | }, 1029 | "_cascadeOpacityEnabled": true, 1030 | "_parent": { 1031 | "__id__": 1 1032 | }, 1033 | "_anchorPoint": { 1034 | "__type__": "cc.Vec2", 1035 | "x": 0.5, 1036 | "y": 0.5 1037 | }, 1038 | "_contentSize": { 1039 | "__type__": "cc.Size", 1040 | "width": 200, 1041 | "height": 80 1042 | }, 1043 | "_children": [ 1044 | { 1045 | "__id__": 29 1046 | } 1047 | ], 1048 | "_rotationX": 0, 1049 | "_rotationY": 0, 1050 | "_scaleX": 1, 1051 | "_scaleY": 1, 1052 | "_position": { 1053 | "__type__": "cc.Vec2", 1054 | "x": 650, 1055 | "y": 1160 1056 | }, 1057 | "_skewX": 0, 1058 | "_skewY": 0, 1059 | "_localZOrder": 0, 1060 | "_globalZOrder": 0, 1061 | "_tag": -1, 1062 | "_opacityModifyRGB": false, 1063 | "_reorderChildDirty": false, 1064 | "_id": "3068f7qmxFJYJ1Ce+mAAQa1", 1065 | "_active": false, 1066 | "_components": [ 1067 | { 1068 | "__id__": 31 1069 | } 1070 | ], 1071 | "_prefab": null 1072 | }, 1073 | { 1074 | "__type__": "cc.Node", 1075 | "_name": "title", 1076 | "_objFlags": 0, 1077 | "_opacity": 255, 1078 | "_color": { 1079 | "__type__": "cc.Color", 1080 | "r": 141, 1081 | "g": 141, 1082 | "b": 141, 1083 | "a": 255 1084 | }, 1085 | "_cascadeOpacityEnabled": true, 1086 | "_parent": { 1087 | "__id__": 28 1088 | }, 1089 | "_anchorPoint": { 1090 | "__type__": "cc.Vec2", 1091 | "x": 0.5, 1092 | "y": 0.5 1093 | }, 1094 | "_contentSize": { 1095 | "__type__": "cc.Size", 1096 | "width": 120, 1097 | "height": 80 1098 | }, 1099 | "_children": [], 1100 | "_rotationX": 0, 1101 | "_rotationY": 0, 1102 | "_scaleX": 0.55, 1103 | "_scaleY": 0.5, 1104 | "_position": { 1105 | "__type__": "cc.Vec2", 1106 | "x": -59, 1107 | "y": 0 1108 | }, 1109 | "_skewX": 0, 1110 | "_skewY": 0, 1111 | "_localZOrder": 0, 1112 | "_globalZOrder": 0, 1113 | "_tag": -1, 1114 | "_opacityModifyRGB": false, 1115 | "_reorderChildDirty": false, 1116 | "_id": "68152xI70xIHYxq8H79BS1J", 1117 | "_active": true, 1118 | "_components": [ 1119 | { 1120 | "__id__": 30 1121 | } 1122 | ], 1123 | "_prefab": null 1124 | }, 1125 | { 1126 | "__type__": "cc.Label", 1127 | "_name": "", 1128 | "_objFlags": 0, 1129 | "node": { 1130 | "__id__": 29 1131 | }, 1132 | "_enabled": true, 1133 | "_useOriginalSize": false, 1134 | "_fontSize": 60, 1135 | "_lineHeight": 80, 1136 | "_enableWrapText": true, 1137 | "_isSystemFontUsed": true, 1138 | "_N$string": "记录", 1139 | "_N$horizontalAlign": 1, 1140 | "_N$verticalAlign": 1, 1141 | "_N$overflow": 0 1142 | }, 1143 | { 1144 | "__type__": "cc.Widget", 1145 | "_name": "", 1146 | "_objFlags": 0, 1147 | "node": { 1148 | "__id__": 28 1149 | }, 1150 | "_enabled": true, 1151 | "isAlignOnce": false, 1152 | "_alignFlags": 33, 1153 | "_left": 0, 1154 | "_right": 0, 1155 | "_top": 0, 1156 | "_bottom": 0, 1157 | "_isAbsLeft": true, 1158 | "_isAbsRight": true, 1159 | "_isAbsTop": true, 1160 | "_isAbsBottom": true, 1161 | "_originalWidth": 0, 1162 | "_originalHeight": 0 1163 | }, 1164 | { 1165 | "__type__": "cc.Node", 1166 | "_name": "popoutHolder", 1167 | "_objFlags": 0, 1168 | "_opacity": 255, 1169 | "_color": { 1170 | "__type__": "cc.Color", 1171 | "r": 255, 1172 | "g": 255, 1173 | "b": 255, 1174 | "a": 255 1175 | }, 1176 | "_cascadeOpacityEnabled": true, 1177 | "_parent": { 1178 | "__id__": 1 1179 | }, 1180 | "_anchorPoint": { 1181 | "__type__": "cc.Vec2", 1182 | "x": 0.5, 1183 | "y": 0.5 1184 | }, 1185 | "_contentSize": { 1186 | "__type__": "cc.Size", 1187 | "width": 0, 1188 | "height": 0 1189 | }, 1190 | "_children": [ 1191 | { 1192 | "__id__": 33 1193 | } 1194 | ], 1195 | "_rotationX": 0, 1196 | "_rotationY": 0, 1197 | "_scaleX": 1, 1198 | "_scaleY": 1, 1199 | "_position": { 1200 | "__type__": "cc.Vec2", 1201 | "x": 375, 1202 | "y": 600 1203 | }, 1204 | "_skewX": 0, 1205 | "_skewY": 0, 1206 | "_localZOrder": 0, 1207 | "_globalZOrder": 0, 1208 | "_tag": -1, 1209 | "_opacityModifyRGB": false, 1210 | "_reorderChildDirty": false, 1211 | "_id": "0383bvNnTJJT5VKoeJMEtEw", 1212 | "_active": true, 1213 | "_components": [ 1214 | { 1215 | "__id__": 63 1216 | } 1217 | ], 1218 | "_prefab": null 1219 | }, 1220 | { 1221 | "__type__": "cc.Node", 1222 | "_name": "popout", 1223 | "_objFlags": 0, 1224 | "_opacity": 255, 1225 | "_color": { 1226 | "__type__": "cc.Color", 1227 | "r": 255, 1228 | "g": 255, 1229 | "b": 255, 1230 | "a": 255 1231 | }, 1232 | "_cascadeOpacityEnabled": true, 1233 | "_parent": { 1234 | "__id__": 32 1235 | }, 1236 | "_anchorPoint": { 1237 | "__type__": "cc.Vec2", 1238 | "x": 0.5, 1239 | "y": 0.5 1240 | }, 1241 | "_contentSize": { 1242 | "__type__": "cc.Size", 1243 | "width": 0, 1244 | "height": 0 1245 | }, 1246 | "_children": [ 1247 | { 1248 | "__id__": 34 1249 | }, 1250 | { 1251 | "__id__": 37 1252 | } 1253 | ], 1254 | "_rotationX": 0, 1255 | "_rotationY": 0, 1256 | "_scaleX": 1, 1257 | "_scaleY": 1, 1258 | "_position": { 1259 | "__type__": "cc.Vec2", 1260 | "x": 0, 1261 | "y": 0 1262 | }, 1263 | "_skewX": 0, 1264 | "_skewY": 0, 1265 | "_localZOrder": 0, 1266 | "_globalZOrder": 0, 1267 | "_tag": -1, 1268 | "_opacityModifyRGB": false, 1269 | "_reorderChildDirty": false, 1270 | "_id": "e045djXScZMHqXe/nU8KQii", 1271 | "_active": false, 1272 | "_components": [ 1273 | { 1274 | "__id__": 60 1275 | }, 1276 | { 1277 | "__id__": 61 1278 | } 1279 | ], 1280 | "_prefab": { 1281 | "__id__": 62 1282 | } 1283 | }, 1284 | { 1285 | "__type__": "cc.Node", 1286 | "_name": "mask", 1287 | "_objFlags": 0, 1288 | "_opacity": 50, 1289 | "_color": { 1290 | "__type__": "cc.Color", 1291 | "r": 255, 1292 | "g": 255, 1293 | "b": 255, 1294 | "a": 255 1295 | }, 1296 | "_cascadeOpacityEnabled": true, 1297 | "_parent": { 1298 | "__id__": 33 1299 | }, 1300 | "_anchorPoint": { 1301 | "__type__": "cc.Vec2", 1302 | "x": 0.5, 1303 | "y": 0.5 1304 | }, 1305 | "_contentSize": { 1306 | "__type__": "cc.Size", 1307 | "width": 1000, 1308 | "height": 1500 1309 | }, 1310 | "_children": [], 1311 | "_rotationX": 0, 1312 | "_rotationY": 0, 1313 | "_scaleX": 1, 1314 | "_scaleY": 1, 1315 | "_position": { 1316 | "__type__": "cc.Vec2", 1317 | "x": 0, 1318 | "y": 0 1319 | }, 1320 | "_skewX": 0, 1321 | "_skewY": 0, 1322 | "_localZOrder": 0, 1323 | "_globalZOrder": 0, 1324 | "_tag": -1, 1325 | "_opacityModifyRGB": false, 1326 | "_reorderChildDirty": false, 1327 | "_id": "63b9fylt5pKfIkyWePOBTsE", 1328 | "_active": true, 1329 | "_components": [ 1330 | { 1331 | "__id__": 35 1332 | } 1333 | ], 1334 | "_prefab": { 1335 | "__id__": 36 1336 | } 1337 | }, 1338 | { 1339 | "__type__": "cc.Sprite", 1340 | "_name": "", 1341 | "_objFlags": 0, 1342 | "node": { 1343 | "__id__": 34 1344 | }, 1345 | "_enabled": true, 1346 | "_spriteFrame": { 1347 | "__uuid__": "6343c288-1aa0-40bd-9612-cb5bcb9be8da" 1348 | }, 1349 | "_type": 0, 1350 | "_sizeMode": 0, 1351 | "_fillType": 0, 1352 | "_fillCenter": { 1353 | "__type__": "cc.Vec2", 1354 | "x": 0, 1355 | "y": 0 1356 | }, 1357 | "_fillStart": 0, 1358 | "_fillRange": 0, 1359 | "_isTrimmedMode": true, 1360 | "_srcBlendFactor": 770, 1361 | "_dstBlendFactor": 771, 1362 | "_atlas": null 1363 | }, 1364 | { 1365 | "__type__": "cc.PrefabInfo", 1366 | "root": { 1367 | "__id__": 33 1368 | }, 1369 | "asset": { 1370 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1371 | }, 1372 | "fileId": "63b9fylt5pKfIkyWePOBTsE" 1373 | }, 1374 | { 1375 | "__type__": "cc.Node", 1376 | "_name": "board", 1377 | "_objFlags": 0, 1378 | "_opacity": 255, 1379 | "_color": { 1380 | "__type__": "cc.Color", 1381 | "r": 255, 1382 | "g": 255, 1383 | "b": 255, 1384 | "a": 255 1385 | }, 1386 | "_cascadeOpacityEnabled": true, 1387 | "_parent": { 1388 | "__id__": 33 1389 | }, 1390 | "_anchorPoint": { 1391 | "__type__": "cc.Vec2", 1392 | "x": 0.5, 1393 | "y": 0.5 1394 | }, 1395 | "_contentSize": { 1396 | "__type__": "cc.Size", 1397 | "width": 540, 1398 | "height": 840 1399 | }, 1400 | "_children": [ 1401 | { 1402 | "__id__": 38 1403 | }, 1404 | { 1405 | "__id__": 44 1406 | }, 1407 | { 1408 | "__id__": 50 1409 | }, 1410 | { 1411 | "__id__": 54 1412 | } 1413 | ], 1414 | "_rotationX": 0, 1415 | "_rotationY": 0, 1416 | "_scaleX": 1, 1417 | "_scaleY": 1, 1418 | "_position": { 1419 | "__type__": "cc.Vec2", 1420 | "x": 0, 1421 | "y": 0 1422 | }, 1423 | "_skewX": 0, 1424 | "_skewY": 0, 1425 | "_localZOrder": 0, 1426 | "_globalZOrder": 0, 1427 | "_tag": -1, 1428 | "_opacityModifyRGB": false, 1429 | "_reorderChildDirty": false, 1430 | "_id": "c152d1jJhxMLa7a3ps3ZzUk", 1431 | "_active": true, 1432 | "_components": [ 1433 | { 1434 | "__id__": 58 1435 | } 1436 | ], 1437 | "_prefab": { 1438 | "__id__": 59 1439 | } 1440 | }, 1441 | { 1442 | "__type__": "cc.Node", 1443 | "_name": "tabLeft", 1444 | "_objFlags": 0, 1445 | "_opacity": 255, 1446 | "_color": { 1447 | "__type__": "cc.Color", 1448 | "r": 255, 1449 | "g": 255, 1450 | "b": 255, 1451 | "a": 255 1452 | }, 1453 | "_cascadeOpacityEnabled": true, 1454 | "_parent": { 1455 | "__id__": 37 1456 | }, 1457 | "_anchorPoint": { 1458 | "__type__": "cc.Vec2", 1459 | "x": 0.5, 1460 | "y": 0.5 1461 | }, 1462 | "_contentSize": { 1463 | "__type__": "cc.Size", 1464 | "width": 270, 1465 | "height": 70 1466 | }, 1467 | "_children": [ 1468 | { 1469 | "__id__": 39 1470 | } 1471 | ], 1472 | "_rotationX": 0, 1473 | "_rotationY": 0, 1474 | "_scaleX": 1, 1475 | "_scaleY": 1, 1476 | "_position": { 1477 | "__type__": "cc.Vec2", 1478 | "x": -134.8, 1479 | "y": 377 1480 | }, 1481 | "_skewX": 0, 1482 | "_skewY": 0, 1483 | "_localZOrder": 0, 1484 | "_globalZOrder": 0, 1485 | "_tag": -1, 1486 | "_opacityModifyRGB": false, 1487 | "_reorderChildDirty": false, 1488 | "_id": "661c9eE/rxMsaEOwGawhBzr", 1489 | "_active": true, 1490 | "_components": [ 1491 | { 1492 | "__id__": 42 1493 | } 1494 | ], 1495 | "_prefab": { 1496 | "__id__": 43 1497 | } 1498 | }, 1499 | { 1500 | "__type__": "cc.Node", 1501 | "_name": "title", 1502 | "_objFlags": 0, 1503 | "_opacity": 255, 1504 | "_color": { 1505 | "__type__": "cc.Color", 1506 | "r": 60, 1507 | "g": 60, 1508 | "b": 60, 1509 | "a": 255 1510 | }, 1511 | "_cascadeOpacityEnabled": true, 1512 | "_parent": { 1513 | "__id__": 38 1514 | }, 1515 | "_anchorPoint": { 1516 | "__type__": "cc.Vec2", 1517 | "x": 0.5, 1518 | "y": 0.5 1519 | }, 1520 | "_contentSize": { 1521 | "__type__": "cc.Size", 1522 | "width": 130, 1523 | "height": 26 1524 | }, 1525 | "_children": [], 1526 | "_rotationX": 0, 1527 | "_rotationY": 0, 1528 | "_scaleX": 1, 1529 | "_scaleY": 1, 1530 | "_position": { 1531 | "__type__": "cc.Vec2", 1532 | "x": 0, 1533 | "y": 0 1534 | }, 1535 | "_skewX": 0, 1536 | "_skewY": 0, 1537 | "_localZOrder": 0, 1538 | "_globalZOrder": 0, 1539 | "_tag": -1, 1540 | "_opacityModifyRGB": false, 1541 | "_reorderChildDirty": false, 1542 | "_id": "9bb63zu3XJCl7fKKsSjL42V", 1543 | "_active": true, 1544 | "_components": [ 1545 | { 1546 | "__id__": 40 1547 | } 1548 | ], 1549 | "_prefab": { 1550 | "__id__": 41 1551 | } 1552 | }, 1553 | { 1554 | "__type__": "cc.Label", 1555 | "_name": "", 1556 | "_objFlags": 0, 1557 | "node": { 1558 | "__id__": 39 1559 | }, 1560 | "_enabled": true, 1561 | "_useOriginalSize": false, 1562 | "_fontSize": 26, 1563 | "_lineHeight": 26, 1564 | "_enableWrapText": true, 1565 | "_isSystemFontUsed": true, 1566 | "_N$string": "每周排行榜", 1567 | "_N$horizontalAlign": 1, 1568 | "_N$verticalAlign": 1, 1569 | "_N$overflow": 0 1570 | }, 1571 | { 1572 | "__type__": "cc.PrefabInfo", 1573 | "root": { 1574 | "__id__": 33 1575 | }, 1576 | "asset": { 1577 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1578 | }, 1579 | "fileId": "9bb63zu3XJCl7fKKsSjL42V" 1580 | }, 1581 | { 1582 | "__type__": "cc.Sprite", 1583 | "_name": "", 1584 | "_objFlags": 0, 1585 | "node": { 1586 | "__id__": 38 1587 | }, 1588 | "_enabled": true, 1589 | "_spriteFrame": { 1590 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 1591 | }, 1592 | "_type": 0, 1593 | "_sizeMode": 0, 1594 | "_fillType": 0, 1595 | "_fillCenter": { 1596 | "__type__": "cc.Vec2", 1597 | "x": 0, 1598 | "y": 0 1599 | }, 1600 | "_fillStart": 0, 1601 | "_fillRange": 0, 1602 | "_isTrimmedMode": true, 1603 | "_srcBlendFactor": 770, 1604 | "_dstBlendFactor": 771, 1605 | "_atlas": null 1606 | }, 1607 | { 1608 | "__type__": "cc.PrefabInfo", 1609 | "root": { 1610 | "__id__": 33 1611 | }, 1612 | "asset": { 1613 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1614 | }, 1615 | "fileId": "661c9eE/rxMsaEOwGawhBzr" 1616 | }, 1617 | { 1618 | "__type__": "cc.Node", 1619 | "_name": "tabRight", 1620 | "_objFlags": 0, 1621 | "_opacity": 255, 1622 | "_color": { 1623 | "__type__": "cc.Color", 1624 | "r": 255, 1625 | "g": 255, 1626 | "b": 255, 1627 | "a": 255 1628 | }, 1629 | "_cascadeOpacityEnabled": true, 1630 | "_parent": { 1631 | "__id__": 37 1632 | }, 1633 | "_anchorPoint": { 1634 | "__type__": "cc.Vec2", 1635 | "x": 0.5, 1636 | "y": 0.5 1637 | }, 1638 | "_contentSize": { 1639 | "__type__": "cc.Size", 1640 | "width": 270, 1641 | "height": 70 1642 | }, 1643 | "_children": [ 1644 | { 1645 | "__id__": 45 1646 | } 1647 | ], 1648 | "_rotationX": 0, 1649 | "_rotationY": 0, 1650 | "_scaleX": 1, 1651 | "_scaleY": 1, 1652 | "_position": { 1653 | "__type__": "cc.Vec2", 1654 | "x": 134.8, 1655 | "y": 377.1 1656 | }, 1657 | "_skewX": 0, 1658 | "_skewY": 0, 1659 | "_localZOrder": 0, 1660 | "_globalZOrder": 0, 1661 | "_tag": -1, 1662 | "_opacityModifyRGB": false, 1663 | "_reorderChildDirty": false, 1664 | "_id": "c13fbNrOVNKWp+zLkeeYdat", 1665 | "_active": true, 1666 | "_components": [ 1667 | { 1668 | "__id__": 48 1669 | } 1670 | ], 1671 | "_prefab": { 1672 | "__id__": 49 1673 | } 1674 | }, 1675 | { 1676 | "__type__": "cc.Node", 1677 | "_name": "title", 1678 | "_objFlags": 0, 1679 | "_opacity": 255, 1680 | "_color": { 1681 | "__type__": "cc.Color", 1682 | "r": 153, 1683 | "g": 153, 1684 | "b": 153, 1685 | "a": 255 1686 | }, 1687 | "_cascadeOpacityEnabled": true, 1688 | "_parent": { 1689 | "__id__": 44 1690 | }, 1691 | "_anchorPoint": { 1692 | "__type__": "cc.Vec2", 1693 | "x": 0.5, 1694 | "y": 0.5 1695 | }, 1696 | "_contentSize": { 1697 | "__type__": "cc.Size", 1698 | "width": 130, 1699 | "height": 26 1700 | }, 1701 | "_children": [], 1702 | "_rotationX": 0, 1703 | "_rotationY": 0, 1704 | "_scaleX": 1, 1705 | "_scaleY": 1, 1706 | "_position": { 1707 | "__type__": "cc.Vec2", 1708 | "x": 0, 1709 | "y": 0 1710 | }, 1711 | "_skewX": 0, 1712 | "_skewY": 0, 1713 | "_localZOrder": 0, 1714 | "_globalZOrder": 0, 1715 | "_tag": -1, 1716 | "_opacityModifyRGB": false, 1717 | "_reorderChildDirty": false, 1718 | "_id": "92910j7R1hHI5eD9SXq5VJB", 1719 | "_active": true, 1720 | "_components": [ 1721 | { 1722 | "__id__": 46 1723 | } 1724 | ], 1725 | "_prefab": { 1726 | "__id__": 47 1727 | } 1728 | }, 1729 | { 1730 | "__type__": "cc.Label", 1731 | "_name": "", 1732 | "_objFlags": 0, 1733 | "node": { 1734 | "__id__": 45 1735 | }, 1736 | "_enabled": true, 1737 | "_useOriginalSize": false, 1738 | "_fontSize": 26, 1739 | "_lineHeight": 26, 1740 | "_enableWrapText": true, 1741 | "_isSystemFontUsed": true, 1742 | "_N$string": "好友排行榜", 1743 | "_N$horizontalAlign": 1, 1744 | "_N$verticalAlign": 1, 1745 | "_N$overflow": 0 1746 | }, 1747 | { 1748 | "__type__": "cc.PrefabInfo", 1749 | "root": { 1750 | "__id__": 33 1751 | }, 1752 | "asset": { 1753 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1754 | }, 1755 | "fileId": "92910j7R1hHI5eD9SXq5VJB" 1756 | }, 1757 | { 1758 | "__type__": "cc.Sprite", 1759 | "_name": "", 1760 | "_objFlags": 0, 1761 | "node": { 1762 | "__id__": 44 1763 | }, 1764 | "_enabled": true, 1765 | "_spriteFrame": { 1766 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 1767 | }, 1768 | "_type": 0, 1769 | "_sizeMode": 0, 1770 | "_fillType": 0, 1771 | "_fillCenter": { 1772 | "__type__": "cc.Vec2", 1773 | "x": 0, 1774 | "y": 0 1775 | }, 1776 | "_fillStart": 0, 1777 | "_fillRange": 0, 1778 | "_isTrimmedMode": true, 1779 | "_srcBlendFactor": 770, 1780 | "_dstBlendFactor": 771, 1781 | "_atlas": null 1782 | }, 1783 | { 1784 | "__type__": "cc.PrefabInfo", 1785 | "root": { 1786 | "__id__": 33 1787 | }, 1788 | "asset": { 1789 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1790 | }, 1791 | "fileId": "c13fbNrOVNKWp+zLkeeYdat" 1792 | }, 1793 | { 1794 | "__type__": "cc.Node", 1795 | "_name": "layout", 1796 | "_objFlags": 0, 1797 | "_opacity": 255, 1798 | "_color": { 1799 | "__type__": "cc.Color", 1800 | "r": 255, 1801 | "g": 255, 1802 | "b": 255, 1803 | "a": 255 1804 | }, 1805 | "_cascadeOpacityEnabled": true, 1806 | "_parent": { 1807 | "__id__": 37 1808 | }, 1809 | "_anchorPoint": { 1810 | "__type__": "cc.Vec2", 1811 | "x": 0.5, 1812 | "y": 1 1813 | }, 1814 | "_contentSize": { 1815 | "__type__": "cc.Size", 1816 | "width": 540, 1817 | "height": 750 1818 | }, 1819 | "_children": [], 1820 | "_rotationX": 0, 1821 | "_rotationY": 0, 1822 | "_scaleX": 1, 1823 | "_scaleY": 1, 1824 | "_position": { 1825 | "__type__": "cc.Vec2", 1826 | "x": 0, 1827 | "y": 340 1828 | }, 1829 | "_skewX": 0, 1830 | "_skewY": 0, 1831 | "_localZOrder": 0, 1832 | "_globalZOrder": 0, 1833 | "_tag": -1, 1834 | "_opacityModifyRGB": false, 1835 | "_reorderChildDirty": false, 1836 | "_id": "02172LTJuREuYJQCPMvnYlV", 1837 | "_active": true, 1838 | "_components": [ 1839 | { 1840 | "__id__": 51 1841 | }, 1842 | { 1843 | "__id__": 52 1844 | } 1845 | ], 1846 | "_prefab": { 1847 | "__id__": 53 1848 | } 1849 | }, 1850 | { 1851 | "__type__": "cc.Sprite", 1852 | "_name": "", 1853 | "_objFlags": 0, 1854 | "node": { 1855 | "__id__": 50 1856 | }, 1857 | "_enabled": true, 1858 | "_spriteFrame": null, 1859 | "_type": 1, 1860 | "_sizeMode": 0, 1861 | "_fillType": 0, 1862 | "_fillCenter": { 1863 | "__type__": "cc.Vec2", 1864 | "x": 0, 1865 | "y": 0 1866 | }, 1867 | "_fillStart": 0, 1868 | "_fillRange": 0, 1869 | "_isTrimmedMode": true, 1870 | "_srcBlendFactor": 770, 1871 | "_dstBlendFactor": 771, 1872 | "_atlas": null 1873 | }, 1874 | { 1875 | "__type__": "cc.Layout", 1876 | "_name": "", 1877 | "_objFlags": 0, 1878 | "node": { 1879 | "__id__": 50 1880 | }, 1881 | "_enabled": true, 1882 | "_layoutSize": { 1883 | "__type__": "cc.Size", 1884 | "width": 540, 1885 | "height": 750 1886 | }, 1887 | "_resize": 0, 1888 | "_N$layoutType": 2, 1889 | "_N$cellSize": { 1890 | "__type__": "cc.Size", 1891 | "width": 40, 1892 | "height": 40 1893 | }, 1894 | "_N$startAxis": 0, 1895 | "_N$padding": 1, 1896 | "_N$spacingX": 0, 1897 | "_N$spacingY": 2, 1898 | "_N$verticalDirection": 1, 1899 | "_N$horizontalDirection": 0 1900 | }, 1901 | { 1902 | "__type__": "cc.PrefabInfo", 1903 | "root": { 1904 | "__id__": 33 1905 | }, 1906 | "asset": { 1907 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 1908 | }, 1909 | "fileId": "02172LTJuREuYJQCPMvnYlV" 1910 | }, 1911 | { 1912 | "__type__": "cc.Node", 1913 | "_name": "fLayout", 1914 | "_objFlags": 0, 1915 | "_opacity": 255, 1916 | "_color": { 1917 | "__type__": "cc.Color", 1918 | "r": 255, 1919 | "g": 255, 1920 | "b": 255, 1921 | "a": 255 1922 | }, 1923 | "_cascadeOpacityEnabled": true, 1924 | "_parent": { 1925 | "__id__": 37 1926 | }, 1927 | "_anchorPoint": { 1928 | "__type__": "cc.Vec2", 1929 | "x": 0.5, 1930 | "y": 1 1931 | }, 1932 | "_contentSize": { 1933 | "__type__": "cc.Size", 1934 | "width": 540, 1935 | "height": 750 1936 | }, 1937 | "_children": [], 1938 | "_rotationX": 0, 1939 | "_rotationY": 0, 1940 | "_scaleX": 1, 1941 | "_scaleY": 1, 1942 | "_position": { 1943 | "__type__": "cc.Vec2", 1944 | "x": 0, 1945 | "y": 340 1946 | }, 1947 | "_skewX": 0, 1948 | "_skewY": 0, 1949 | "_localZOrder": 0, 1950 | "_globalZOrder": 0, 1951 | "_tag": -1, 1952 | "_opacityModifyRGB": false, 1953 | "_reorderChildDirty": false, 1954 | "_id": "f2fdftcLLFK9rJUtqx3vtVh", 1955 | "_active": false, 1956 | "_components": [ 1957 | { 1958 | "__id__": 55 1959 | }, 1960 | { 1961 | "__id__": 56 1962 | } 1963 | ], 1964 | "_prefab": { 1965 | "__id__": 57 1966 | } 1967 | }, 1968 | { 1969 | "__type__": "cc.Sprite", 1970 | "_name": "", 1971 | "_objFlags": 0, 1972 | "node": { 1973 | "__id__": 54 1974 | }, 1975 | "_enabled": true, 1976 | "_spriteFrame": null, 1977 | "_type": 1, 1978 | "_sizeMode": 0, 1979 | "_fillType": 0, 1980 | "_fillCenter": { 1981 | "__type__": "cc.Vec2", 1982 | "x": 0, 1983 | "y": 0 1984 | }, 1985 | "_fillStart": 0, 1986 | "_fillRange": 0, 1987 | "_isTrimmedMode": true, 1988 | "_srcBlendFactor": 770, 1989 | "_dstBlendFactor": 771, 1990 | "_atlas": null 1991 | }, 1992 | { 1993 | "__type__": "cc.Layout", 1994 | "_name": "", 1995 | "_objFlags": 0, 1996 | "node": { 1997 | "__id__": 54 1998 | }, 1999 | "_enabled": true, 2000 | "_layoutSize": { 2001 | "__type__": "cc.Size", 2002 | "width": 540, 2003 | "height": 750 2004 | }, 2005 | "_resize": 0, 2006 | "_N$layoutType": 2, 2007 | "_N$cellSize": { 2008 | "__type__": "cc.Size", 2009 | "width": 40, 2010 | "height": 40 2011 | }, 2012 | "_N$startAxis": 0, 2013 | "_N$padding": 1, 2014 | "_N$spacingX": 0, 2015 | "_N$spacingY": 2, 2016 | "_N$verticalDirection": 1, 2017 | "_N$horizontalDirection": 0 2018 | }, 2019 | { 2020 | "__type__": "cc.PrefabInfo", 2021 | "root": { 2022 | "__id__": 33 2023 | }, 2024 | "asset": { 2025 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 2026 | }, 2027 | "fileId": "f2fdftcLLFK9rJUtqx3vtVh" 2028 | }, 2029 | { 2030 | "__type__": "cc.Sprite", 2031 | "_name": "", 2032 | "_objFlags": 0, 2033 | "node": { 2034 | "__id__": 37 2035 | }, 2036 | "_enabled": true, 2037 | "_spriteFrame": { 2038 | "__uuid__": "857dc860-0cb2-4c0d-8b82-5d68d5ae0f96" 2039 | }, 2040 | "_type": 0, 2041 | "_sizeMode": 0, 2042 | "_fillType": 0, 2043 | "_fillCenter": { 2044 | "__type__": "cc.Vec2", 2045 | "x": 0, 2046 | "y": 0 2047 | }, 2048 | "_fillStart": 0, 2049 | "_fillRange": 0, 2050 | "_isTrimmedMode": true, 2051 | "_srcBlendFactor": 770, 2052 | "_dstBlendFactor": 771, 2053 | "_atlas": null 2054 | }, 2055 | { 2056 | "__type__": "cc.PrefabInfo", 2057 | "root": { 2058 | "__id__": 33 2059 | }, 2060 | "asset": { 2061 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 2062 | }, 2063 | "fileId": "c152d1jJhxMLa7a3ps3ZzUk" 2064 | }, 2065 | { 2066 | "__type__": "bc16aa7dUdL4KDBWPxNNMyQ", 2067 | "_name": "", 2068 | "_objFlags": 0, 2069 | "node": { 2070 | "__id__": 33 2071 | }, 2072 | "_enabled": true, 2073 | "prefabItem": { 2074 | "__uuid__": "4fa9305d-6ca8-44ba-900e-a70e9a9cb6a0" 2075 | }, 2076 | "layout": { 2077 | "__id__": 50 2078 | }, 2079 | "mask": { 2080 | "__id__": 34 2081 | }, 2082 | "board": { 2083 | "__id__": 37 2084 | }, 2085 | "duration": 0.3, 2086 | "fLayout": { 2087 | "__id__": 54 2088 | }, 2089 | "tabLeft": { 2090 | "__id__": 38 2091 | }, 2092 | "tabRight": { 2093 | "__id__": 44 2094 | } 2095 | }, 2096 | { 2097 | "__type__": "cc.Widget", 2098 | "_name": "", 2099 | "_objFlags": 0, 2100 | "node": { 2101 | "__id__": 33 2102 | }, 2103 | "_enabled": true, 2104 | "isAlignOnce": false, 2105 | "_alignFlags": 18, 2106 | "_left": 0, 2107 | "_right": 0, 2108 | "_top": 0, 2109 | "_bottom": 0, 2110 | "_isAbsLeft": true, 2111 | "_isAbsRight": true, 2112 | "_isAbsTop": true, 2113 | "_isAbsBottom": true, 2114 | "_originalWidth": 0, 2115 | "_originalHeight": 0 2116 | }, 2117 | { 2118 | "__type__": "cc.PrefabInfo", 2119 | "root": { 2120 | "__id__": 33 2121 | }, 2122 | "asset": { 2123 | "__uuid__": "9cc3224c-c1e3-455b-b9e9-9917496b81a4" 2124 | }, 2125 | "fileId": "e045djXScZMHqXe/nU8KQii" 2126 | }, 2127 | { 2128 | "__type__": "cc.Widget", 2129 | "_name": "", 2130 | "_objFlags": 0, 2131 | "node": { 2132 | "__id__": 32 2133 | }, 2134 | "_enabled": true, 2135 | "isAlignOnce": false, 2136 | "_alignFlags": 18, 2137 | "_left": 0, 2138 | "_right": 0, 2139 | "_top": 0, 2140 | "_bottom": 0, 2141 | "_isAbsLeft": true, 2142 | "_isAbsRight": true, 2143 | "_isAbsTop": true, 2144 | "_isAbsBottom": true, 2145 | "_originalWidth": 0, 2146 | "_originalHeight": 0 2147 | } 2148 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/Scene/Hexagon.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Script/CountUp.js: -------------------------------------------------------------------------------- 1 | (function(root, factory) { 2 | 3 | if (typeof define === 'function' && define.amd) { 4 | define(factory); 5 | } else if (typeof exports === 'object') { 6 | module.exports = factory(require, exports, module); 7 | } else { 8 | root.CountUp = factory(); 9 | } 10 | 11 | 12 | }(this, function(require, exports, module) { 13 | 14 | /* 15 | 16 | countUp.js 17 | by @inorganik 18 | 19 | */ 20 | 21 | // target = id of html element or var of previously selected html element where counting occurs 22 | // startVal = the value you want to begin at 23 | // endVal = the value you want to arrive at 24 | // decimals = number of decimal places, default 0 25 | // duration = duration of animation in seconds, default 2 26 | // options = optional object of options (see below) 27 | 28 | var CountUp = function(target, startVal, endVal, decimals, duration, options) { 29 | 30 | // make sure requestAnimationFrame and cancelAnimationFrame are defined 31 | // polyfill for browsers without native support 32 | // by Opera engineer Erik Möller 33 | var lastTime = 0; 34 | var vendors = ['webkit', 'moz', 'ms', 'o']; 35 | for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 36 | window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; 37 | window.cancelAnimationFrame = 38 | window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']; 39 | } 40 | if (!window.requestAnimationFrame) { 41 | window.requestAnimationFrame = function(callback, element) { 42 | var currTime = new Date().getTime(); 43 | var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 44 | var id = window.setTimeout(function() { 45 | callback(currTime + timeToCall); 46 | }, 47 | timeToCall); 48 | lastTime = currTime + timeToCall; 49 | return id; 50 | }; 51 | } 52 | if (!window.cancelAnimationFrame) { 53 | window.cancelAnimationFrame = function(id) { 54 | clearTimeout(id); 55 | }; 56 | } 57 | 58 | var self = this; 59 | 60 | // default options 61 | self.options = { 62 | useEasing: true, // toggle easing 63 | useGrouping: true, // 1,000,000 vs 1000000 64 | separator: ',', // character to use as a separator 65 | decimal: '.', // character to use as a decimal 66 | easingFn: null, // optional custom easing closure function, default is Robert Penner's easeOutExpo 67 | formattingFn: null // optional custom formatting function, default is self.formatNumber below 68 | }; 69 | // extend default options with passed options object 70 | for (var key in options) { 71 | if (options.hasOwnProperty(key)) { 72 | self.options[key] = options[key]; 73 | } 74 | } 75 | if (self.options.separator === '') { 76 | self.options.useGrouping = false; 77 | } 78 | if (!self.options.prefix) self.options.prefix = ''; 79 | if (!self.options.suffix) self.options.suffix = ''; 80 | 81 | //self.d = (typeof target === 'string') ? document.getElementById(target) : target; 82 | self.d = target;//this is a canvas object; 83 | self.startVal = Number(startVal); 84 | self.endVal = Number(endVal); 85 | self.countDown = (self.startVal > self.endVal); 86 | self.frameVal = self.startVal; 87 | self.decimals = Math.max(0, decimals || 0); 88 | self.dec = Math.pow(10, self.decimals); 89 | self.duration = Number(duration) * 1000 || 2000; 90 | 91 | self.formatNumber = function(nStr) { 92 | nStr = nStr.toFixed(self.decimals); 93 | nStr += ''; 94 | var x, x1, x2, rgx; 95 | x = nStr.split('.'); 96 | x1 = x[0]; 97 | x2 = x.length > 1 ? self.options.decimal + x[1] : ''; 98 | rgx = /(\d+)(\d{3})/; 99 | if (self.options.useGrouping) { 100 | while (rgx.test(x1)) { 101 | x1 = x1.replace(rgx, '$1' + self.options.separator + '$2'); 102 | } 103 | } 104 | return self.options.prefix + x1 + x2 + self.options.suffix; 105 | }; 106 | // Robert Penner's easeOutExpo 107 | self.easeOutExpo = function(t, b, c, d) { 108 | return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b; 109 | }; 110 | 111 | self.easingFn = self.options.easingFn ? self.options.easingFn : self.easeOutExpo; 112 | self.formattingFn = self.options.formattingFn ? self.options.formattingFn : self.formatNumber; 113 | 114 | self.version = function() { 115 | return '1.7.1'; 116 | }; 117 | 118 | // Print value to target 119 | self.printValue = function(value) { 120 | var result = self.formattingFn(value); 121 | self.d.string = value 122 | // if (self.d.tagName === 'INPUT') { 123 | // this.d.value = result; 124 | // } else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') { 125 | // this.d.textContent = result; 126 | // } else { 127 | // this.d.innerHTML = result; 128 | // } 129 | }; 130 | 131 | self.count = function(timestamp) { 132 | 133 | if (!self.startTime) { 134 | self.startTime = timestamp; 135 | } 136 | 137 | self.timestamp = timestamp; 138 | var progress = timestamp - self.startTime; 139 | self.remaining = self.duration - progress; 140 | 141 | // to ease or not to ease 142 | if (self.options.useEasing) { 143 | if (self.countDown) { 144 | self.frameVal = self.startVal - self.easingFn(progress, 0, self.startVal - self.endVal, self.duration); 145 | } else { 146 | self.frameVal = self.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration); 147 | } 148 | } else { 149 | if (self.countDown) { 150 | self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration)); 151 | } else { 152 | self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration); 153 | } 154 | } 155 | 156 | // don't go past endVal since progress can exceed duration in the last frame 157 | if (self.countDown) { 158 | self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal; 159 | } else { 160 | self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal; 161 | } 162 | 163 | // decimal 164 | self.frameVal = Math.round(self.frameVal * self.dec) / self.dec; 165 | 166 | // format and print value 167 | self.printValue(self.frameVal); 168 | 169 | // whether to continue 170 | if (progress < self.duration) { 171 | self.rAF = requestAnimationFrame(self.count); 172 | } else { 173 | if (self.callback) { 174 | self.callback(); 175 | } 176 | } 177 | }; 178 | // start your animation 179 | self.start = function(callback) { 180 | self.callback = callback; 181 | self.rAF = requestAnimationFrame(self.count); 182 | return false; 183 | }; 184 | // toggles pause/resume animation 185 | self.pauseResume = function() { 186 | if (!self.paused) { 187 | self.paused = true; 188 | cancelAnimationFrame(self.rAF); 189 | } else { 190 | self.paused = false; 191 | delete self.startTime; 192 | self.duration = self.remaining; 193 | self.startVal = self.frameVal; 194 | requestAnimationFrame(self.count); 195 | } 196 | }; 197 | // reset to startVal so animation can be run again 198 | self.reset = function() { 199 | self.paused = false; 200 | delete self.startTime; 201 | self.startVal = startVal; 202 | cancelAnimationFrame(self.rAF); 203 | self.printValue(self.startVal); 204 | }; 205 | // pass a new endVal and start animation 206 | self.update = function(newEndVal) { 207 | cancelAnimationFrame(self.rAF); 208 | self.paused = false; 209 | delete self.startTime; 210 | self.startVal = self.frameVal; 211 | self.endVal = Number(newEndVal); 212 | self.countDown = (self.startVal > self.endVal); 213 | self.rAF = requestAnimationFrame(self.count); 214 | }; 215 | 216 | // format startVal on initialization 217 | self.printValue(self.startVal); 218 | }; 219 | 220 | return CountUp; 221 | 222 | })); 223 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/Game.js: -------------------------------------------------------------------------------- 1 | var CountUp = require('./CountUp'); 2 | var Store = require('./db'); 3 | var Global = require('./Global'), 4 | g_hexagon = Global.g_hexagon, 5 | g_config = Global.g_config, 6 | g_tools = Global.g_tools, 7 | g_line = Global.g_line; 8 | 9 | var gameName = 'hexagon'; 10 | 11 | if (typeof Object.assign != 'function') { 12 | Object.assign = function(target) { 13 | 'use strict'; 14 | if (target == null) { 15 | throw new TypeError('Cannot convert undefined or null to object'); 16 | } 17 | target = Object(target); 18 | for (var index = 1; index < arguments.length; index++) { 19 | var source = arguments[index]; 20 | if (source != null) { 21 | for (var key in source) { 22 | if (Object.prototype.hasOwnProperty.call(source, key)) { 23 | target[key] = source[key]; 24 | } 25 | } 26 | } 27 | } 28 | return target; 29 | }; 30 | } 31 | 32 | cc.Class({ 33 | extends: cc.Component, 34 | properties: { 35 | hexPrefab : cc.Prefab, 36 | shapePrefab : cc.Prefab, 37 | shapeHolder1 : cc.Node, 38 | shapeHolder2 : cc.Node, 39 | shapeHolder3 : cc.Node, 40 | gameOver : cc.Node, 41 | resultPrefab : cc.Prefab, 42 | currentScore : cc.Label, 43 | addScore : cc.Label, 44 | //add rank 45 | order : cc.Node, 46 | prefabOrderItem : cc.Prefab, 47 | prefabPopout : cc.Prefab, 48 | holder : cc.Node, 49 | stepCount : cc.Label, 50 | }, 51 | 52 | // use this for initialization 53 | onLoad: function() { 54 | this.initCurrentScore(); 55 | this.initGameOverPopout(); 56 | this.initPlayBoard(); 57 | this.initAllHolder(); 58 | this.initAllHolderTouches(); 59 | this.initRank(); 60 | }, 61 | createSecretToken:function(token,score){ 62 | var scoreStr = ""+score; 63 | var scoreCode = ""; 64 | var tokenStr = ""+token; 65 | for(var i in scoreStr){ 66 | console.log(scoreStr.indexOf(i)); 67 | scoreCode += parseInt( scoreStr.substr(i,1) )%5 *2; 68 | } 69 | return (scoreCode+tokenStr).substr(0,10); 70 | }, 71 | test:function(){ 72 | var self = this; 73 | self.order.active = true; 74 | self.order.on(cc.Node.EventType.TOUCH_START, self._onTouchStartOrder, self); 75 | }, 76 | initRank:function(){ 77 | var self = this; 78 | self.maxScore = 0; 79 | self.order.active = false; 80 | if(window.mm && mm.webgame) { 81 | mm.webgame.getLightGameToken(gameName, function(result) { 82 | self.getInitList(function(list, otherInfo) { 83 | if(list.length <= 0) { 84 | return; 85 | } 86 | //TOD:临时做法 87 | setTimeout(function(){ 88 | self.order.active = true; 89 | },500); 90 | 91 | self.getFriendRank(function(friendList){ 92 | self.holder.children[0].getComponent('popout').init(list,friendList); 93 | }); 94 | self.order.on(cc.Node.EventType.TOUCH_START, self._onTouchStartOrder, self); 95 | self.popout = self.holder.children[0]; 96 | 97 | var sceneType = self.queryString('scene_type'); 98 | var item = sceneType == '1' ? otherInfo : list[0]; 99 | if(!item) { 100 | self.order.active = false; 101 | return; 102 | } 103 | var prefab = cc.instantiate(self.prefabOrderItem); 104 | var avatar = item.avatar; 105 | prefab.children[0].children[0].getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(avatar, cc.Rect(0,0,50,50)); 106 | prefab.children[1].getComponent(cc.Label).string = item.score; 107 | self.order.addChild(prefab); 108 | }); 109 | }); 110 | } 111 | }, 112 | 113 | initCurrentScore:function(){ 114 | //如果locaStorage有数据,恢复 当前分数和步数 115 | if(is_momo7 && Store.stepCount.get()){ 116 | this.stepCount.string = Store.stepCount.get(); 117 | } 118 | var cScore=0; 119 | if(is_momo7 && Store.currentScore.get()){ 120 | cScore=parseInt( Store.currentScore.get() ); 121 | } 122 | this.currentScoreBase = cScore; 123 | this.numAnim = new CountUp(this.currentScore, 0, cScore, 0,1); 124 | this.numAnim.start(); 125 | }, 126 | initGameOverPopout:function(){ 127 | this.gameOver.zIndex = 200; 128 | var resultPrefab = cc.instantiate(this.resultPrefab); 129 | resultPrefab.getComponent('resultPrefab').init(this); 130 | resultPrefab.active = false; 131 | this.gameOver.addChild(resultPrefab); 132 | this.gameOverActionDown = cc.sequence( cc.spawn( 133 | cc.fadeTo(0.5,255), 134 | cc.moveTo(1, cc.p(0, 0) ).easing(cc.easeCubicActionOut()) 135 | )); 136 | this.gameOverActionUp = cc.sequence( cc.spawn( 137 | cc.fadeTo(1,0), 138 | cc.moveTo(1, cc.p(0,1000)).easing(cc.easeCubicActionOut()) 139 | )); 140 | }, 141 | //初始化游戏场地,共61个灰色六边形组成。 142 | initPlayBoard:function(){ 143 | // 共有9行,每行的列数依次为5 6 7 8 9 8 7 6 5 144 | var lineNum = 9; 145 | var point0Pos = this.getPoint0Pos(); 146 | var hexBox = new Array(lineNum); 147 | var storeBox; 148 | if(Store.hexBox.get())storeBox = Store.hexBox.get(); 149 | for(var i = 0, i_size = hexBox.length; i < i_size; i++){ 150 | var rowNum = lineNum - Math.abs(i - 4); 151 | hexBox[i] = new Array(rowNum); 152 | for (var j = 0, j_size = hexBox[i].length; j < j_size; j++) { 153 | var info = {occupy:0,colorId:5}; //occupy 1:被占; 0:未占; -1:暂时占有。 154 | if (j == 0 && i == 0) { 155 | info.pos = point0Pos; 156 | } 157 | if (j == 0 && i > 0) { 158 | info.pos = this.getNextLeftBottomPos(hexBox[i-1][0].pos); 159 | } 160 | if(j ==0 && i > 4){ 161 | info.pos = this.getNextRightBottomPos(hexBox[i-1][0].pos); 162 | } 163 | if (j > 0) { 164 | //与前面的六边形y相同,x相差 w + space 165 | var prePos = hexBox[i][j-1].pos; 166 | info.pos = { 167 | x:prePos.x + g_hexagon.w + g_hexagon.space, 168 | y:prePos.y 169 | } 170 | } 171 | //六个相关方形的hex信息 172 | info.relation = [ 173 | {row:i-1, column:i >= 5 ? j : j-1},// i>= 5 column:j 174 | {row:i-1, column:i >= 5 ? j+1 : j}, // i>= 5 column:j+1 175 | {row:i, column:j+1}, 176 | {row:i+1, column:i >= 4 ? j : j+1}, // i>= 4 column:j 177 | {row:i+1, column:i >= 4 ? j-1 : j}, // i >= 4 column:j-1 178 | {row:i, column:j-1} 179 | ]; 180 | if(is_momo7 && storeBox){ 181 | info.colorId = parseInt(storeBox[i][j].colorId); 182 | info.occupy = parseInt(storeBox[i][j].occupy); 183 | } 184 | var hexPrefab = this.createHexItem(info); 185 | info.item = hexPrefab; 186 | info.row = i; 187 | info.column = j; 188 | Object.defineProperty(info, 'item', {enumerable: false}); 189 | hexBox[i][j] = info; 190 | } 191 | } 192 | this.hexBox = hexBox; 193 | console.log('allPlayBoard: ',this.hexBox); 194 | }, 195 | initAllHolder:function(){ 196 | this.shapeHolder1.name = 'leftHolder'; 197 | this.shapeHolder2.name = 'middleHolder'; 198 | this.shapeHolder3.name = 'rightHolder'; 199 | 200 | this.shapeHolder1Pos = this.shapeHolder1.getPosition(); 201 | this.shapeHolder2Pos = this.shapeHolder2.getPosition(); 202 | this.shapeHolder3Pos = this.shapeHolder3.getPosition(); 203 | 204 | this.createShapePrefab(this.shapeHolder1); 205 | this.createShapePrefab(this.shapeHolder2); 206 | this.createShapePrefab(this.shapeHolder3); 207 | }, 208 | initAllHolderTouches:function(){ 209 | this.shapeHolder1.on(cc.Node.EventType.TOUCH_START, this._onTouchStartShapeHolder,this); 210 | this.shapeHolder2.on(cc.Node.EventType.TOUCH_START, this._onTouchStartShapeHolder,this); 211 | this.shapeHolder3.on(cc.Node.EventType.TOUCH_START, this._onTouchStartShapeHolder,this); 212 | 213 | this.shapeHolder1.on(cc.Node.EventType.TOUCH_MOVE,this._onTouchMoveShapeHolder,this); 214 | this.shapeHolder2.on(cc.Node.EventType.TOUCH_MOVE,this._onTouchMoveShapeHolder,this); 215 | this.shapeHolder3.on(cc.Node.EventType.TOUCH_MOVE,this._onTouchMoveShapeHolder,this); 216 | 217 | this.shapeHolder1.on(cc.Node.EventType.TOUCH_END,this._onTouchEndShapeHolder,this); 218 | this.shapeHolder2.on(cc.Node.EventType.TOUCH_END,this._onTouchEndShapeHolder,this); 219 | this.shapeHolder3.on(cc.Node.EventType.TOUCH_END,this._onTouchEndShapeHolder,this); 220 | }, 221 | _onTouchStartShapeHolder:function(e){//#C7E0F1 222 | if(!this.touchOffset)this.touchOffset={}; 223 | var holderName = e.target.name; 224 | var self = this; 225 | var touchPos = this.convertAnchorPosition(e.getLocation()); 226 | switch (holderName){ 227 | case 'leftHolder': { 228 | self.shapeHolder1.scale = 0.95; 229 | self.shapeHolder1.zIndex = 100; 230 | self.touchOffset = {x:touchPos.x-self.shapeHolder1.getPosition().x,y:touchPos.y-self.shapeHolder1.getPosition().y}; 231 | self.upPosition(self.shapeHolder1,touchPos); 232 | }break; 233 | 234 | case 'middleHolder': { 235 | self.shapeHolder2.scale = 0.95; 236 | self.shapeHolder2.zIndex = 100; 237 | self.touchOffset = {x:touchPos.x-self.shapeHolder2.getPosition().x,y:touchPos.y-self.shapeHolder2.getPosition().y}; 238 | self.upPosition(self.shapeHolder2,touchPos); 239 | }break; 240 | 241 | case 'rightHolder': { 242 | self.shapeHolder3.scale = 0.95; 243 | self.shapeHolder3.zIndex = 100; 244 | self.touchOffset = {x:touchPos.x-self.shapeHolder3.getPosition().x,y:touchPos.y-self.shapeHolder3.getPosition().y}; 245 | self.upPosition(self.shapeHolder3,touchPos); 246 | }break; 247 | } 248 | }, 249 | _onTouchMoveShapeHolder:function(e){ 250 | //需要限制一下TouchMove的触发频率,移动间距小于2不识别 251 | if(!this.preMoveTarget){this.preMoveTarget = e.getLocation();} 252 | if(Math.abs( e.getLocation().x - this.preMoveTarget.x) < g_config.touch_move_space && Math.abs(e.getLocation().y - this.preMoveTarget.y) < g_config.touch_move_space){ 253 | return; 254 | } 255 | this.preMoveTarget = e.getLocation(); 256 | var holderName = e.target.name; 257 | var self = this; 258 | switch(holderName){ 259 | case 'leftHolder':{ 260 | var pos = self.convertAnchorPosition(e.getLocation()); 261 | pos = cc.p(pos.x, pos.y+ g_config.shape_touch_up); 262 | self.shapeHolder1.setPosition(pos); 263 | self.canSitDown(self.shapeHolder1); 264 | }break; 265 | 266 | case 'middleHolder':{ 267 | var pos = self.convertAnchorPosition(e.getLocation()); 268 | pos = cc.p(pos.x,pos.y+g_config.shape_touch_up); 269 | self.shapeHolder2.setPosition(pos); 270 | self.canSitDown(self.shapeHolder2); 271 | }break; 272 | 273 | case 'rightHolder':{ 274 | var pos = self.convertAnchorPosition(e.getLocation()); 275 | pos = cc.p(pos.x,pos.y+g_config.shape_touch_up); 276 | self.shapeHolder3.setPosition(pos); 277 | self.canSitDown(self.shapeHolder3); 278 | }break; 279 | } 280 | }, 281 | _onTouchEndShapeHolder:function(e){ 282 | var holderName = e.target.name; 283 | var self = this; 284 | switch(holderName){ 285 | case 'leftHolder':{ 286 | self.doSitDown(self.shapeHolder1,(isDone,hexSats)=>{//hexSats:已经放置好的Hex 287 | if(isDone){ 288 | 289 | self.shapeHolder1.active = false; 290 | self.shapeHolder1.removeAllChildren(); 291 | self.createShapePrefab(self.shapeHolder1); 292 | self.shapeHolder1.setPosition(self.shapeHolder1Pos); 293 | self.shapeHolder1.active = true; 294 | console.log('will killAlLineInclude'); 295 | self.killAllLineInclude(hexSats); 296 | self.addStepCount(); 297 | //判断是否游戏结束 298 | if(self.isGameOver()){ 299 | self.doGameOver(self.currentScoreBase); 300 | }; 301 | }else{ 302 | self.shapeHolder1.setPosition(self.shapeHolder1Pos); 303 | self.shapeHolder1.scale = 0.7; 304 | } 305 | }); 306 | }break; 307 | 308 | case 'middleHolder':{ 309 | self.doSitDown(self.shapeHolder2,(isDone,hexSats)=>{ 310 | if(isDone){ 311 | self.shapeHolder2.active = false; 312 | self.shapeHolder2.removeAllChildren(); 313 | self.createShapePrefab(self.shapeHolder2); 314 | self.shapeHolder2.setPosition(self.shapeHolder2Pos); 315 | self.shapeHolder2.active = true; 316 | console.log('will killAlLineInclude hexSats:',hexSats); 317 | self.killAllLineInclude(hexSats); 318 | self.addStepCount(); 319 | if(self.isGameOver()){ 320 | self.doGameOver(self.currentScoreBase); 321 | }; 322 | }else{ 323 | self.shapeHolder2.setPosition(self.shapeHolder2Pos); 324 | self.shapeHolder2.scale = 0.7; 325 | } 326 | }); 327 | }break; 328 | 329 | case 'rightHolder':{ 330 | self.doSitDown(self.shapeHolder3,(isDone,hexSats)=>{ 331 | if(isDone){ 332 | self.shapeHolder3.active = false; 333 | self.shapeHolder3.removeAllChildren(); 334 | self.createShapePrefab(self.shapeHolder3); 335 | self.shapeHolder3.setPosition(self.shapeHolder3Pos); 336 | self.shapeHolder3.active = true; 337 | console.log('will killAlLineInclude hexSats:',hexSats); 338 | self.killAllLineInclude(hexSats); 339 | self.addStepCount(); 340 | if(self.isGameOver()){ 341 | self.doGameOver(self.currentScoreBase); 342 | }; 343 | }else{ 344 | self.shapeHolder3.setPosition(self.shapeHolder3Pos); 345 | self.shapeHolder3.scale = 0.7; 346 | } 347 | }); 348 | }break; 349 | } 350 | }, 351 | onTouchPlayAgain:function(){ 352 | console.log('do onTouchPlayAgain'); 353 | this.stepCount.string = 0; 354 | this.resetPlayBoard(); 355 | this.hideGameOver(); 356 | }, 357 | _onTouchStartOrder:function(){ 358 | //cc.eventManager.pauseTarget(this.order, true); 359 | this.popout.getComponent('popout').show(); 360 | }, 361 | upPosition:function(shapeHolder,touchPos){ 362 | shapeHolder.y = touchPos.y + g_config.shape_touch_up; 363 | }, 364 | //点击shapeHolder时:触点相对于shapeHolder的位置偏移 365 | touchOffset:function(touchPos,shapePos){ 366 | return { 367 | x:touchPos.x-shapePos.x, 368 | y:touchPos.y-shapePos.y 369 | } 370 | }, 371 | showGameOver:function(score){ 372 | var self = this; 373 | setTimeout(function(){ 374 | var gameOverPrefab = self.gameOver.children[0]; 375 | var mask = gameOverPrefab.children[0]; 376 | var board = gameOverPrefab.children[1]; 377 | board.active = false; 378 | mask.active = true; 379 | gameOverPrefab.active = true; 380 | gameOverPrefab.getComponent('resultPrefab').setScore(score); 381 | board.position = cc.p(0,1000); 382 | board.active = true; 383 | board.runAction(self.gameOverActionDown); 384 | },1500); 385 | }, 386 | hideGameOver:function(){ 387 | var gameOverPrefab = this.gameOver.children[0]; 388 | var mask = gameOverPrefab.children[0]; 389 | var board = gameOverPrefab.children[1]; 390 | board.runAction(this.gameOverActionUp); 391 | gameOverPrefab.children[0].active = false; 392 | }, 393 | resetPlayBoard:function(){ 394 | //把棋盘上的点都设成灰色,occupy=0 395 | for(var i = 0; i < this.hexBox.length; i++){ 396 | for(var j = 0; j < this.hexBox[i].length; j++){ 397 | //只有有一种可能放下的位置,游戏都继续 398 | if(this.hexBox[i][j].occupy == 1){ 399 | this.hexBox[i][j].occupy = 0; 400 | this.hexBox[i][j].item.getComponent('HexPrefab').changeColor(5); 401 | this.hexBox[i][j].colorId = 5; 402 | } 403 | } 404 | } 405 | //当前分数归零 406 | this.currentScore.string = '0'; 407 | this.currentScoreBase = 0; 408 | }, 409 | /** 410 | * 判断游戏是否结束 411 | * 逻辑:三种图形,放在所有可能的位置,3*61,所有位置都放不下的时候,游戏结束 412 | * @return {[type]} [description] 413 | */ 414 | isGameOver:function(){ 415 | for(var i = 0; i < this.hexBox.length; i++){ 416 | for(var j = 0; j < this.hexBox[i].length; j++){ 417 | //只有有一种可能放下的位置,游戏都继续 418 | if(this.judgeCanSitDown(this.shapeHolder1,{row:i,column:j}))return false; 419 | if(this.judgeCanSitDown(this.shapeHolder2,{row:i,column:j}))return false; 420 | if(this.judgeCanSitDown(this.shapeHolder3,{row:i,column:j}))return false; 421 | } 422 | } 423 | return true; 424 | }, 425 | addStepCount:function(){ 426 | var count = parseInt(this.stepCount.string)+1; 427 | this.stepCount.string = count; 428 | Store.hexBox.set(this.hexBox); 429 | Store.stepCount.set(count); 430 | }, 431 | doGameOver:function(score){ 432 | var self = this; 433 | console.log('游戏结束'); 434 | //清空localStorage 435 | Store.reset(); 436 | self.updateServerScore(score,()=>{ 437 | //TODO:当自己的分数再创新高的时候,刷新一下当前页面的排行 438 | self.updateOrder(); 439 | }); 440 | self.showGameOver(score); 441 | }, 442 | createShapePrefab:function(shapeHolder){ 443 | var shapePrefab = cc.instantiate(this.shapePrefab); 444 | shapePrefab.getComponent('shapePrefab').init(); 445 | shapeHolder.addChild(shapePrefab); 446 | var boxSize = shapePrefab.getBoundingBoxToWorld(); 447 | shapeHolder.scale = 0.7; 448 | }, 449 | 450 | // 遍历当前@hex三个方向的line,如果occupy==1则清理相应line 451 | killAllLineInclude:function(Hexs){//结构hex={row:0,column:0} 452 | this.currentScoreNum = 0;//当前得分的次数,or 连续消除的次数 453 | this.allNeedKillHexs = []; 454 | for(var i in Hexs){ 455 | this.killAllLineIncludeOne(Hexs[i]); 456 | } 457 | //整个遍历,如果有可消除的行,则所有的可消除块都装入了this.allNeedKillHexs中 458 | for(var index in this.allNeedKillHexs){ 459 | this.resetOneHexGray(this.allNeedKillHexs[index]); 460 | } 461 | }, 462 | killAllLineIncludeOne:function(hex){ 463 | //遍历行 464 | var rowOccupyNum = 0; 465 | var rowArray = []; 466 | for(var i = 0; i < this.hexBox[hex.row].length; i++){ 467 | if(this.hexBox[hex.row][i].occupy === 1){ 468 | rowOccupyNum += 1; 469 | rowArray.push(this.hexBox[hex.row][i]); 470 | } 471 | if(i == this.hexBox[hex.row].length -1){ 472 | if(rowOccupyNum -1 == i){ 473 | for(var rowIndex in rowArray){ 474 | //this.resetOneHexGray(rowArray[rowIndex]); 475 | } 476 | this.allNeedKillHexs = this.allNeedKillHexs.concat(rowArray); 477 | console.log('得分:消除了一行'); 478 | this.currentScoreNum++; 479 | this.calcScore(i+1,this.currentScoreNum,(score)=>{ 480 | this.addScoreAction(score); 481 | this.currentScoreBase += score; 482 | Store.currentScore.set(this.currentScoreBase); 483 | this.numAnim.update(this.currentScoreBase); 484 | }); 485 | 486 | } 487 | } 488 | } 489 | 490 | //遍历'/' 491 | //先找到当前hex在g_ling.right中的哪一列 492 | var rightOccupyNum = 0; 493 | var rightArray = []; 494 | var right_lines; 495 | if(hex.row > 4){ 496 | right_lines = g_line.right[hex.column + hex.row - 4]; 497 | }else{ 498 | right_lines = g_line.right[hex.column]; 499 | } 500 | //console.log('beigin / : ',right_lines); 501 | for(var rightIndex = 0; rightIndex < right_lines.length; rightIndex++){ 502 | var rightItem = right_lines[rightIndex]; 503 | if(this.hexBox[rightItem.row][rightItem.column].occupy ===1){ 504 | rightOccupyNum += 1; 505 | rightArray.push(this.hexBox[rightItem.row][rightItem.column]); 506 | } 507 | if(rightIndex == right_lines.length -1){ 508 | if(rightOccupyNum - 1 == rightIndex){ 509 | for(var rIndex in rightArray){ 510 | //this.resetOneHexGray(rightArray[rIndex]); 511 | } 512 | this.allNeedKillHexs = this.allNeedKillHexs.concat(rightArray); 513 | console.log('得分:消除了一右列'); 514 | this.currentScoreNum++; 515 | this.calcScore(rightIndex+1, this.currentScoreNum,(score)=>{ 516 | this.addScoreAction(score); 517 | this.currentScoreBase += score; 518 | Store.currentScore.set(this.currentScoreBase); 519 | this.numAnim.update(this.currentScoreBase); 520 | }); 521 | } 522 | } 523 | } 524 | 525 | //遍历'\' 526 | //先找到当前hex在g_ling.left中的哪一列 527 | var leftOccupyNum = 0; 528 | var leftArray = []; 529 | var left_lines; 530 | if(hex.row < 4){ 531 | left_lines = g_line.left[hex.column + 4 - hex.row]; 532 | }else{ 533 | left_lines = g_line.left[hex.column]; 534 | } 535 | //console.log('beigin \\ : ',left_lines); 536 | for(var leftIndex=0;leftIndex{ 551 | this.addScoreAction(score); 552 | this.currentScoreBase += score; 553 | Store.currentScore.set(this.currentScoreBase); 554 | this.numAnim.update(this.currentScoreBase); 555 | }); 556 | } 557 | } 558 | } 559 | }, 560 | addScoreAction:function(num){ 561 | this.addScore.node.y = 360; 562 | this.addScore.node.opacity = 0; 563 | this.addScore.string = '+'+num; 564 | var action1 = cc.fadeIn(0.2); 565 | var action1_1 = cc.scaleTo(0.2,2); 566 | var action2 = cc.moveTo(0.5, cc.p(0,400)).easing(cc.easeCubicActionOut()); 567 | var action3 = cc.fadeOut(0.5); 568 | var sequence = cc.sequence(cc.spawn(action1,action1_1),cc.spawn(action2,action3)); 569 | this.addScore.node.runAction(sequence); 570 | 571 | }, 572 | calcScore:function(num,re,callback){//num:消除的格子数;re:第几次连续消除 573 | var singleScore = 140 + (num-5)*20; 574 | var score = singleScore * (1+0.3*(re-1)*(re-1)); 575 | callback && callback(Math.floor(score)); 576 | }, 577 | convertAnchorPosition:function(vec){ 578 | var point = cc.p(vec.x - this.node.width/2 ,vec.y - this.node.height/2); 579 | return point; 580 | }, 581 | doSitDown:function(shapeHolder,callback){ 582 | var done = false; 583 | var hexSats = []; 584 | for(var i = 0; i < this.hexBox.length; i++){ 585 | for(var j = 0; j < this.hexBox[i].length; j++){ 586 | if(this.hexBox[i][j].occupy == -1){ 587 | this.hexBox[i][j].occupy = 1; 588 | this.hexBox[i][j].item.getComponent('HexPrefab').resetOpacity(); 589 | hexSats.push(this.hexBox[i][j]); 590 | done = true; 591 | } 592 | } 593 | } 594 | if(done === true)callback && callback(true,hexSats); 595 | if(done === false)callback && callback(false) 596 | }, 597 | //只判断该图像在指定点是否可放置 598 | judgeCanSitDown:function(shapeHolder,pos){//pos:row,column 599 | var shapePrefab = shapeHolder.children[0].getComponent('shapePrefab'); 600 | if(this.hexBox[pos.row][pos.column].occupy ===1)return false;//如果该位置已经被占了,退出 601 | if(shapePrefab.relation[0] === -1){//单一shape 602 | if(this.hexBox[pos.row][pos.column].occupy === 1 ){ 603 | //TODO:已经被占 604 | return false; 605 | }else{ 606 | return true; 607 | } 608 | 609 | }else{ 610 | var matrix1 = this.hexBox[pos.row][pos.column].relation[shapePrefab.relation[0]];//第二个hex的坐标 611 | var matrix2 = this.hexBox[matrix1.row]&&this.hexBox[matrix1.row][matrix1.column]&&this.hexBox[matrix1.row][matrix1.column].relation[shapePrefab.relation[1]]; 612 | var matrix3 = matrix2 && this.hexBox[matrix2.row]&&this.hexBox[matrix2.row][matrix2.column]&&this.hexBox[matrix2.row][matrix2.column].relation[shapePrefab.relation[2]]; 613 | 614 | if(this.hexBox[matrix1.row] && this.hexBox[matrix1.row][matrix1.column] && this.hexBox[matrix1.row][matrix1.column].occupy === 0 && 615 | this.hexBox[matrix2.row] && this.hexBox[matrix2.row][matrix2.column] && this.hexBox[matrix2.row][matrix2.column].occupy === 0 && 616 | this.hexBox[matrix3.row] && this.hexBox[matrix3.row][matrix3.column] && this.hexBox[matrix3.row][matrix3.column].occupy === 0){ 617 | return true; 618 | }else{ 619 | return false; 620 | } 621 | } 622 | }, 623 | canSitDown:function(shapeHolder){ 624 | var shapePrefab = shapeHolder.children[0].getComponent('shapePrefab'); 625 | var hexPrefab = shapePrefab.mBlocks[0].item; 626 | var first = hexPrefab.getNodeToWorldTransformAR(); 627 | var firstPos = this.convertAnchorPosition({x:first.tx,y:first.ty}); 628 | //先确定firstShape在playBoard中,否则退出 629 | if( firstPos.x < this.hexBox[4][0].pos.x || firstPos.x > this.hexBox[4][8].pos.x || firstPos.y < this.hexBox[8][0].pos.y || firstPos.y > this.hexBox[0][0].pos.y){ 630 | this.resetAllHexGray(); 631 | return; 632 | }; 633 | 634 | var colorId = hexPrefab.getComponent('HexPrefab').colorId; 635 | for(var i = 0; i < this.hexBox.length; i++){ 636 | for(var j=0; j < this.hexBox[i].length; j++){ 637 | var pos = this.hexBox[i][j].pos; 638 | var address = g_tools.getPointsAddress(pos,firstPos); 639 | if(address < g_hexagon.w/2){ 640 | if(this.preBingo && this.preBingo.i == i && this.preBingo.j == j){ 641 | console.log('首位置重复命中!!!'); 642 | return; 643 | } 644 | 645 | if(this.hexBox[i][j].occupy ===1)return;//如果该位置已经被占了,退出 646 | console.log('首位置命中!!!!!'); 647 | this.preBingo = {i:i,j:j}; 648 | if(shapePrefab.relation[0] === -1){//单一shape 649 | //if(this.hexBox[i][j].occupy === 1)return; 650 | this.resetAllHexGray(); 651 | this.hexBox[i][j].item.getComponent('HexPrefab').changeOpacityColor(colorId); 652 | this.hexBox[i][j].colorId = colorId; 653 | this.hexBox[i][j].occupy = -1 654 | }else{ 655 | var matrix1 = this.hexBox[i][j].relation[shapePrefab.relation[0]];//第二个hex的坐标 656 | var matrix2 = this.hexBox[matrix1.row]&&this.hexBox[matrix1.row][matrix1.column]&&this.hexBox[matrix1.row][matrix1.column].relation[shapePrefab.relation[1]]; 657 | var matrix3 = matrix2 && this.hexBox[matrix2.row]&&this.hexBox[matrix2.row][matrix2.column]&&this.hexBox[matrix2.row][matrix2.column].relation[shapePrefab.relation[2]]; 658 | 659 | if(this.hexBox[matrix1.row] && this.hexBox[matrix1.row][matrix1.column] && this.hexBox[matrix1.row][matrix1.column].occupy !== 1 && 660 | this.hexBox[matrix2.row] && this.hexBox[matrix2.row][matrix2.column] && this.hexBox[matrix2.row][matrix2.column].occupy !== 1 && 661 | this.hexBox[matrix3.row] && this.hexBox[matrix3.row][matrix3.column] && this.hexBox[matrix3.row][matrix3.column].occupy !== 1){ 662 | this.resetAllHexGray(); 663 | this.hexBox[i][j].item.getComponent('HexPrefab').changeOpacityColor(colorId); 664 | this.hexBox[matrix1.row][matrix1.column].item.getComponent('HexPrefab').changeOpacityColor(colorId); 665 | this.hexBox[matrix2.row][matrix2.column].item.getComponent('HexPrefab').changeOpacityColor(colorId); 666 | this.hexBox[matrix3.row][matrix3.column].item.getComponent('HexPrefab').changeOpacityColor(colorId); 667 | 668 | this.hexBox[i][j].colorId = colorId; 669 | this.hexBox[matrix1.row][matrix1.column].colorId = colorId; 670 | this.hexBox[matrix2.row][matrix2.column].colorId = colorId; 671 | this.hexBox[matrix3.row][matrix3.column].colorId = colorId; 672 | 673 | this.hexBox[i][j].occupy = -1; 674 | this.hexBox[matrix1.row][matrix1.column].occupy = -1; 675 | this.hexBox[matrix2.row][matrix2.column].occupy = -1; 676 | this.hexBox[matrix3.row][matrix3.column].occupy = -1; 677 | }else{ 678 | this.resetAllHexGray(); 679 | } 680 | } 681 | }else{} 682 | } 683 | } 684 | }, 685 | /** 686 | * 把所有occupy:-1的hex块都重置成灰色,且设置occupy=0 687 | */ 688 | resetAllHexGray:function(){ 689 | this.preBingo = null; 690 | for(var i = 0; i < this.hexBox.length; i++){ 691 | for(var j = 0; j < this.hexBox[i].length; j++){ 692 | if(this.hexBox[i][j].occupy === -1){ 693 | this.hexBox[i][j].occupy = 0; 694 | this.hexBox[i][j].item.getComponent('HexPrefab').changeColor(5);//color gray 695 | this.hexBox[i][j].colorId = 5; 696 | } 697 | } 698 | } 699 | }, 700 | // 把@hex置灰,并修改相关属性 701 | resetOneHexGray:function(hex){ 702 | hex.item.getComponent('HexPrefab').changeTweenColor(5); 703 | hex.colorId = 5; 704 | hex.occupy = 0; 705 | }, 706 | /** 707 | * 关于坐标点的计算,都是基于最中心的那个小六边形来算的,它的坐标是(0,0) 708 | * 计算出0点的坐标,0点就是第一行的第一个点。 709 | */ 710 | getPoint0Pos: function() { 711 | var pos = {}; 712 | pos.x = g_hexagon.centerPos.x - 2 * g_hexagon.w; 713 | pos.y = g_hexagon.centerPos.y + 2 * Math.sqrt(3) * g_hexagon.w; 714 | return pos; 715 | }, 716 | // 计算当前六边形左下方六边形的坐标 717 | getNextLeftBottomPos:function(pos){ 718 | var newPos = {}; 719 | newPos.x = pos.x - (g_hexagon.w + g_hexagon.space) / 2; 720 | newPos.y = pos.y - Math.sqrt(3) / 2 * (g_hexagon.w + g_hexagon.space); 721 | return newPos; 722 | }, 723 | // 计算当前六边形右下方六边形的坐标 724 | getNextRightBottomPos:function(pos){ 725 | var newPos = {}; 726 | newPos.x = pos.x + (g_hexagon.w + g_hexagon.space) / 2; 727 | newPos.y = pos.y - Math.sqrt(3) / 2 * (g_hexagon.w + g_hexagon.space); 728 | return newPos; 729 | }, 730 | 731 | createHexItem:function(info){ 732 | var newHex = cc.instantiate(this.hexPrefab); 733 | newHex.x = info.pos.x; 734 | newHex.y = info.pos.y; 735 | newHex.getComponent('HexPrefab').changeColor(info.colorId); 736 | this.node.addChild(newHex); 737 | return newHex; 738 | }, 739 | /* 740 | *初始化排行榜 741 | *callback有两个参数@listInfo @otherInfo 742 | *listInfo是一周内的排行,scene==1,只显示双方信息 743 | *在order显示:1v1显示对方的头像,群:显示最近一周成绩最好的人的信息 744 | */ 745 | getInitList: function(callback){ 746 | var self = this; 747 | var scene_id = this.queryString('scene_id') || '320007230'; 748 | var scene_type = this.queryString('scene_type') || 1; 749 | this.scene_id = scene_id; 750 | this.scene_type = scene_type; 751 | if (scene_type == 1) { 752 | mm.webgame.getLightGameUserScore({gameid: gameName},function(result){ 753 | if(result.ec == 200){ 754 | var selfInfo = {name: result.name,avatar: result.avatar,score:result.score}; 755 | var infoList = []; 756 | infoList.push(selfInfo); 757 | mm.webgame.getLightGameUserScore({gameid: gameName,momoid: scene_id,}, function(resp) { 758 | if (resp.ec == 200) { 759 | var otherInfo = {name: resp.name,avatar: resp.avatar,score: resp.score}; 760 | if (resp.score > selfInfo.score) { 761 | infoList.unshift(otherInfo); 762 | } else { 763 | infoList.push(otherInfo); 764 | } 765 | callback && callback(infoList, otherInfo); 766 | } else { 767 | callback && callback(infoList, null); 768 | } 769 | }); 770 | } else { 771 | console.log('success', result); 772 | callback && callback([]); 773 | } 774 | }); 775 | } 776 | if(scene_type == 2 || scene_type == 4 || scene_type == 16){ 777 | mm.webgame.getLightGameUserRank({ 778 | gameid: gameName, 779 | group_id: scene_id, 780 | type:scene_type 781 | }, function(result){ 782 | if(result.ec == 200){ 783 | callback && callback(result.rank_info.slice(0,10)); 784 | }else{ 785 | console.log('error in getLightGameGroupUserRank:',result); 786 | } 787 | }); 788 | } 789 | }, 790 | /* 791 | *获取好友排行 792 | */ 793 | getFriendRank:function(callback){ 794 | var scene_id = this.queryString('scene_id') || '320007230'; 795 | var scene_type = this.queryString('scene_type') || 1; 796 | mm.webgame.getLightGameFriendsUserRank({ 797 | gameid: gameName, 798 | group_id: scene_id, 799 | type:scene_type, 800 | }, function(result) { 801 | if(result.ec == 200){ 802 | console.log('friendsUserRank 200',result.rank_info); 803 | callback && callback(result.rank_info); 804 | } 805 | }); 806 | }, 807 | 808 | /* 809 | * 更新最高成绩 810 | */ 811 | updateServerScore:function(score,callback){ 812 | if(!window.mm) return; 813 | score = parseInt(score); 814 | console.log('提交成绩!'); 815 | var preScore = parseInt( (score+'').substr(0,3) ); 816 | var vToken = (preScore%5 + preScore + score) * 987; 817 | //(分数前3位%5 + 分数前3位 + 分数 )* 987 818 | mm.webgame.setLightGameUserScore({ 819 | gameid: gameName, 820 | result: score, 821 | vtoken:vToken, 822 | scene_type: this.queryString('scene_type'), 823 | scene_id: this.queryString('scene_id') 824 | }, function(result) { 825 | if(result.ec === 200) { 826 | console.log('update server score success:',result); 827 | callback && callback(); 828 | } 829 | }); 830 | }, 831 | updateOrder: function(){ 832 | var self = this; 833 | self.getInitList(function(list, otherInfo) { 834 | if(list.length <= 0) return; 835 | self.popout.getComponent('popout').fresh(list); 836 | var sceneType = self.queryString('scene_type'); 837 | var item = sceneType == '1' ? otherInfo : list[0]; 838 | if(!item) return; 839 | var itemView = self.order.children[1]; 840 | itemView.children[0].children[0].getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(item.avatar, cc.Rect(0, 0, 50, 50)); 841 | itemView.children[1].getComponent(cc.Label).string = item.score; 842 | }); 843 | }, 844 | /* 845 | *工具方法,获取query object 846 | */ 847 | queryString:function(name,url){ 848 | if (!url) url = window.location.href; 849 | name = name.replace(/[\[\]]/g, "\\$&"); 850 | var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 851 | results = regex.exec(url); 852 | if (!results) return null; 853 | if (!results[2]) return ''; 854 | return decodeURIComponent(results[2].replace(/\+/g, " ")); 855 | } 856 | }); 857 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/Global.js: -------------------------------------------------------------------------------- 1 | // 全局的信息 2 | 3 | // 单个六边形相关信息 4 | var g_hexagon = { 5 | centerPos: {x: 0,y: 0}, 6 | w: 66,//55, 7 | h: 78,//66, 8 | space: 7, 9 | side:28, 10 | a:1, 11 | b:2, 12 | } 13 | 14 | const g_config = { 15 | touch_move_space:3, 16 | shape_touch_up:80, 17 | } 18 | 19 | const g_line_right = [ 20 | [{row:0,column:0}, {row:1,column:0}, {row:2,column:0}, {row:3,column:0}, {row:4,column:0},], 21 | [{row:0,column:1}, {row:1,column:1}, {row:2,column:1}, {row:3,column:1}, {row:4,column:1}, {row:5,column:0}], 22 | [{row:0,column:2}, {row:1,column:2}, {row:2,column:2}, {row:3,column:2}, {row:4,column:2}, {row:5,column:1}, {row:6,column:0}], 23 | [{row:0,column:3}, {row:1,column:3}, {row:2,column:3}, {row:3,column:3}, {row:4,column:3}, {row:5,column:2}, {row:6,column:1}, {row:7,column:0}], 24 | [{row:0,column:4}, {row:1,column:4}, {row:2,column:4}, {row:3,column:4}, {row:4,column:4}, {row:5,column:3}, {row:6,column:2}, {row:7,column:1}, {row:8,column:0}], 25 | [{row:1,column:5}, {row:2,column:5}, {row:3,column:5}, {row:4,column:5}, {row:5,column:4}, {row:6,column:3}, {row:7,column:2}, {row:8,column:1}], 26 | [{row:2,column:6}, {row:3,column:6}, {row:4,column:6}, {row:5,column:5}, {row:6,column:4}, {row:7,column:3}, {row:8,column:2}], 27 | [{row:3,column:7}, {row:4,column:7}, {row:5,column:6}, {row:6,column:5}, {row:7,column:4}, {row:8,column:3}], 28 | [{row:4,column:8}, {row:5,column:7}, {row:6,column:6}, {row:7,column:5}, {row:8,column:4}] 29 | ]; 30 | 31 | const g_line_left = [ 32 | [{row:4,column:0}, {row:5,column:0}, {row:6,column:0}, {row:7,column:0}, {row:8,column:0}], 33 | [{row:3,column:0}, {row:4,column:1}, {row:5,column:1}, {row:6,column:1}, {row:7,column:1}, {row:8,column:1}], 34 | [{row:2,column:0}, {row:3,column:1}, {row:4,column:2}, {row:5,column:2}, {row:6,column:2}, {row:7,column:2}, {row:8,column:2}], 35 | [{row:1,column:0}, {row:2,column:1}, {row:3,column:2}, {row:4,column:3}, {row:5,column:3}, {row:6,column:3}, {row:7,column:3}, {row:8,column:3}], 36 | [{row:0,column:0}, {row:1,column:1}, {row:2,column:2}, {row:3,column:3}, {row:4,column:4}, {row:5,column:4}, {row:6,column:4}, {row:7,column:4}, {row:8,column:4}], 37 | [{row:0,column:1}, {row:1,column:2}, {row:2,column:3}, {row:3,column:4}, {row:4,column:5}, {row:5,column:5}, {row:6,column:5}, {row:7,column:5}], 38 | [{row:0,column:2}, {row:1,column:3}, {row:2,column:4}, {row:3,column:5}, {row:4,column:6}, {row:5,column:6}, {row:6,column:6}], 39 | [{row:0,column:3}, {row:1,column:4}, {row:2,column:5}, {row:3,column:6}, {row:4,column:7}, {row:5,column:7}], 40 | [{row:0,column:4}, {row:1,column:5}, {row:2,column:6}, {row:3,column:7}, {row:4,column:8}] 41 | ]; 42 | 43 | var g_getRelativePos = { 44 | // 计算当前六边形左下方六边形的坐标 45 | getNextLeftBottomPos:function(pos){ 46 | var newPos = {}; 47 | newPos.x = pos.x - (g_hexagon.w + g_hexagon.space) / 2; 48 | newPos.y = pos.y - Math.sqrt(3) / 2 * (g_hexagon.w + g_hexagon.space); 49 | return newPos; 50 | }, 51 | // 计算当前六边形右下方六边形的坐标 52 | getNextRightBottomPos:function(pos){ 53 | var newPos = {}; 54 | newPos.x = pos.x + (g_hexagon.w + g_hexagon.space) / 2; 55 | newPos.y = pos.y - Math.sqrt(3) / 2 * (g_hexagon.w + g_hexagon.space); 56 | return newPos; 57 | }, 58 | // 计算当前六边形左上方六边形的坐标 59 | getNextLeftTopPos:function(pos){ 60 | var newPos = {}; 61 | newPos.x = pos.x - (g_hexagon.w + g_hexagon.space) / 2; 62 | newPos.y = pos.y + Math.sqrt(3) / 2 * (g_hexagon.w + g_hexagon.space); 63 | return newPos; 64 | }, 65 | // 计算当前六边形右上方六边形的坐标 66 | getNextRightTopPos:function(pos){ 67 | var newPos = {}; 68 | newPos.x = pos.x + (g_hexagon.w + g_hexagon.space) / 2; 69 | newPos.y = pos.y + Math.sqrt(3) / 2 * (g_hexagon.w + g_hexagon.space); 70 | return newPos; 71 | }, 72 | getPrePos:function(pos){ 73 | return { 74 | x:pos.x - (g_hexagon.w + g_hexagon.space), 75 | y:pos.y 76 | } 77 | }, 78 | getAfterPos:function(pos){ 79 | return { 80 | x:pos.x + g_hexagon.w + g_hexagon.space, 81 | y:pos.y 82 | } 83 | } 84 | } 85 | 86 | var tool = { 87 | getPointsAddress:function(vec1,vec2){ 88 | //return Math.hypot(vec1.x - vec2.x , vec1.y - vec2.y); 89 | return Math.sqrt( (vec1.x - vec2.x)*(vec1.x - vec2.x) + (vec1.y - vec2.y)*(vec1.y - vec2.y) ); 90 | }, 91 | tween:{ 92 | linear:function(from,to,callback){ 93 | var update = from; 94 | var ratio = 5; 95 | (function loop(){ 96 | var raf = requestAnimationFrame(loop); 97 | update += ratio; 98 | if(update>to){ 99 | update = to; 100 | cancelAnimationFrame(raf); 101 | } 102 | callback(update); 103 | })(); 104 | } 105 | }, 106 | test:'1' 107 | } 108 | 109 | module.exports = { 110 | g_hexagon:g_hexagon, 111 | g_near_pos:g_getRelativePos, 112 | g_config:g_config, 113 | g_tools:tool, 114 | g_line:{ 115 | right:g_line_right, 116 | left:g_line_left 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/HelloWorld.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | label: { 6 | default: null, 7 | type: cc.Label 8 | }, 9 | text: 'Hello, World!' 10 | }, 11 | 12 | // use this for initialization 13 | onLoad: function () { 14 | this.label.string = this.text; 15 | }, 16 | 17 | // called every frame 18 | update: function (dt) { 19 | 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/HelloWorld.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "280c3aec-6492-4a9d-9f51-a9b00b570b4a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Script/HexPrefab.js: -------------------------------------------------------------------------------- 1 | var Global = require('Global'), 2 | g_tools = Global.g_tools; 3 | 4 | 5 | cc.Class({ 6 | extends: cc.Component, 7 | 8 | properties: { 9 | avatar:cc.Sprite,//sprite 10 | avatars:[cc.SpriteFrame] 11 | }, 12 | 13 | onLoad: function () { 14 | //this.avatar.spriteFrame = this.avatars[0]; 15 | }, 16 | 17 | update: function (dt) { 18 | 19 | }, 20 | 21 | changeColor:function(colorId){ 22 | this.colorId = colorId; 23 | this.avatar.spriteFrame = this.avatars[colorId]; 24 | this.node.opacity = 255; 25 | }, 26 | changeTweenColor:function(colorId){ 27 | this.colorId = colorId; 28 | this.avatar.spriteFrame = this.avatars[colorId]; 29 | this.node.opacity = 0; 30 | g_tools.tween.linear(0,255,(update)=>{ 31 | this.node.opacity = update; 32 | }); 33 | }, 34 | changeOpacityColor:function(colorId){ 35 | this.colorId = colorId; 36 | this.avatar.spriteFrame = this.avatars[colorId]; 37 | this.node.opacity = 140; 38 | }, 39 | resetOpacity:function(){ 40 | this.avatar.spriteFrame = this.avatars[5]; 41 | this.avatar.spriteFrame = this.avatars[this.colorId]; 42 | this.node.opacity = 255; 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/HexPrefab.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "f25ac4dc-4731-4c64-8fe4-956bd43b693a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Script/db.js: -------------------------------------------------------------------------------- 1 | const local = localStorage; 2 | const Store = { 3 | stepCount:{ 4 | get:function(){ 5 | if(local.stepCount)return local.stepCount; 6 | }, 7 | set:function(num){ 8 | local.stepCount = num; 9 | }, 10 | }, 11 | currentScore:{ 12 | get:function(){ 13 | if(local.currentScore)return local.currentScore; 14 | }, 15 | set:function(num){ 16 | local.currentScore = num; 17 | } 18 | }, 19 | hexBox:{ 20 | get:function(){ 21 | if(local.hexBox){ 22 | return JSON.parse(local.hexBox); 23 | }else{return null;} 24 | }, 25 | set:function(obj){ 26 | var copy = Object.assign({},obj); 27 | local.hexBox = JSON.stringify(copy); 28 | } 29 | }, 30 | reset:function(){ 31 | local.clear(); 32 | } 33 | } 34 | 35 | module.exports = Store; -------------------------------------------------------------------------------- /CCHexagon/assets/Script/resultPrefab.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | title:cc.Node, 6 | score:cc.Node, 7 | btnPlay:cc.Node, 8 | }, 9 | 10 | // use this for initialization 11 | onLoad: function () {}, 12 | init:function(game){ 13 | console.log('resultPrefab init'); 14 | this.game = game; 15 | this.btnPlay.on(cc.Node.EventType.TOUCH_START, this._onTouchPlayAgain,this); 16 | }, 17 | setScore:function(score){ 18 | console.log('set Score'); 19 | this.score.getComponent(cc.Label).string = score; 20 | }, 21 | _onTouchPlayAgain:function(){ 22 | console.log('_onTouchPlayAgain'); 23 | this.game.onTouchPlayAgain(); 24 | //this.game. 25 | }, 26 | // called every frame, uncomment this function to activate update callback 27 | // update: function (dt) { 28 | 29 | // }, 30 | }); 31 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/resultPrefab.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "ebb18c09-b5d9-4113-8345-f0e14afb7624", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Script/shapePrefab.js: -------------------------------------------------------------------------------- 1 | var Global = require('Global'); 2 | var g_near_pos = Global.g_near_pos; 3 | var g_hexagon = Global.g_hexagon; 4 | cc.Class({ 5 | extends: cc.Component, 6 | 7 | properties: { 8 | hexPrefab:cc.Prefab, 9 | mBlocks:null, 10 | }, 11 | 12 | onLoad: function () { 13 | this.active = true; 14 | }, 15 | 16 | init:function(){ 17 | //mBlocks 存放着当前图形的每个小图的坐标和每个hexPrefab 18 | this.mBlocks = new Array(4); 19 | this.relation = new Array(3); 20 | //随机产生一种图形,编号 0~24 共25中,其中 0 号为单一的六边形,其余的都是有4个六边形组成 21 | var shapeNum = Math.floor(Math.random() * 100 ) % 22;//0~21 22 | this.createRandomShape(shapeNum==21?0:shapeNum); 23 | console.log('random shape id : ',shapeNum); 24 | }, 25 | 26 | update: function (dt) { 27 | 28 | }, 29 | createHexItem:function(pos,colorId){ 30 | var newHex = cc.instantiate(this.hexPrefab); 31 | newHex.getComponent('HexPrefab').changeColor(colorId); 32 | newHex.x = pos.x; 33 | newHex.y = pos.y; 34 | this.node.addChild(newHex); 35 | return newHex; 36 | }, 37 | drawFourShapes:function(pos0,pos1,pos2,pos3,colorId){ 38 | var hex0 = this.createHexItem(pos0,colorId); 39 | var hex1 = this.createHexItem(pos1,colorId); 40 | var hex2 = this.createHexItem(pos2,colorId); 41 | var hex3 = this.createHexItem(pos3,colorId); 42 | this.mBlocks[0] = {hexPrefabPos:pos0,item:hex0}; 43 | this.mBlocks[1] = {hexPrefabPos:pos1,item:hex1}; 44 | this.mBlocks[2] = {hexPrefabPos:pos2,item:hex2}; 45 | this.mBlocks[3] = {hexPrefabPos:pos3,item:hex3}; 46 | }, 47 | createRandomShape:function(shapeNum){ 48 | //取一个随机颜色, 0 ~ 4 49 | var self = this; 50 | var colorNum = Math.floor( Math.random() * 10 ) % 5; 51 | var wOffset = g_hexagon.w / Math.sqrt(2); 52 | 53 | switch (shapeNum){ 54 | case 0 :{//单一六边形 55 | var hex1 = self.createHexItem({x:0,y:0},colorNum); 56 | self.relation[0] = -1; 57 | self.mBlocks[0] = { 58 | hexPrefabPos:{x:0,y:0}, 59 | item:hex1, 60 | } 61 | }break; 62 | case 1 :{//一 63 | var pos0 = {x:- g_hexagon.w*1.5,y:0}, 64 | pos1 = g_near_pos.getAfterPos(pos0), 65 | pos2 = g_near_pos.getAfterPos(pos1), 66 | pos3 = g_near_pos.getAfterPos(pos2); 67 | this.relation[0] = 2; 68 | this.relation[1] = 2; 69 | this.relation[2] = 2; 70 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 71 | }break; 72 | case 2 :{//第2种 73 | var pos0 = {x: - 1.5 * g_hexagon.w/Math.sqrt(2),y:1.5 * g_hexagon.w/Math.sqrt(2)}, 74 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 75 | pos2 = g_near_pos.getNextRightBottomPos(pos1), 76 | pos3 = g_near_pos.getNextRightBottomPos(pos2); 77 | this.relation[0] = 3; 78 | this.relation[1] = 3; 79 | this.relation[2] = 3; 80 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 81 | }break; 82 | case 3 :{//第3种 83 | var offset = 1.5*g_hexagon.w/Math.sqrt(2); 84 | var pos0 = {x:-offset,y:-offset}, 85 | pos1 = g_near_pos.getNextRightTopPos(pos0), 86 | pos2 = g_near_pos.getNextRightTopPos(pos1), 87 | pos3 = g_near_pos.getNextRightTopPos(pos2); 88 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 89 | this.relation[0] = 1; 90 | this.relation[1] = 1; 91 | this.relation[2] = 1; 92 | }break; 93 | case 4 :{//第4种 94 | var pos0 = {x:-0.5 * wOffset,y:0.5 * wOffset}, 95 | pos1 = g_near_pos.getNextLeftBottomPos(pos0), 96 | pos2 = g_near_pos.getAfterPos(pos1), 97 | pos3 = g_near_pos.getNextRightTopPos(pos2); 98 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 99 | this.relation[0] = 4; 100 | this.relation[1] = 2; 101 | this.relation[2] = 1; 102 | }break; 103 | 104 | case 5 :{ 105 | var pos0 = {x: -g_hexagon.w, y:g_hexagon.h/2}, 106 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 107 | pos2 = g_near_pos.getAfterPos(pos1), 108 | pos3 = g_near_pos.getNextLeftTopPos(pos2); 109 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 110 | this.relation[0] = 3; 111 | this.relation[1] = 2; 112 | this.relation[2] = 0; 113 | }break; 114 | case 6 :{ 115 | var pos0 = {x: 0, y: (g_hexagon.h + g_hexagon.side)/2}, 116 | pos1 = g_near_pos.getNextLeftBottomPos(pos0), 117 | pos2 = g_near_pos.getNextRightBottomPos(pos1), 118 | pos3 = g_near_pos.getNextRightTopPos(pos2); 119 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 120 | this.relation[0] = 4; 121 | this.relation[1] = 3; 122 | this.relation[2] = 1; 123 | }break; 124 | 125 | case 7 :{ 126 | var pos0 = {x:-g_hexagon.w, y:g_hexagon.h/2}, 127 | pos1 = g_near_pos.getNextLeftBottomPos(pos0), 128 | pos2 = g_near_pos.getAfterPos(pos1), 129 | pos3 = g_near_pos.getAfterPos(pos2); 130 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 131 | this.relation[0] = 4; 132 | this.relation[1] = 2; 133 | this.relation[2] = 2; 134 | }break; 135 | case 8 :{ 136 | var pos0 = {x:-g_hexagon.w,y:g_hexagon.h/2}, 137 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 138 | pos2 = g_near_pos.getNextRightTopPos(pos1), 139 | pos3 = g_near_pos.getAfterPos(pos2); 140 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 141 | this.relation[0] = 3; 142 | this.relation[1] = 1; 143 | this.relation[2] = 2; 144 | }break; 145 | 146 | case 9 :{ 147 | var pos0 = {x:-g_hexagon.w,y:-g_hexagon.h/2}, 148 | pos1 = g_near_pos.getAfterPos(pos0), 149 | pos2 = g_near_pos.getNextRightTopPos(pos1), 150 | pos3 = g_near_pos.getNextRightBottomPos(pos2); 151 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 152 | this.relation[0] = 2; 153 | this.relation[1] = 1; 154 | this.relation[2] = 3; 155 | }break; 156 | 157 | case 10 :{ 158 | var pos0 = {x:-g_hexagon.w/2,y:g_hexagon.h/2}, 159 | pos1 = g_near_pos.getAfterPos(pos0), 160 | pos2 = g_near_pos.getNextRightBottomPos(pos1), 161 | pos3 = g_near_pos.getNextRightTopPos(pos2); 162 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 163 | this.relation[0] = 2; 164 | this.relation[1] = 3; 165 | this.relation[2] = 1; 166 | }break; 167 | 168 | case 11:{ 169 | var pos0 = {x:-g_hexagon.w,y:0}, 170 | pos1 = g_near_pos.getNextRightTopPos(pos0), 171 | pos2 = g_near_pos.getNextRightBottomPos(pos1), 172 | pos3 = g_near_pos.getNextRightBottomPos(pos2); 173 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 174 | this.relation[0] = 1; 175 | this.relation[1] = 3; 176 | this.relation[2] = 3; 177 | }break; 178 | 179 | case 12 :{ 180 | var pos0 = {x:-g_hexagon.w/2,y:(g_hexagon.h + g_hexagon.side)/2}, 181 | pos1 = g_near_pos.getAfterPos(pos0), 182 | pos2 = g_near_pos.getNextLeftBottomPos(pos1), 183 | pos3 = g_near_pos.getNextRightBottomPos(pos2); 184 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 185 | this.relation[0] = 2; 186 | this.relation[1] = 4; 187 | this.relation[2] = 3; 188 | }break; 189 | 190 | case 13 :{ 191 | var pos0 = {x:-g_hexagon.w/2,y:(g_hexagon.h + g_hexagon.side)/2}, 192 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 193 | pos2 = g_near_pos.getNextLeftBottomPos(pos1), 194 | pos3 = g_near_pos.getAfterPos(pos2); 195 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 196 | this.relation[0] = 3; 197 | this.relation[1] = 4; 198 | this.relation[2] = 2; 199 | }break; 200 | 201 | case 14 :{ 202 | var pos0 = {x:-g_hexagon.w,y:(g_hexagon.h + g_hexagon.side)/2}, 203 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 204 | pos2 = g_near_pos.getAfterPos(pos1), 205 | pos3 = g_near_pos.getNextLeftBottomPos(pos2); 206 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 207 | this.relation[0] = 3; 208 | this.relation[1] = 2; 209 | this.relation[2] = 4; 210 | }break; 211 | 212 | case 15 :{ 213 | var pos0 = {x:-g_hexagon.w/2,y:(g_hexagon.h + g_hexagon.side)/2}, 214 | pos1 = g_near_pos.getAfterPos(pos0), 215 | pos2 = g_near_pos.getNextLeftBottomPos(pos1), 216 | pos3 = g_near_pos.getNextLeftBottomPos(pos2); 217 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 218 | this.relation[0] = 2; 219 | this.relation[1] = 4; 220 | this.relation[2] = 4; 221 | }break; 222 | 223 | case 16 :{ 224 | var pos0 = {x:g_hexagon.w/2,y:(g_hexagon.h + g_hexagon.side)/2}, 225 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 226 | pos2 = g_near_pos.getPrePos(pos1), 227 | pos3 = g_near_pos.getNextLeftBottomPos(pos2); 228 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 229 | this.relation[0] = 3; 230 | this.relation[1] = 5; 231 | this.relation[2] = 4; 232 | }break; 233 | 234 | case 17 :{ 235 | var pos0 = {x:-g_hexagon.w/2,y:0}, 236 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 237 | pos2 = g_near_pos.getNextRightTopPos(pos1), 238 | pos3 = g_near_pos.getNextRightTopPos(pos2); 239 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 240 | this.relation[0] = 3; 241 | this.relation[1] = 1; 242 | this.relation[2] = 1; 243 | }break; 244 | 245 | case 18 :{ 246 | var pos0 = {x:-g_hexagon.w/2,y:-(g_hexagon.h + g_hexagon.side)/2}, 247 | pos1 = g_near_pos.getAfterPos(pos0), 248 | pos2 = g_near_pos.getNextLeftTopPos(pos1), 249 | pos3 = g_near_pos.getNextRightTopPos(pos2); 250 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 251 | this.relation[0] = 2; 252 | this.relation[1] = 0; 253 | this.relation[2] = 1; 254 | }break; 255 | 256 | case 19 :{ 257 | var pos0 = {x:-g_hexagon.w,y:(g_hexagon.h + g_hexagon.side)/2}, 258 | pos1 = g_near_pos.getAfterPos(pos0), 259 | pos2 = g_near_pos.getNextRightBottomPos(pos1), 260 | pos3 = g_near_pos.getNextLeftBottomPos(pos2); 261 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 262 | this.relation[0] = 2; 263 | this.relation[1] = 3; 264 | this.relation[2] = 4; 265 | }break; 266 | 267 | case 20 :{ 268 | var pos0 = {x:-g_hexagon.w,y:-(g_hexagon.h + g_hexagon.side)/2}, 269 | pos1 = g_near_pos.getAfterPos(pos0), 270 | pos2 = g_near_pos.getNextRightTopPos(pos1), 271 | pos3 = g_near_pos.getNextLeftTopPos(pos2); 272 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 273 | this.relation[0] = 2; 274 | this.relation[1] = 1; 275 | this.relation[2] = 0; 276 | }break; 277 | 278 | case 21 :{ 279 | var pos0 = {x:-g_hexagon.w,y:g_hexagon.h/2}, 280 | pos1 = g_near_pos.getNextRightBottomPos(pos0), 281 | pos2 = g_near_pos.getAfterPos(pos1), 282 | pos3 = g_near_pos.getNextRightTopPos(pos2); 283 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 284 | this.relation[0] = 3; 285 | this.relation[1] = 2; 286 | this.relation[2] = 1; 287 | }break; 288 | 289 | case 22:{ 290 | var pos0 = {x:-g_hexagon.w/2,y:(g_hexagon.h + g_hexagon.side)/2}, 291 | pos1 = g_near_pos.getNextLeftBottomPos(pos0), 292 | pos2 = g_near_pos.getNextRightBottomPos(pos1), 293 | pos3 = g_near_pos.getAfterPos(pos2); 294 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 295 | this.relation[0] = 4; 296 | this.relation[1] = 3; 297 | this.relation[2] = 2; 298 | }break; 299 | 300 | case 23 :{ 301 | var pos0 = {x:-g_hexagon.w/2,y:-(g_hexagon.h + g_hexagon.side)/2}, 302 | pos1 = g_near_pos.getNextLeftTopPos(pos0), 303 | pos2 = g_near_pos.getNextRightTopPos(pos1), 304 | pos3 = g_near_pos.getAfterPos(pos2); 305 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 306 | this.relation[0] = 0; 307 | this.relation[1] = 1; 308 | this.relation[2] = 2; 309 | }break; 310 | 311 | case 24 :{ 312 | var pos0 = {x:-g_hexagon.w,y:-g_hexagon.h/2}, 313 | pos1 = g_near_pos.getNextRightTopPos(pos0), 314 | pos2 = g_near_pos.getAfterPos(pos1), 315 | pos3 = g_near_pos.getNextRightBottomPos(pos2); 316 | self.drawFourShapes(pos0,pos1,pos2,pos3,colorNum); 317 | this.relation[0] = 1; 318 | this.relation[1] = 2; 319 | this.relation[2] = 3; 320 | }break; 321 | } 322 | 323 | } 324 | 325 | 326 | }); 327 | -------------------------------------------------------------------------------- /CCHexagon/assets/Script/shapePrefab.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "eeabc207-6b72-48dd-a1c4-2a1a33f78d34", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/HelloWorld.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/HelloWorld.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "HelloWorld": { 9 | "ver": "1.0.3", 10 | "uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc", 11 | "rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 195, 20 | "height": 270, 21 | "rawWidth": 195, 22 | "rawHeight": 270, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/black_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/black_mask.jpg -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/black_mask.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "1589e3c3-2b84-4a19-8fe5-d1806a01af76", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "black_mask": { 9 | "ver": "1.0.3", 10 | "uuid": "3f013750-dcaf-4302-9629-2b9bd9b31e52", 11 | "rawTextureUuid": "1589e3c3-2b84-4a19-8fe5-d1806a01af76", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 100, 20 | "height": 100, 21 | "rawWidth": 100, 22 | "rawHeight": 100, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/color_0.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_0.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "24898466-c88e-4043-9caf-38d587548b7a", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "color_0": { 9 | "ver": "1.0.3", 10 | "uuid": "e3a01eab-fd76-4b0d-bd75-9343ba8ac571", 11 | "rawTextureUuid": "24898466-c88e-4043-9caf-38d587548b7a", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 50, 20 | "height": 60, 21 | "rawWidth": 50, 22 | "rawHeight": 60, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/color_1.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_1.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "a18c2e1e-c34d-4fcb-9e63-ab98d1e6b648", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "color_1": { 9 | "ver": "1.0.3", 10 | "uuid": "9636802f-10ed-4e32-bdb9-1ae7ad541bc0", 11 | "rawTextureUuid": "a18c2e1e-c34d-4fcb-9e63-ab98d1e6b648", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 50, 20 | "height": 60, 21 | "rawWidth": 50, 22 | "rawHeight": 60, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/color_2.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_2.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "ff135a88-aea4-449b-b9f9-c727ebb3bb8e", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "color_2": { 9 | "ver": "1.0.3", 10 | "uuid": "ec739cae-fb30-41e4-b11d-ad4c6d514aac", 11 | "rawTextureUuid": "ff135a88-aea4-449b-b9f9-c727ebb3bb8e", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 50, 20 | "height": 60, 21 | "rawWidth": 50, 22 | "rawHeight": 60, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/color_3.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_3.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "6a60b57b-b682-4263-9ced-e6fc31159d3e", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "color_3": { 9 | "ver": "1.0.3", 10 | "uuid": "1a15557b-bef1-40ea-9146-0e169b302e3b", 11 | "rawTextureUuid": "6a60b57b-b682-4263-9ced-e6fc31159d3e", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 50, 20 | "height": 60, 21 | "rawWidth": 50, 22 | "rawHeight": 60, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/color_4.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/color_4.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "e41da6a7-e772-44ed-8c7c-1063c7c6fccb", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "color_4": { 9 | "ver": "1.0.3", 10 | "uuid": "904d03f4-ea76-4945-a510-ee734561ea8e", 11 | "rawTextureUuid": "e41da6a7-e772-44ed-8c7c-1063c7c6fccb", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 50, 20 | "height": 60, 21 | "rawWidth": 50, 22 | "rawHeight": 60, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/h_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/h_gray.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/h_gray.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "e92c1f9d-cb7c-472e-8539-8287444e82f5", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "h_gray": { 9 | "ver": "1.0.3", 10 | "uuid": "24e18cca-67de-4435-98fb-f456d1fb69cb", 11 | "rawTextureUuid": "e92c1f9d-cb7c-472e-8539-8287444e82f5", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 52, 20 | "height": 60, 21 | "rawWidth": 52, 22 | "rawHeight": 60, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/popout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/Texture/popout.png -------------------------------------------------------------------------------- /CCHexagon/assets/Texture/popout.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "528b14df-48ee-4f2a-beeb-a1785c5bf067", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "popout": { 9 | "ver": "1.0.3", 10 | "uuid": "6f00b4cf-920d-4a6b-842c-f10788c68e41", 11 | "rawTextureUuid": "528b14df-48ee-4f2a-beeb-a1785c5bf067", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 640, 20 | "height": 840, 21 | "rawWidth": 640, 22 | "rawHeight": 840, 23 | "borderTop": 24, 24 | "borderBottom": 18, 25 | "borderLeft": 18, 26 | "borderRight": 24, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/font.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "91073916-f351-4656-997d-41d5994f6e3b", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/font/DIN-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/font/DIN-Regular.ttf -------------------------------------------------------------------------------- /CCHexagon/assets/font/DIN-Regular.ttf.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "a6e448fc-92fa-40bc-8613-7523f1307c3d", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /CCHexagon/assets/font/DINCond-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/font/DINCond-Light.ttf -------------------------------------------------------------------------------- /CCHexagon/assets/font/DINCond-Light.ttf.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "a8241f55-5024-42aa-b287-89ede1a335a5", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "51e2db4a-158e-4757-9638-f203b3dc2af7", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/board-item.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "data": { 7 | "__id__": 1 8 | } 9 | }, 10 | { 11 | "__type__": "cc.Node", 12 | "_name": "board-item", 13 | "_objFlags": 0, 14 | "_opacity": 255, 15 | "_color": { 16 | "__type__": "cc.Color", 17 | "r": 255, 18 | "g": 255, 19 | "b": 255, 20 | "a": 255 21 | }, 22 | "_cascadeOpacityEnabled": true, 23 | "_parent": null, 24 | "_anchorPoint": { 25 | "__type__": "cc.Vec2", 26 | "x": 0.5, 27 | "y": 0.5 28 | }, 29 | "_contentSize": { 30 | "__type__": "cc.Size", 31 | "width": 540, 32 | "height": 72 33 | }, 34 | "_children": [ 35 | { 36 | "__id__": 2 37 | }, 38 | { 39 | "__id__": 5 40 | }, 41 | { 42 | "__id__": 11 43 | }, 44 | { 45 | "__id__": 14 46 | } 47 | ], 48 | "_rotationX": 0, 49 | "_rotationY": 0, 50 | "_scaleX": 1, 51 | "_scaleY": 1, 52 | "_position": { 53 | "__type__": "cc.Vec2", 54 | "x": 0, 55 | "y": -37 56 | }, 57 | "_skewX": 0, 58 | "_skewY": 0, 59 | "_localZOrder": 0, 60 | "_globalZOrder": 0, 61 | "_tag": -1, 62 | "_opacityModifyRGB": false, 63 | "_reorderChildDirty": false, 64 | "_id": "", 65 | "_active": true, 66 | "_components": [ 67 | { 68 | "__id__": 17 69 | }, 70 | { 71 | "__id__": 18 72 | } 73 | ], 74 | "_prefab": { 75 | "__id__": 19 76 | } 77 | }, 78 | { 79 | "__type__": "cc.Node", 80 | "_name": "order", 81 | "_objFlags": 0, 82 | "_opacity": 255, 83 | "_color": { 84 | "__type__": "cc.Color", 85 | "r": 57, 86 | "g": 103, 87 | "b": 238, 88 | "a": 255 89 | }, 90 | "_cascadeOpacityEnabled": true, 91 | "_parent": { 92 | "__id__": 1 93 | }, 94 | "_anchorPoint": { 95 | "__type__": "cc.Vec2", 96 | "x": 0.5, 97 | "y": 0.5 98 | }, 99 | "_contentSize": { 100 | "__type__": "cc.Size", 101 | "width": 41.76, 102 | "height": 90 103 | }, 104 | "_children": [], 105 | "_rotationX": 0, 106 | "_rotationY": 0, 107 | "_scaleX": 0.5, 108 | "_scaleY": 0.5, 109 | "_position": { 110 | "__type__": "cc.Vec2", 111 | "x": -226, 112 | "y": 0 113 | }, 114 | "_skewX": 0, 115 | "_skewY": 0, 116 | "_localZOrder": 0, 117 | "_globalZOrder": 0, 118 | "_tag": -1, 119 | "_opacityModifyRGB": false, 120 | "_reorderChildDirty": false, 121 | "_id": "", 122 | "_active": true, 123 | "_components": [ 124 | { 125 | "__id__": 3 126 | } 127 | ], 128 | "_prefab": { 129 | "__id__": 4 130 | } 131 | }, 132 | { 133 | "__type__": "cc.Label", 134 | "_name": "", 135 | "_objFlags": 0, 136 | "node": { 137 | "__id__": 2 138 | }, 139 | "_enabled": true, 140 | "_useOriginalSize": false, 141 | "_fontSize": 80, 142 | "_lineHeight": 90, 143 | "_enableWrapText": true, 144 | "_isSystemFontUsed": false, 145 | "_N$string": "1", 146 | "_N$horizontalAlign": 1, 147 | "_N$verticalAlign": 1, 148 | "_N$overflow": 0, 149 | "_N$file": { 150 | "__uuid__": "a6e448fc-92fa-40bc-8613-7523f1307c3d" 151 | } 152 | }, 153 | { 154 | "__type__": "cc.PrefabInfo", 155 | "root": { 156 | "__id__": 1 157 | }, 158 | "asset": null, 159 | "fileId": "e9debDgjTxJPpXPytCc0Y5v" 160 | }, 161 | { 162 | "__type__": "cc.Node", 163 | "_name": "avatar-mask", 164 | "_objFlags": 0, 165 | "_opacity": 255, 166 | "_color": { 167 | "__type__": "cc.Color", 168 | "r": 255, 169 | "g": 255, 170 | "b": 255, 171 | "a": 255 172 | }, 173 | "_cascadeOpacityEnabled": true, 174 | "_parent": { 175 | "__id__": 1 176 | }, 177 | "_anchorPoint": { 178 | "__type__": "cc.Vec2", 179 | "x": 0.5, 180 | "y": 0.5 181 | }, 182 | "_contentSize": { 183 | "__type__": "cc.Size", 184 | "width": 50, 185 | "height": 50 186 | }, 187 | "_children": [ 188 | { 189 | "__id__": 6 190 | } 191 | ], 192 | "_rotationX": 0, 193 | "_rotationY": 0, 194 | "_scaleX": 1, 195 | "_scaleY": 1, 196 | "_position": { 197 | "__type__": "cc.Vec2", 198 | "x": -144, 199 | "y": 0 200 | }, 201 | "_skewX": 0, 202 | "_skewY": 0, 203 | "_localZOrder": 0, 204 | "_globalZOrder": 0, 205 | "_tag": -1, 206 | "_opacityModifyRGB": false, 207 | "_reorderChildDirty": false, 208 | "_id": "", 209 | "_active": true, 210 | "_components": [ 211 | { 212 | "__id__": 9 213 | } 214 | ], 215 | "_prefab": { 216 | "__id__": 10 217 | } 218 | }, 219 | { 220 | "__type__": "cc.Node", 221 | "_name": "avatar", 222 | "_objFlags": 0, 223 | "_opacity": 255, 224 | "_color": { 225 | "__type__": "cc.Color", 226 | "r": 255, 227 | "g": 255, 228 | "b": 255, 229 | "a": 255 230 | }, 231 | "_cascadeOpacityEnabled": true, 232 | "_parent": { 233 | "__id__": 5 234 | }, 235 | "_anchorPoint": { 236 | "__type__": "cc.Vec2", 237 | "x": 0.5, 238 | "y": 0.5 239 | }, 240 | "_contentSize": { 241 | "__type__": "cc.Size", 242 | "width": 55, 243 | "height": 55 244 | }, 245 | "_children": [], 246 | "_rotationX": 0, 247 | "_rotationY": 0, 248 | "_scaleX": 1, 249 | "_scaleY": 1, 250 | "_position": { 251 | "__type__": "cc.Vec2", 252 | "x": 0, 253 | "y": 0 254 | }, 255 | "_skewX": 0, 256 | "_skewY": 0, 257 | "_localZOrder": 0, 258 | "_globalZOrder": 0, 259 | "_tag": -1, 260 | "_opacityModifyRGB": false, 261 | "_reorderChildDirty": false, 262 | "_id": "", 263 | "_active": true, 264 | "_components": [ 265 | { 266 | "__id__": 7 267 | } 268 | ], 269 | "_prefab": { 270 | "__id__": 8 271 | } 272 | }, 273 | { 274 | "__type__": "cc.Sprite", 275 | "_name": "", 276 | "_objFlags": 0, 277 | "node": { 278 | "__id__": 6 279 | }, 280 | "_enabled": true, 281 | "_spriteFrame": { 282 | "__uuid__": "ee5e3c03-9532-4292-b4e0-fd0e940fdba0" 283 | }, 284 | "_type": 0, 285 | "_sizeMode": 0, 286 | "_fillType": 0, 287 | "_fillCenter": { 288 | "__type__": "cc.Vec2", 289 | "x": 0, 290 | "y": 0 291 | }, 292 | "_fillStart": 0, 293 | "_fillRange": 0, 294 | "_isTrimmedMode": true, 295 | "_srcBlendFactor": 770, 296 | "_dstBlendFactor": 771, 297 | "_atlas": null 298 | }, 299 | { 300 | "__type__": "cc.PrefabInfo", 301 | "root": { 302 | "__id__": 1 303 | }, 304 | "asset": null, 305 | "fileId": "23dc6UmpGtK8rT+337dBwgg" 306 | }, 307 | { 308 | "__type__": "cc.Mask", 309 | "_name": "", 310 | "_objFlags": 0, 311 | "node": { 312 | "__id__": 5 313 | }, 314 | "_enabled": true, 315 | "_type": 1, 316 | "_segements": 300 317 | }, 318 | { 319 | "__type__": "cc.PrefabInfo", 320 | "root": { 321 | "__id__": 1 322 | }, 323 | "asset": null, 324 | "fileId": "6f805EfdVpNb7aAu6UM1p5O" 325 | }, 326 | { 327 | "__type__": "cc.Node", 328 | "_name": "name", 329 | "_objFlags": 0, 330 | "_opacity": 255, 331 | "_color": { 332 | "__type__": "cc.Color", 333 | "r": 88, 334 | "g": 88, 335 | "b": 88, 336 | "a": 255 337 | }, 338 | "_cascadeOpacityEnabled": true, 339 | "_parent": { 340 | "__id__": 1 341 | }, 342 | "_anchorPoint": { 343 | "__type__": "cc.Vec2", 344 | "x": 0, 345 | "y": 0.5 346 | }, 347 | "_contentSize": { 348 | "__type__": "cc.Size", 349 | "width": 437.34, 350 | "height": 70 351 | }, 352 | "_children": [], 353 | "_rotationX": 0, 354 | "_rotationY": 0, 355 | "_scaleX": 0.5, 356 | "_scaleY": 0.5, 357 | "_position": { 358 | "__type__": "cc.Vec2", 359 | "x": -87, 360 | "y": 0 361 | }, 362 | "_skewX": 0, 363 | "_skewY": 0, 364 | "_localZOrder": 0, 365 | "_globalZOrder": 0, 366 | "_tag": -1, 367 | "_opacityModifyRGB": false, 368 | "_reorderChildDirty": false, 369 | "_id": "", 370 | "_active": true, 371 | "_components": [ 372 | { 373 | "__id__": 12 374 | } 375 | ], 376 | "_prefab": { 377 | "__id__": 13 378 | } 379 | }, 380 | { 381 | "__type__": "cc.Label", 382 | "_name": "", 383 | "_objFlags": 0, 384 | "node": { 385 | "__id__": 11 386 | }, 387 | "_enabled": true, 388 | "_useOriginalSize": false, 389 | "_fontSize": 64, 390 | "_lineHeight": 70, 391 | "_enableWrapText": true, 392 | "_isSystemFontUsed": true, 393 | "_N$string": "听说你很能大...", 394 | "_N$horizontalAlign": 0, 395 | "_N$verticalAlign": 1, 396 | "_N$overflow": 0 397 | }, 398 | { 399 | "__type__": "cc.PrefabInfo", 400 | "root": { 401 | "__id__": 1 402 | }, 403 | "asset": null, 404 | "fileId": "ca023RtCu5J9IanrA57euUh" 405 | }, 406 | { 407 | "__type__": "cc.Node", 408 | "_name": "grade", 409 | "_objFlags": 0, 410 | "_opacity": 255, 411 | "_color": { 412 | "__type__": "cc.Color", 413 | "r": 171, 414 | "g": 171, 415 | "b": 171, 416 | "a": 255 417 | }, 418 | "_cascadeOpacityEnabled": true, 419 | "_parent": { 420 | "__id__": 1 421 | }, 422 | "_anchorPoint": { 423 | "__type__": "cc.Vec2", 424 | "x": 1, 425 | "y": 0.5 426 | }, 427 | "_contentSize": { 428 | "__type__": "cc.Size", 429 | "width": 108.58, 430 | "height": 60 431 | }, 432 | "_children": [], 433 | "_rotationX": 0, 434 | "_rotationY": 0, 435 | "_scaleX": 0.5, 436 | "_scaleY": 0.5, 437 | "_position": { 438 | "__type__": "cc.Vec2", 439 | "x": 227, 440 | "y": 0 441 | }, 442 | "_skewX": 0, 443 | "_skewY": 0, 444 | "_localZOrder": 0, 445 | "_globalZOrder": 0, 446 | "_tag": -1, 447 | "_opacityModifyRGB": false, 448 | "_reorderChildDirty": false, 449 | "_id": "", 450 | "_active": true, 451 | "_components": [ 452 | { 453 | "__id__": 15 454 | } 455 | ], 456 | "_prefab": { 457 | "__id__": 16 458 | } 459 | }, 460 | { 461 | "__type__": "cc.Label", 462 | "_name": "", 463 | "_objFlags": 0, 464 | "node": { 465 | "__id__": 14 466 | }, 467 | "_enabled": true, 468 | "_useOriginalSize": false, 469 | "_fontSize": 52, 470 | "_lineHeight": 60, 471 | "_enableWrapText": true, 472 | "_isSystemFontUsed": false, 473 | "_N$string": "1000", 474 | "_N$horizontalAlign": 2, 475 | "_N$verticalAlign": 1, 476 | "_N$overflow": 0, 477 | "_N$file": { 478 | "__uuid__": "a6e448fc-92fa-40bc-8613-7523f1307c3d" 479 | } 480 | }, 481 | { 482 | "__type__": "cc.PrefabInfo", 483 | "root": { 484 | "__id__": 1 485 | }, 486 | "asset": null, 487 | "fileId": "a022490Cr5M95FNnAASkIyd" 488 | }, 489 | { 490 | "__type__": "cc.Sprite", 491 | "_name": "", 492 | "_objFlags": 0, 493 | "node": { 494 | "__id__": 1 495 | }, 496 | "_enabled": true, 497 | "_spriteFrame": { 498 | "__uuid__": "71c8397a-6ce4-4cc9-ac73-cf8377acd6a6" 499 | }, 500 | "_type": 0, 501 | "_sizeMode": 0, 502 | "_fillType": 0, 503 | "_fillCenter": { 504 | "__type__": "cc.Vec2", 505 | "x": 0, 506 | "y": 0 507 | }, 508 | "_fillStart": 0, 509 | "_fillRange": 0, 510 | "_isTrimmedMode": true, 511 | "_srcBlendFactor": 770, 512 | "_dstBlendFactor": 771, 513 | "_atlas": null 514 | }, 515 | { 516 | "__type__": "6d33fm8MRZPTIpaQiW68fDJ", 517 | "_name": "", 518 | "_objFlags": 0, 519 | "node": { 520 | "__id__": 1 521 | }, 522 | "_enabled": true, 523 | "order": { 524 | "__id__": 3 525 | }, 526 | "avatar": { 527 | "__id__": 7 528 | }, 529 | "nickName": { 530 | "__id__": 12 531 | }, 532 | "grade": { 533 | "__id__": 15 534 | } 535 | }, 536 | { 537 | "__type__": "cc.PrefabInfo", 538 | "root": { 539 | "__id__": 1 540 | }, 541 | "asset": null, 542 | "fileId": "e6694GXA4FGSo+4eF7rx1s+" 543 | } 544 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/order/board-item.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "4fa9305d-6ca8-44ba-900e-a70e9a9cb6a0", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/boardItem.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | order:cc.Label, 6 | avatar:cc.Sprite, 7 | nickName:cc.Label, 8 | grade:cc.Label, 9 | }, 10 | 11 | // use this for initialization 12 | onLoad: function () { 13 | 14 | }, 15 | 16 | init: function(params){ 17 | this.order.string = params.order; 18 | if(params.order > 3){ 19 | this.order.node.color = cc.Color.GRAY; 20 | } 21 | this.avatar.spriteFrame = new cc.SpriteFrame(params.avatar,cc.Rect(0,0,50,50)); 22 | this.nickName.string = this.get6Words(params.name); 23 | this.grade.string = params.score; 24 | }, 25 | 26 | get6Words:function(val){ 27 | //转义val中的特殊字符 28 | var elem = document.createElement('textarea'); 29 | elem.innerHTML = val; 30 | val = elem.value; 31 | var last = ''; 32 | if(val.length > 6){ 33 | last = '...'; 34 | } 35 | 36 | var total_charactor = 12; 37 | var len = 0; 38 | for(var i = 0; i < val.length; i++) { 39 | var a = val.charAt(i); 40 | if(a.match(/[^\x00-\xff]/ig) != null){ 41 | len += 2; 42 | }else{ 43 | len += 1; 44 | } 45 | 46 | if(len>total_charactor){ 47 | return val.substr(0,i) + last; 48 | }else if(len == total_charactor){ 49 | return val.substr(0,i+1) + last; 50 | } 51 | } 52 | if(len (this.board.x - this.board.width/2) && this.touchNodePos.x < (this.board.x + this.board.width/2) && this.touchNodePos.y > (this.board.y - this.board.height/2) && this.touchNodePos.y < (this.board.y + this.board.height/2) ){ 23 | return; 24 | } 25 | e.stopPropagation(); 26 | console.log('click mask'); 27 | this.hide(); 28 | }, 29 | 30 | _onTouchTabLeft:function(){ 31 | console.log('touch left'); 32 | this.fLayout.active = false; 33 | this.tabRight.children[0].color = new cc.Color(153,153,153,255); 34 | this.layout.active = true; 35 | this.tabLeft.children[0].color = new cc.Color(60,60,60,255); 36 | }, 37 | 38 | _onTouchTabRight:function(){ 39 | console.log('touch right'); 40 | this.layout.active = false; 41 | this.tabLeft.children[0].color = new cc.Color(153,153,153,255); 42 | this.fLayout.active = true; 43 | this.tabRight.children[0].color = new cc.Color(60,60,60,255); 44 | }, 45 | 46 | prepare: function () { 47 | var afterDown = cc.callFunc(this.onDownFinish,this); 48 | var afterUp = cc.callFunc(this.onUpFinish,this); 49 | this.easeDown = cc.moveTo(this.duration, cc.p(0, 0)).easing(cc. easeCubicActionOut()); 50 | this.easeUp = cc.moveTo(this.duration, cc.p(0,1000)).easing(cc. easeCubicActionIn());//easeCubicActionIn 51 | this.actionDown = cc.sequence( cc.spawn(cc.fadeTo(this.duration, 255), this.easeDown),afterDown ); 52 | this.actionUp = cc.sequence( cc.spawn(cc.fadeTo(this.duration, 0), this.easeUp),afterUp ) ; 53 | this.mask.on(cc.Node.EventType.TOUCH_START, this._onTouchMask, this); 54 | cc.eventManager.pauseTarget(this.mask,true); 55 | }, 56 | init:function(list,friendList){//[{},{}] 57 | console.log('enter init in popout.js'); 58 | this.prepare(); 59 | console.log('popout.js init',list); 60 | this.list = []; 61 | this.friendList = []; 62 | for(var item in list){ 63 | var prefab = cc.instantiate(this.prefabItem); 64 | var obj = list[item]; 65 | obj.order = parseInt(item) + 1; 66 | prefab.getComponent('boardItem').init(obj); 67 | //this.layout.addChild(prefab); 68 | this.list.push(prefab); 69 | } 70 | 71 | for(var item in friendList){ 72 | var prefab = cc.instantiate(this.prefabItem); 73 | var obj = friendList[item]; 74 | obj.order = parseInt(item) + 1; 75 | prefab.getComponent('boardItem').init(obj); 76 | //this.layout.addChild(prefab); 77 | this.friendList.push(prefab); 78 | } 79 | this.layout.active = false; 80 | }, 81 | 82 | fresh:function(list){ 83 | for(var item in list){ 84 | list[item].order = parseInt(item) + 1; 85 | if(this.list[item]){ 86 | this.list[item].getComponent('boardItem').init(list[item]); 87 | }else{ 88 | var prefab = cc.instantiate(this.prefabItem); 89 | prefab.getComponent('boardItem').init(list[item]); 90 | //this.layout.addChild(prefab); 91 | this.list.push(prefab); 92 | } 93 | } 94 | }, 95 | show:function(){ 96 | //this.prepare(); 97 | this.board.position = cc.p(0,1000); 98 | //this.mask.opacity = 0; 99 | this.node.active = true; 100 | this.board.runAction(this.actionDown); 101 | //this.mask.opacity = 50; 102 | this.mask.runAction(cc.fadeTo(this.duration,50)); 103 | //this.node.setScale(2); 104 | //this.node.opacity = 0; 105 | //this.node.runAction(this.actionFadeIn); 106 | }, 107 | 108 | hide:function(){ 109 | //cc.eventManager.pauseTarget(this.node, true); 110 | //this.node.runAction(this.actionFadeOut); 111 | //this.node.position = cc.p(1200, 480); 112 | this.layout.active = false; 113 | this.layout.removeAllChildren(); 114 | this.fLayout.active = false; 115 | this.fLayout.removeAllChildren(); 116 | //this.mask.opacity = 0; 117 | this.board.runAction(this.actionUp); 118 | this.mask.runAction(cc.fadeTo(this.duration,0)); 119 | }, 120 | test:function(){ 121 | console.log('i am test in popout.js'); 122 | }, 123 | renderLayout:function(){ 124 | for(var prefab in this.list){ 125 | this.layout.addChild(this.list[prefab]); 126 | } 127 | 128 | for(var prefab in this.friendList){ 129 | this.fLayout.addChild(this.friendList[prefab]); 130 | } 131 | }, 132 | onDownFinish:function(){ 133 | //cc.eventManager.resumeTarget(this.node, true); 134 | this.renderLayout(); 135 | this.layout.active = true; 136 | cc.eventManager.resumeTarget(this.mask,true); 137 | }, 138 | 139 | onUpFinish:function(){ 140 | this.node.active = false; 141 | cc.eventManager.pauseTarget(this.mask,true); 142 | } 143 | }); 144 | -------------------------------------------------------------------------------- /CCHexagon/assets/order/popout.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "bc16a6bb-7547-4be0-a0c1-58fc4d34cc90", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/popout.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "data": { 7 | "__id__": 1 8 | } 9 | }, 10 | { 11 | "__type__": "cc.Node", 12 | "_name": "popout", 13 | "_objFlags": 0, 14 | "_opacity": 255, 15 | "_color": { 16 | "__type__": "cc.Color", 17 | "r": 255, 18 | "g": 255, 19 | "b": 255, 20 | "a": 255 21 | }, 22 | "_cascadeOpacityEnabled": true, 23 | "_parent": null, 24 | "_anchorPoint": { 25 | "__type__": "cc.Vec2", 26 | "x": 0.5, 27 | "y": 0.5 28 | }, 29 | "_contentSize": { 30 | "__type__": "cc.Size", 31 | "width": 0, 32 | "height": 0 33 | }, 34 | "_children": [ 35 | { 36 | "__id__": 2 37 | }, 38 | { 39 | "__id__": 5 40 | } 41 | ], 42 | "_rotationX": 0, 43 | "_rotationY": 0, 44 | "_scaleX": 1, 45 | "_scaleY": 1, 46 | "_position": { 47 | "__type__": "cc.Vec2", 48 | "x": 0, 49 | "y": 0 50 | }, 51 | "_skewX": 0, 52 | "_skewY": 0, 53 | "_localZOrder": 0, 54 | "_globalZOrder": 0, 55 | "_tag": -1, 56 | "_opacityModifyRGB": false, 57 | "_reorderChildDirty": false, 58 | "_id": "", 59 | "_active": true, 60 | "_components": [ 61 | { 62 | "__id__": 28 63 | }, 64 | { 65 | "__id__": 29 66 | } 67 | ], 68 | "_prefab": { 69 | "__id__": 30 70 | } 71 | }, 72 | { 73 | "__type__": "cc.Node", 74 | "_name": "mask", 75 | "_objFlags": 0, 76 | "_opacity": 50, 77 | "_color": { 78 | "__type__": "cc.Color", 79 | "r": 255, 80 | "g": 255, 81 | "b": 255, 82 | "a": 255 83 | }, 84 | "_cascadeOpacityEnabled": true, 85 | "_parent": { 86 | "__id__": 1 87 | }, 88 | "_anchorPoint": { 89 | "__type__": "cc.Vec2", 90 | "x": 0.5, 91 | "y": 0.5 92 | }, 93 | "_contentSize": { 94 | "__type__": "cc.Size", 95 | "width": 1000, 96 | "height": 1500 97 | }, 98 | "_children": [], 99 | "_rotationX": 0, 100 | "_rotationY": 0, 101 | "_scaleX": 1, 102 | "_scaleY": 1, 103 | "_position": { 104 | "__type__": "cc.Vec2", 105 | "x": 0, 106 | "y": 0 107 | }, 108 | "_skewX": 0, 109 | "_skewY": 0, 110 | "_localZOrder": 0, 111 | "_globalZOrder": 0, 112 | "_tag": -1, 113 | "_opacityModifyRGB": false, 114 | "_reorderChildDirty": false, 115 | "_id": "", 116 | "_active": true, 117 | "_components": [ 118 | { 119 | "__id__": 3 120 | } 121 | ], 122 | "_prefab": { 123 | "__id__": 4 124 | } 125 | }, 126 | { 127 | "__type__": "cc.Sprite", 128 | "_name": "", 129 | "_objFlags": 0, 130 | "node": { 131 | "__id__": 2 132 | }, 133 | "_enabled": true, 134 | "_spriteFrame": { 135 | "__uuid__": "6343c288-1aa0-40bd-9612-cb5bcb9be8da" 136 | }, 137 | "_type": 0, 138 | "_sizeMode": 0, 139 | "_fillType": 0, 140 | "_fillCenter": { 141 | "__type__": "cc.Vec2", 142 | "x": 0, 143 | "y": 0 144 | }, 145 | "_fillStart": 0, 146 | "_fillRange": 0, 147 | "_isTrimmedMode": true, 148 | "_srcBlendFactor": 770, 149 | "_dstBlendFactor": 771, 150 | "_atlas": null 151 | }, 152 | { 153 | "__type__": "cc.PrefabInfo", 154 | "root": { 155 | "__id__": 1 156 | }, 157 | "asset": null, 158 | "fileId": "63b9fylt5pKfIkyWePOBTsE" 159 | }, 160 | { 161 | "__type__": "cc.Node", 162 | "_name": "board", 163 | "_objFlags": 0, 164 | "_opacity": 255, 165 | "_color": { 166 | "__type__": "cc.Color", 167 | "r": 255, 168 | "g": 255, 169 | "b": 255, 170 | "a": 255 171 | }, 172 | "_cascadeOpacityEnabled": true, 173 | "_parent": { 174 | "__id__": 1 175 | }, 176 | "_anchorPoint": { 177 | "__type__": "cc.Vec2", 178 | "x": 0.5, 179 | "y": 0.5 180 | }, 181 | "_contentSize": { 182 | "__type__": "cc.Size", 183 | "width": 540, 184 | "height": 840 185 | }, 186 | "_children": [ 187 | { 188 | "__id__": 6 189 | }, 190 | { 191 | "__id__": 12 192 | }, 193 | { 194 | "__id__": 18 195 | }, 196 | { 197 | "__id__": 22 198 | } 199 | ], 200 | "_rotationX": 0, 201 | "_rotationY": 0, 202 | "_scaleX": 1, 203 | "_scaleY": 1, 204 | "_position": { 205 | "__type__": "cc.Vec2", 206 | "x": 0, 207 | "y": 0 208 | }, 209 | "_skewX": 0, 210 | "_skewY": 0, 211 | "_localZOrder": 0, 212 | "_globalZOrder": 0, 213 | "_tag": -1, 214 | "_opacityModifyRGB": false, 215 | "_reorderChildDirty": false, 216 | "_id": "", 217 | "_active": true, 218 | "_components": [ 219 | { 220 | "__id__": 26 221 | } 222 | ], 223 | "_prefab": { 224 | "__id__": 27 225 | } 226 | }, 227 | { 228 | "__type__": "cc.Node", 229 | "_name": "tabLeft", 230 | "_objFlags": 0, 231 | "_opacity": 255, 232 | "_color": { 233 | "__type__": "cc.Color", 234 | "r": 255, 235 | "g": 255, 236 | "b": 255, 237 | "a": 255 238 | }, 239 | "_cascadeOpacityEnabled": true, 240 | "_parent": { 241 | "__id__": 5 242 | }, 243 | "_anchorPoint": { 244 | "__type__": "cc.Vec2", 245 | "x": 0.5, 246 | "y": 0.5 247 | }, 248 | "_contentSize": { 249 | "__type__": "cc.Size", 250 | "width": 270, 251 | "height": 70 252 | }, 253 | "_children": [ 254 | { 255 | "__id__": 7 256 | } 257 | ], 258 | "_rotationX": 0, 259 | "_rotationY": 0, 260 | "_scaleX": 1, 261 | "_scaleY": 1, 262 | "_position": { 263 | "__type__": "cc.Vec2", 264 | "x": -134.8, 265 | "y": 377 266 | }, 267 | "_skewX": 0, 268 | "_skewY": 0, 269 | "_localZOrder": 0, 270 | "_globalZOrder": 0, 271 | "_tag": -1, 272 | "_opacityModifyRGB": false, 273 | "_reorderChildDirty": false, 274 | "_id": "", 275 | "_active": true, 276 | "_components": [ 277 | { 278 | "__id__": 10 279 | } 280 | ], 281 | "_prefab": { 282 | "__id__": 11 283 | } 284 | }, 285 | { 286 | "__type__": "cc.Node", 287 | "_name": "title", 288 | "_objFlags": 0, 289 | "_opacity": 255, 290 | "_color": { 291 | "__type__": "cc.Color", 292 | "r": 60, 293 | "g": 60, 294 | "b": 60, 295 | "a": 255 296 | }, 297 | "_cascadeOpacityEnabled": true, 298 | "_parent": { 299 | "__id__": 6 300 | }, 301 | "_anchorPoint": { 302 | "__type__": "cc.Vec2", 303 | "x": 0.5, 304 | "y": 0.5 305 | }, 306 | "_contentSize": { 307 | "__type__": "cc.Size", 308 | "width": 130, 309 | "height": 26 310 | }, 311 | "_children": [], 312 | "_rotationX": 0, 313 | "_rotationY": 0, 314 | "_scaleX": 1, 315 | "_scaleY": 1, 316 | "_position": { 317 | "__type__": "cc.Vec2", 318 | "x": 0, 319 | "y": 0 320 | }, 321 | "_skewX": 0, 322 | "_skewY": 0, 323 | "_localZOrder": 0, 324 | "_globalZOrder": 0, 325 | "_tag": -1, 326 | "_opacityModifyRGB": false, 327 | "_reorderChildDirty": false, 328 | "_id": "", 329 | "_active": true, 330 | "_components": [ 331 | { 332 | "__id__": 8 333 | } 334 | ], 335 | "_prefab": { 336 | "__id__": 9 337 | } 338 | }, 339 | { 340 | "__type__": "cc.Label", 341 | "_name": "", 342 | "_objFlags": 0, 343 | "node": { 344 | "__id__": 7 345 | }, 346 | "_enabled": true, 347 | "_useOriginalSize": false, 348 | "_fontSize": 26, 349 | "_lineHeight": 26, 350 | "_enableWrapText": true, 351 | "_isSystemFontUsed": true, 352 | "_N$string": "每周排行榜", 353 | "_N$horizontalAlign": 1, 354 | "_N$verticalAlign": 1, 355 | "_N$overflow": 0 356 | }, 357 | { 358 | "__type__": "cc.PrefabInfo", 359 | "root": { 360 | "__id__": 1 361 | }, 362 | "asset": null, 363 | "fileId": "9bb63zu3XJCl7fKKsSjL42V" 364 | }, 365 | { 366 | "__type__": "cc.Sprite", 367 | "_name": "", 368 | "_objFlags": 0, 369 | "node": { 370 | "__id__": 6 371 | }, 372 | "_enabled": true, 373 | "_spriteFrame": { 374 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 375 | }, 376 | "_type": 0, 377 | "_sizeMode": 0, 378 | "_fillType": 0, 379 | "_fillCenter": { 380 | "__type__": "cc.Vec2", 381 | "x": 0, 382 | "y": 0 383 | }, 384 | "_fillStart": 0, 385 | "_fillRange": 0, 386 | "_isTrimmedMode": true, 387 | "_srcBlendFactor": 770, 388 | "_dstBlendFactor": 771, 389 | "_atlas": null 390 | }, 391 | { 392 | "__type__": "cc.PrefabInfo", 393 | "root": { 394 | "__id__": 1 395 | }, 396 | "asset": null, 397 | "fileId": "661c9eE/rxMsaEOwGawhBzr" 398 | }, 399 | { 400 | "__type__": "cc.Node", 401 | "_name": "tabRight", 402 | "_objFlags": 0, 403 | "_opacity": 255, 404 | "_color": { 405 | "__type__": "cc.Color", 406 | "r": 255, 407 | "g": 255, 408 | "b": 255, 409 | "a": 255 410 | }, 411 | "_cascadeOpacityEnabled": true, 412 | "_parent": { 413 | "__id__": 5 414 | }, 415 | "_anchorPoint": { 416 | "__type__": "cc.Vec2", 417 | "x": 0.5, 418 | "y": 0.5 419 | }, 420 | "_contentSize": { 421 | "__type__": "cc.Size", 422 | "width": 270, 423 | "height": 70 424 | }, 425 | "_children": [ 426 | { 427 | "__id__": 13 428 | } 429 | ], 430 | "_rotationX": 0, 431 | "_rotationY": 0, 432 | "_scaleX": 1, 433 | "_scaleY": 1, 434 | "_position": { 435 | "__type__": "cc.Vec2", 436 | "x": 134.8, 437 | "y": 377.1 438 | }, 439 | "_skewX": 0, 440 | "_skewY": 0, 441 | "_localZOrder": 0, 442 | "_globalZOrder": 0, 443 | "_tag": -1, 444 | "_opacityModifyRGB": false, 445 | "_reorderChildDirty": false, 446 | "_id": "", 447 | "_active": true, 448 | "_components": [ 449 | { 450 | "__id__": 16 451 | } 452 | ], 453 | "_prefab": { 454 | "__id__": 17 455 | } 456 | }, 457 | { 458 | "__type__": "cc.Node", 459 | "_name": "title", 460 | "_objFlags": 0, 461 | "_opacity": 255, 462 | "_color": { 463 | "__type__": "cc.Color", 464 | "r": 153, 465 | "g": 153, 466 | "b": 153, 467 | "a": 255 468 | }, 469 | "_cascadeOpacityEnabled": true, 470 | "_parent": { 471 | "__id__": 12 472 | }, 473 | "_anchorPoint": { 474 | "__type__": "cc.Vec2", 475 | "x": 0.5, 476 | "y": 0.5 477 | }, 478 | "_contentSize": { 479 | "__type__": "cc.Size", 480 | "width": 130, 481 | "height": 26 482 | }, 483 | "_children": [], 484 | "_rotationX": 0, 485 | "_rotationY": 0, 486 | "_scaleX": 1, 487 | "_scaleY": 1, 488 | "_position": { 489 | "__type__": "cc.Vec2", 490 | "x": 0, 491 | "y": 0 492 | }, 493 | "_skewX": 0, 494 | "_skewY": 0, 495 | "_localZOrder": 0, 496 | "_globalZOrder": 0, 497 | "_tag": -1, 498 | "_opacityModifyRGB": false, 499 | "_reorderChildDirty": false, 500 | "_id": "", 501 | "_active": true, 502 | "_components": [ 503 | { 504 | "__id__": 14 505 | } 506 | ], 507 | "_prefab": { 508 | "__id__": 15 509 | } 510 | }, 511 | { 512 | "__type__": "cc.Label", 513 | "_name": "", 514 | "_objFlags": 0, 515 | "node": { 516 | "__id__": 13 517 | }, 518 | "_enabled": true, 519 | "_useOriginalSize": false, 520 | "_fontSize": 26, 521 | "_lineHeight": 26, 522 | "_enableWrapText": true, 523 | "_isSystemFontUsed": true, 524 | "_N$string": "好友排行榜", 525 | "_N$horizontalAlign": 1, 526 | "_N$verticalAlign": 1, 527 | "_N$overflow": 0 528 | }, 529 | { 530 | "__type__": "cc.PrefabInfo", 531 | "root": { 532 | "__id__": 1 533 | }, 534 | "asset": null, 535 | "fileId": "92910j7R1hHI5eD9SXq5VJB" 536 | }, 537 | { 538 | "__type__": "cc.Sprite", 539 | "_name": "", 540 | "_objFlags": 0, 541 | "node": { 542 | "__id__": 12 543 | }, 544 | "_enabled": true, 545 | "_spriteFrame": { 546 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 547 | }, 548 | "_type": 0, 549 | "_sizeMode": 0, 550 | "_fillType": 0, 551 | "_fillCenter": { 552 | "__type__": "cc.Vec2", 553 | "x": 0, 554 | "y": 0 555 | }, 556 | "_fillStart": 0, 557 | "_fillRange": 0, 558 | "_isTrimmedMode": true, 559 | "_srcBlendFactor": 770, 560 | "_dstBlendFactor": 771, 561 | "_atlas": null 562 | }, 563 | { 564 | "__type__": "cc.PrefabInfo", 565 | "root": { 566 | "__id__": 1 567 | }, 568 | "asset": null, 569 | "fileId": "c13fbNrOVNKWp+zLkeeYdat" 570 | }, 571 | { 572 | "__type__": "cc.Node", 573 | "_name": "layout", 574 | "_objFlags": 0, 575 | "_opacity": 255, 576 | "_color": { 577 | "__type__": "cc.Color", 578 | "r": 255, 579 | "g": 255, 580 | "b": 255, 581 | "a": 255 582 | }, 583 | "_cascadeOpacityEnabled": true, 584 | "_parent": { 585 | "__id__": 5 586 | }, 587 | "_anchorPoint": { 588 | "__type__": "cc.Vec2", 589 | "x": 0.5, 590 | "y": 1 591 | }, 592 | "_contentSize": { 593 | "__type__": "cc.Size", 594 | "width": 540, 595 | "height": 750 596 | }, 597 | "_children": [], 598 | "_rotationX": 0, 599 | "_rotationY": 0, 600 | "_scaleX": 1, 601 | "_scaleY": 1, 602 | "_position": { 603 | "__type__": "cc.Vec2", 604 | "x": 0, 605 | "y": 340 606 | }, 607 | "_skewX": 0, 608 | "_skewY": 0, 609 | "_localZOrder": 0, 610 | "_globalZOrder": 0, 611 | "_tag": -1, 612 | "_opacityModifyRGB": false, 613 | "_reorderChildDirty": false, 614 | "_id": "", 615 | "_active": true, 616 | "_components": [ 617 | { 618 | "__id__": 19 619 | }, 620 | { 621 | "__id__": 20 622 | } 623 | ], 624 | "_prefab": { 625 | "__id__": 21 626 | } 627 | }, 628 | { 629 | "__type__": "cc.Sprite", 630 | "_name": "", 631 | "_objFlags": 0, 632 | "node": { 633 | "__id__": 18 634 | }, 635 | "_enabled": true, 636 | "_spriteFrame": null, 637 | "_type": 1, 638 | "_sizeMode": 0, 639 | "_fillType": 0, 640 | "_fillCenter": { 641 | "__type__": "cc.Vec2", 642 | "x": 0, 643 | "y": 0 644 | }, 645 | "_fillStart": 0, 646 | "_fillRange": 0, 647 | "_isTrimmedMode": true, 648 | "_srcBlendFactor": 770, 649 | "_dstBlendFactor": 771, 650 | "_atlas": null 651 | }, 652 | { 653 | "__type__": "cc.Layout", 654 | "_name": "", 655 | "_objFlags": 0, 656 | "node": { 657 | "__id__": 18 658 | }, 659 | "_enabled": true, 660 | "_layoutSize": { 661 | "__type__": "cc.Size", 662 | "width": 540, 663 | "height": 750 664 | }, 665 | "_resize": 0, 666 | "_N$layoutType": 2, 667 | "_N$cellSize": { 668 | "__type__": "cc.Size", 669 | "width": 40, 670 | "height": 40 671 | }, 672 | "_N$startAxis": 0, 673 | "_N$padding": 1, 674 | "_N$spacingX": 0, 675 | "_N$spacingY": 2, 676 | "_N$verticalDirection": 1, 677 | "_N$horizontalDirection": 0 678 | }, 679 | { 680 | "__type__": "cc.PrefabInfo", 681 | "root": { 682 | "__id__": 1 683 | }, 684 | "asset": null, 685 | "fileId": "02172LTJuREuYJQCPMvnYlV" 686 | }, 687 | { 688 | "__type__": "cc.Node", 689 | "_name": "fLayout", 690 | "_objFlags": 0, 691 | "_opacity": 255, 692 | "_color": { 693 | "__type__": "cc.Color", 694 | "r": 255, 695 | "g": 255, 696 | "b": 255, 697 | "a": 255 698 | }, 699 | "_cascadeOpacityEnabled": true, 700 | "_parent": { 701 | "__id__": 5 702 | }, 703 | "_anchorPoint": { 704 | "__type__": "cc.Vec2", 705 | "x": 0.5, 706 | "y": 1 707 | }, 708 | "_contentSize": { 709 | "__type__": "cc.Size", 710 | "width": 540, 711 | "height": 750 712 | }, 713 | "_children": [], 714 | "_rotationX": 0, 715 | "_rotationY": 0, 716 | "_scaleX": 1, 717 | "_scaleY": 1, 718 | "_position": { 719 | "__type__": "cc.Vec2", 720 | "x": 0, 721 | "y": 340 722 | }, 723 | "_skewX": 0, 724 | "_skewY": 0, 725 | "_localZOrder": 0, 726 | "_globalZOrder": 0, 727 | "_tag": -1, 728 | "_opacityModifyRGB": false, 729 | "_reorderChildDirty": false, 730 | "_id": "", 731 | "_active": false, 732 | "_components": [ 733 | { 734 | "__id__": 23 735 | }, 736 | { 737 | "__id__": 24 738 | } 739 | ], 740 | "_prefab": { 741 | "__id__": 25 742 | } 743 | }, 744 | { 745 | "__type__": "cc.Sprite", 746 | "_name": "", 747 | "_objFlags": 0, 748 | "node": { 749 | "__id__": 22 750 | }, 751 | "_enabled": true, 752 | "_spriteFrame": null, 753 | "_type": 1, 754 | "_sizeMode": 0, 755 | "_fillType": 0, 756 | "_fillCenter": { 757 | "__type__": "cc.Vec2", 758 | "x": 0, 759 | "y": 0 760 | }, 761 | "_fillStart": 0, 762 | "_fillRange": 0, 763 | "_isTrimmedMode": true, 764 | "_srcBlendFactor": 770, 765 | "_dstBlendFactor": 771, 766 | "_atlas": null 767 | }, 768 | { 769 | "__type__": "cc.Layout", 770 | "_name": "", 771 | "_objFlags": 0, 772 | "node": { 773 | "__id__": 22 774 | }, 775 | "_enabled": true, 776 | "_layoutSize": { 777 | "__type__": "cc.Size", 778 | "width": 540, 779 | "height": 750 780 | }, 781 | "_resize": 0, 782 | "_N$layoutType": 2, 783 | "_N$cellSize": { 784 | "__type__": "cc.Size", 785 | "width": 40, 786 | "height": 40 787 | }, 788 | "_N$startAxis": 0, 789 | "_N$padding": 1, 790 | "_N$spacingX": 0, 791 | "_N$spacingY": 2, 792 | "_N$verticalDirection": 1, 793 | "_N$horizontalDirection": 0 794 | }, 795 | { 796 | "__type__": "cc.PrefabInfo", 797 | "root": { 798 | "__id__": 1 799 | }, 800 | "asset": null, 801 | "fileId": "f2fdftcLLFK9rJUtqx3vtVh" 802 | }, 803 | { 804 | "__type__": "cc.Sprite", 805 | "_name": "", 806 | "_objFlags": 0, 807 | "node": { 808 | "__id__": 5 809 | }, 810 | "_enabled": true, 811 | "_spriteFrame": { 812 | "__uuid__": "857dc860-0cb2-4c0d-8b82-5d68d5ae0f96" 813 | }, 814 | "_type": 0, 815 | "_sizeMode": 0, 816 | "_fillType": 0, 817 | "_fillCenter": { 818 | "__type__": "cc.Vec2", 819 | "x": 0, 820 | "y": 0 821 | }, 822 | "_fillStart": 0, 823 | "_fillRange": 0, 824 | "_isTrimmedMode": true, 825 | "_srcBlendFactor": 770, 826 | "_dstBlendFactor": 771, 827 | "_atlas": null 828 | }, 829 | { 830 | "__type__": "cc.PrefabInfo", 831 | "root": { 832 | "__id__": 1 833 | }, 834 | "asset": null, 835 | "fileId": "c152d1jJhxMLa7a3ps3ZzUk" 836 | }, 837 | { 838 | "__type__": "bc16aa7dUdL4KDBWPxNNMyQ", 839 | "_name": "", 840 | "_objFlags": 0, 841 | "node": { 842 | "__id__": 1 843 | }, 844 | "_enabled": true, 845 | "prefabItem": { 846 | "__uuid__": "4fa9305d-6ca8-44ba-900e-a70e9a9cb6a0" 847 | }, 848 | "layout": { 849 | "__id__": 18 850 | }, 851 | "mask": { 852 | "__id__": 2 853 | }, 854 | "board": { 855 | "__id__": 5 856 | }, 857 | "duration": 0.3, 858 | "fLayout": { 859 | "__id__": 22 860 | }, 861 | "tabLeft": { 862 | "__id__": 6 863 | }, 864 | "tabRight": { 865 | "__id__": 12 866 | } 867 | }, 868 | { 869 | "__type__": "cc.Widget", 870 | "_name": "", 871 | "_objFlags": 0, 872 | "node": { 873 | "__id__": 1 874 | }, 875 | "_enabled": true, 876 | "isAlignOnce": false, 877 | "_alignFlags": 18, 878 | "_left": 0, 879 | "_right": 0, 880 | "_top": 0, 881 | "_bottom": 0, 882 | "_isAbsLeft": true, 883 | "_isAbsRight": true, 884 | "_isAbsTop": true, 885 | "_isAbsBottom": true, 886 | "_originalWidth": 0, 887 | "_originalHeight": 0 888 | }, 889 | { 890 | "__type__": "cc.PrefabInfo", 891 | "root": { 892 | "__id__": 1 893 | }, 894 | "asset": null, 895 | "fileId": "e045djXScZMHqXe/nU8KQii" 896 | } 897 | ] -------------------------------------------------------------------------------- /CCHexagon/assets/order/popout.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "9cc3224c-c1e3-455b-b9e9-9917496b81a4", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "dea16bd4-ecb4-4cbf-92dc-1fcf390bcb40", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/order/texture/avatar.jpg -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/avatar.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "a4c8939c-41c7-42cd-b210-03a286d25218", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "avatar": { 9 | "ver": "1.0.3", 10 | "uuid": "ee5e3c03-9532-4292-b4e0-fd0e940fdba0", 11 | "rawTextureUuid": "a4c8939c-41c7-42cd-b210-03a286d25218", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 150, 20 | "height": 150, 21 | "rawWidth": 150, 22 | "rawHeight": 150, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/black_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/order/texture/black_mask.jpg -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/black_mask.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "4871b303-f8fe-47c7-9cd6-0865bce5abbc", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "black_mask": { 9 | "ver": "1.0.3", 10 | "uuid": "6343c288-1aa0-40bd-9612-cb5bcb9be8da", 11 | "rawTextureUuid": "4871b303-f8fe-47c7-9cd6-0865bce5abbc", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 100, 20 | "height": 100, 21 | "rawWidth": 100, 22 | "rawHeight": 100, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/board-item-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/order/texture/board-item-bg.jpg -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/board-item-bg.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "17374ed7-25bb-4531-9318-143195d87505", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "board-item-bg": { 9 | "ver": "1.0.3", 10 | "uuid": "71c8397a-6ce4-4cc9-ac73-cf8377acd6a6", 11 | "rawTextureUuid": "17374ed7-25bb-4531-9318-143195d87505", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 640, 20 | "height": 96, 21 | "rawWidth": 640, 22 | "rawHeight": 96, 23 | "borderTop": 21, 24 | "borderBottom": 19, 25 | "borderLeft": 25, 26 | "borderRight": 29, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/popout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/order/texture/popout.png -------------------------------------------------------------------------------- /CCHexagon/assets/order/texture/popout.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "2b2e8bba-6941-4704-a7b1-d09059c0b11b", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "popout": { 9 | "ver": "1.0.3", 10 | "uuid": "857dc860-0cb2-4c0d-8b82-5d68d5ae0f96", 11 | "rawTextureUuid": "2b2e8bba-6941-4704-a7b1-d09059c0b11b", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 640, 20 | "height": 840, 21 | "rawWidth": 640, 22 | "rawHeight": 840, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/assets/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/assets/singleColor.png -------------------------------------------------------------------------------- /CCHexagon/assets/singleColor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "singleColor": { 9 | "ver": "1.0.3", 10 | "uuid": "410fb916-8721-4663-bab8-34397391ace7", 11 | "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 2, 20 | "height": 2, 21 | "rawWidth": 2, 22 | "rawHeight": 2, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /CCHexagon/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs" 5 | }, 6 | "exclude": [ 7 | "node_modules", 8 | "library", 9 | "local", 10 | "settings", 11 | "temp" 12 | ] 13 | } -------------------------------------------------------------------------------- /CCHexagon/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos2d-html5", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /CCHexagon/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "excludeScenes": [], 3 | "orientation": { 4 | "landscapeLeft": true, 5 | "landscapeRight": true, 6 | "portrait": false, 7 | "upsideDown": false 8 | }, 9 | "packageName": "org.cocos2d.hello_world", 10 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 11 | "title": "Hexagon", 12 | "webOrientation": "auto", 13 | "includeSdk": [ 14 | "anysdk" 15 | ], 16 | "includeAnySDK": false, 17 | "includeSDKBox": false, 18 | "oauthLoginServer": "", 19 | "appKey": "", 20 | "appSecret": "", 21 | "privateKey": "", 22 | "renderMode": "0", 23 | "inlineSpriteFrames": true, 24 | "inlineSpriteFrames_native": true, 25 | "mergeStartScene": false, 26 | "optimizeHotUpdate": false 27 | } -------------------------------------------------------------------------------- /CCHexagon/settings/builder.panel.json: -------------------------------------------------------------------------------- 1 | { 2 | "excludeScenes": [], 3 | "packageName": "org.cocos2d.helloworld", 4 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 5 | "title": "HelloWorld", 6 | "orientation": { 7 | "landscapeRight": true, 8 | "landscapeLeft": true, 9 | "portrait": false, 10 | "upsideDown": false 11 | }, 12 | "webOrientation": "auto" 13 | } -------------------------------------------------------------------------------- /CCHexagon/settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "start-scene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 3 | "group-list": [ 4 | "default" 5 | ], 6 | "collision-matrix": [ 7 | [ 8 | true 9 | ] 10 | ], 11 | "excluded-modules": [], 12 | "design-resolution-width": 960, 13 | "design-resolution-height": 640, 14 | "fit-width": false, 15 | "fit-height": true, 16 | "use-project-simulator-setting": false, 17 | "simulator-orientation": false, 18 | "use-customize-simulator": false, 19 | "simulator-resolution": { 20 | "width": 960, 21 | "height": 640 22 | } 23 | } -------------------------------------------------------------------------------- /CCHexagon/template-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellozhangran/game-hexagon/4ab1f28fed1f1955290bd67dd562b93518cd321e/CCHexagon/template-banner.png -------------------------------------------------------------------------------- /CCHexagon/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TEMPLATES.helloworld.name", 3 | "desc": "TEMPLATES.helloworld.desc", 4 | "banner": "template-banner.png" 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # game-hexagon 2 | Cocos Creator开发的六边形游戏,Hexagon,仿 Hex FRVR 小游戏 3 | 4 | > 好久没用cocos creator了,项目需要重新装了1.52,找到以前的旧项目居然还能完美的跑起来,分享给大家吧 ~ 可以作为cocos creator开发游戏的入门demo 5 | --------------------------------------------------------------------------------