Commit e6af1bfd authored by unknown's avatar unknown

数独格子好了

parent 40678c1e
...@@ -20,26 +20,23 @@ ...@@ -20,26 +20,23 @@
"__id__": 2 "__id__": 2
}, },
{ {
"__id__": 10 "__id__": 8
},
{
"__id__": 48
}, },
{ {
"__id__": 54 "__id__": 16
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 60 "__id__": 22
}, },
{ {
"__id__": 62 "__id__": 24
} }
], ],
"_prefab": { "_prefab": {
"__id__": 64 "__id__": 26
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
...@@ -71,7 +68,7 @@ ...@@ -71,7 +68,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "bgSpr", "_name": "clickNode",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
...@@ -84,13 +81,10 @@ ...@@ -84,13 +81,10 @@
}, },
{ {
"__id__": 5 "__id__": 5
},
{
"__id__": 7
} }
], ],
"_prefab": { "_prefab": {
"__id__": 9 "__id__": 7
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
...@@ -145,52 +139,7 @@ ...@@ -145,52 +139,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim" "fileId": "9cOh/BdzNAjalceiUMisM4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 160,
"g": 214,
"b": 211,
"a": 255
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
...@@ -201,7 +150,7 @@ ...@@ -201,7 +150,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 8 "__id__": 6
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
...@@ -225,7 +174,7 @@ ...@@ -225,7 +174,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "746IiAhuZG5ZPFAcF8ksf+" "fileId": "b5xxt5V6pHfa/Lkk/2GUCY"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
...@@ -235,95 +184,34 @@ ...@@ -235,95 +184,34 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "19tdxO5B9IeqfY3cmB/q6I" "fileId": "9bJcojDUpNaI+/TDvmScaO"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "marginNode", "_name": "bgSpr",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [
{
"__id__": 11
},
{
"__id__": 19
},
{
"__id__": 27
},
{
"__id__": 35
}
],
"_active": true,
"_components": [
{
"__id__": 43
},
{
"__id__": 45
}
],
"_prefab": {
"__id__": 47
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "leftSpr",
"_objFlags": 0,
"_parent": {
"__id__": 10
},
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 12 "__id__": 9
}, },
{ {
"__id__": 14 "__id__": 11
}, },
{ {
"__id__": 16 "__id__": 13
} }
], ],
"_prefab": { "_prefab": {
"__id__": 18 "__id__": 15
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -46.5, "x": 0,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
...@@ -354,15 +242,15 @@ ...@@ -354,15 +242,15 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 8
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 13 "__id__": 10
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 7, "width": 100,
"height": 100 "height": 100
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -374,18 +262,18 @@ ...@@ -374,18 +262,18 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim" "fileId": "1fDQmH17pO57yuUyH4R7xV"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 8
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 15 "__id__": 12
}, },
"_visFlags": 0, "_visFlags": 0,
"_customMaterial": null, "_customMaterial": null,
...@@ -393,10 +281,10 @@ ...@@ -393,10 +281,10 @@
"_dstBlendFactor": 4, "_dstBlendFactor": 4,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 0, "r": 160,
"g": 0, "g": 214,
"b": 0, "b": 211,
"a": 80 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
...@@ -419,20 +307,20 @@ ...@@ -419,20 +307,20 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG" "fileId": "6bYx+Qei5AVqDqJCMWy+7q"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 8
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 17 "__id__": 14
}, },
"_alignFlags": 13, "_alignFlags": 45,
"_target": null, "_target": null,
"_left": 0, "_left": 0,
"_right": 0, "_right": 0,
...@@ -446,7 +334,7 @@ ...@@ -446,7 +334,7 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 0, "_originalWidth": 100,
"_originalHeight": 100, "_originalHeight": 100,
"_alignMode": 2, "_alignMode": 2,
"_lockFlags": 0, "_lockFlags": 0,
...@@ -454,7 +342,7 @@ ...@@ -454,7 +342,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "09OaM3zWBKpqlBwMb4Xf/i" "fileId": "a96YSQKKdNMaWYd4ifBTgZ"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
...@@ -464,34 +352,31 @@ ...@@ -464,34 +352,31 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "69oph6RpVNzJyExRpiZ4EE" "fileId": "a0U1IhIbNKgIic/ZfrHTSW"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "rightSpr", "_name": "numLab",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 10 "__id__": 1
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 20 "__id__": 17
},
{
"__id__": 22
}, },
{ {
"__id__": 24 "__id__": 19
} }
], ],
"_prefab": { "_prefab": {
"__id__": 26 "__id__": 21
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 46.5, "x": 0,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
...@@ -522,16 +407,16 @@ ...@@ -522,16 +407,16 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 16
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 21 "__id__": 18
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 7, "width": 33.37,
"height": 100 "height": 75.6
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -542,18 +427,18 @@ ...@@ -542,18 +427,18 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim" "fileId": "6915kPucRKPIK/+lfCzmJp"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 16
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 23 "__id__": 20
}, },
"_visFlags": 0, "_visFlags": 0,
"_customMaterial": null, "_customMaterial": null,
...@@ -564,782 +449,87 @@ ...@@ -564,782 +449,87 @@
"r": 0, "r": 0,
"g": 0, "g": 0,
"b": 0, "b": 0,
"a": 80 "a": 255
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
}, },
"_fillStart": 0, "_string": "5",
"_fillRange": 0, "_horizontalAlign": 1,
"_isTrimmedMode": true, "_verticalAlign": 1,
"_useGrayscale": false, "_actualFontSize": 60,
"_atlas": null, "_fontSize": 60,
"_fontFamily": "Arial",
"_lineHeight": 60,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "" "_id": ""
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG" "fileId": "54RdqNRzpLKLznpQ/v3+BQ"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "13AuSxJhdGtbTaAf9S/UN4"
},
{
"__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 19 "__id__": 1
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 25 "__id__": 23
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
}, },
"_alignFlags": 37,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "" "_id": ""
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "cfUrotdaRO25ae5mUy6nZ6" "fileId": "65OWf21G5PB4Y1XhCqax+M"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "24212FO0p5LCLYCzcR+6dUg",
"root": { "_name": "",
"__id__": 1 "_objFlags": 0,
}, "node": {
"asset": {
"__id__": 0
},
"fileId": "43W+CJekJKnJEWUoieAJIK"
},
{
"__type__": "cc.Node",
"_name": "topSpr",
"_objFlags": 0,
"_parent": {
"__id__": 10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 28
},
{
"__id__": 30
},
{
"__id__": 32
}
],
"_prefab": {
"__id__": 34
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 46.5,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_contentSize": {
"__type__": "cc.Size",
"width": 86,
"height": 7
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 80
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_alignFlags": 41,
"_target": null,
"_left": 7,
"_right": 7,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 7,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d4zT5NPW5INKOqhzyv2dKz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7eZDMfhShDqZcZr1HjdCKQ"
},
{
"__type__": "cc.Node",
"_name": "bottomSpr",
"_objFlags": 0,
"_parent": {
"__id__": 10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
},
{
"__id__": 38
},
{
"__id__": 40
}
],
"_prefab": {
"__id__": 42
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -46.5,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
},
"_enabled": true,
"__prefab": {
"__id__": 37
},
"_contentSize": {
"__type__": "cc.Size",
"width": 86,
"height": 7
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
},
"_enabled": true,
"__prefab": {
"__id__": 39
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 80
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
},
"_enabled": true,
"__prefab": {
"__id__": 41
},
"_alignFlags": 44,
"_target": null,
"_left": 7,
"_right": 7,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 7,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bfkUD+SvFPPrhR1RNj6v8P"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "db/nw1EstKNrQkPrjlPaJT"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 44
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "faID+86cRI+4P4wo4sOcAW"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 46
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b7J08+fypFFZ9vLHWBZxUb"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "00gS0a1JRNg5XWiCQNVWS6"
},
{
"__type__": "cc.Node",
"_name": "numLab",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 49
},
{
"__id__": 51
}
],
"_prefab": {
"__id__": 53
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"__prefab": {
"__id__": 50
},
"_contentSize": {
"__type__": "cc.Size",
"width": 33.37,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"__prefab": {
"__id__": 52
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_string": "9",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 60,
"_fontSize": 60,
"_fontFamily": "Arial",
"_lineHeight": 60,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "86Pc48KtpA7qPRknVqMLiP"
},
{
"__type__": "cc.Node",
"_name": "clickNode",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 55
},
{
"__id__": 57
}
],
"_prefab": {
"__id__": 59
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
},
"_enabled": true,
"__prefab": {
"__id__": 56
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e37duVfg5Pq4Z3QAocI1SJ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
},
"_enabled": true,
"__prefab": {
"__id__": 58
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0fiLWuxaNEX6ASDLsV3X7a"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b6cDd1yBRPYIh6A0uuI8pq"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 61
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "90vr9WFAxM4LgCoFvvwMsx"
},
{
"__type__": "24212FO0p5LCLYCzcR+6dUg",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1 "__id__": 1
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 63 "__id__": 25
}, },
"flag": "#A0D6D3",
"itemType": 10, "itemType": 10,
"numStr": "1",
"bgSpr": { "bgSpr": {
"__id__": 5 "__id__": 11
}, },
"numLab": { "numLab": {
"__id__": 51 "__id__": 19
}, },
"clickNode": { "clickNode": {
"__id__": 54 "__id__": 2
}, },
"row": 1, "row": 1,
"column": 1, "column": 1,
...@@ -1347,7 +537,7 @@ ...@@ -1347,7 +537,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "58MHAoeihNaaQsFIzFsioc" "fileId": "4agcfJAw1K7rWyWg0jP4Ad"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
...@@ -1357,6 +547,6 @@ ...@@ -1357,6 +547,6 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "f3LUDmrCdK5LG304NVFF8t" "fileId": "3bUmTqEGhED6A3X8l7V1qx"
} }
] ]
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"ver": "1.1.27", "ver": "1.1.27",
"importer": "prefab", "importer": "prefab",
"imported": true, "imported": true,
"uuid": "8ea5a4c8-d687-4a1c-a96f-b077052f568a", "uuid": "e62dbe70-75d4-4645-8740-82b8a810fb0b",
"files": [ "files": [
".json" ".json"
], ],
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 23 "__id__": 30
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 24 "__id__": 31
}, },
"_id": "2fa5cb6f-32a4-47a2-afd9-b6c3532d1301" "_id": "2fa5cb6f-32a4-47a2-afd9-b6c3532d1301"
}, },
...@@ -206,21 +206,24 @@ ...@@ -206,21 +206,24 @@
}, },
{ {
"__id__": 10 "__id__": 10
},
{
"__id__": 16
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 16 "__id__": 23
}, },
{ {
"__id__": 18 "__id__": 25
}, },
{ {
"__id__": 20 "__id__": 27
}, },
{ {
"__id__": 22 "__id__": 29
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -486,6 +489,97 @@ ...@@ -486,6 +489,97 @@
"_lockFlags": 0, "_lockFlags": 0,
"_id": "a93Fii1xxBgoBgNS8pi0/u" "_id": "a93Fii1xxBgoBgNS8pi0/u"
}, },
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_prefab": {
"__id__": 17
},
"_id": "1c+vnq3AhA8I+E7ySA7LAy"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 16
},
"asset": {
"__uuid__": "f82dbb47-3af0-48a9-b424-cc5eb1c0f635",
"__expectedType__": "cc.Prefab"
},
"fileId": "51f1InKZpFnphFUGKpFykQ",
"instance": {
"__id__": 18
},
"targetOverrides": []
},
{
"__type__": "cc.PrefabInstance",
"fileId": "a8T7XlXT5I05V32gIMzG4S",
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 19
},
{
"__id__": 21
},
{
"__id__": 22
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 20
},
"propertyPath": [
"_name"
],
"value": "SudokuLevelView"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"51f1InKZpFnphFUGKpFykQ"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 20
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 20
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
...@@ -495,7 +589,7 @@ ...@@ -495,7 +589,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 17 "__id__": 24
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
...@@ -522,7 +616,7 @@ ...@@ -522,7 +616,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 19 "__id__": 26
}, },
"_cameraComponent": { "_cameraComponent": {
"__id__": 9 "__id__": 9
...@@ -543,7 +637,7 @@ ...@@ -543,7 +637,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 21 "__id__": 28
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
...@@ -588,16 +682,16 @@ ...@@ -588,16 +682,16 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 25 "__id__": 32
}, },
"shadows": { "shadows": {
"__id__": 26 "__id__": 33
}, },
"_skybox": { "_skybox": {
"__id__": 27 "__id__": 34
}, },
"fog": { "fog": {
"__id__": 28 "__id__": 35
} }
}, },
{ {
......
import { _decorator, Component, Node, SpriteFrame, Sprite, Label, CCString, CCInteger, ccenum, director } from 'cc'; import { _decorator, Component, Node, SpriteFrame, Sprite, Label, CCString, CCInteger, ccenum, director, Color, log, math } from 'cc';
import { EDITOR } from 'cc/env';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
export enum SK_ITEM_TYPE { export enum SK_ITEM_TYPE {
...@@ -12,15 +13,9 @@ ccenum(SK_ITEM_TYPE); ...@@ -12,15 +13,9 @@ ccenum(SK_ITEM_TYPE);
@ccclass('SudokuItemCtr') @ccclass('SudokuItemCtr')
export class SudokuItemCtr extends Component { export class SudokuItemCtr extends Component {
@property(CCString)
flag: string = "";
@property({ type: SK_ITEM_TYPE }) @property({ type: SK_ITEM_TYPE })
itemType: SK_ITEM_TYPE = SK_ITEM_TYPE.INVARIABLE; itemType: SK_ITEM_TYPE = SK_ITEM_TYPE.INVARIABLE;
@property(CCString)
numStr: string = "";
@property(Sprite) @property(Sprite)
bgSpr: Sprite = null!; bgSpr: Sprite = null!;
...@@ -39,24 +34,26 @@ export class SudokuItemCtr extends Component { ...@@ -39,24 +34,26 @@ export class SudokuItemCtr extends Component {
start() { start() {
// [3] // [3]
this.clickNode.on(Node.EventType.TOUCH_END, this.onItemClick, this); this.clickNode.on(Node.EventType.TOUCH_END, this.onItemClick, this);
this.numLab.string = this.numStr;
} }
onItemClick() { onItemClick() {
if(this.itemType == SK_ITEM_TYPE.INVARIABLE) return; if (this.itemType == SK_ITEM_TYPE.INVARIABLE) return;
director.emit("", this); director.emit("", this);
} }
getItemType(){ getItemType() {
return this.itemType; return this.itemType;
} }
getNumStr() { getNumStr() {
return this.numStr; return this.numLab.string;
}
setItemType(value: SK_ITEM_TYPE) {
this.itemType = value;
} }
setNumStr(value: string) { setNumStr(value: string) {
this.numStr = value;
this.numLab.string = value; this.numLab.string = value;
} }
......
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node, Vec3, v3, CCInteger, Prefab, instantiate, UITransform } from 'cc';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
export interface ItemPosIfo {
id: number, //唯一标识
pos: Vec3, //位置
xIdx: number, //列
yIdx: number, //行
target: Node //占有这个节点的对象
}
@ccclass('SudokuLevelViewCtr') @ccclass('SudokuLevelViewCtr')
export class SudokuLevelViewCtr extends Component { export class SudokuLevelViewCtr extends Component {
@property(CCInteger)
row: number = 3;
@property(CCInteger)
column: number = 3;
@property(Prefab)
itemPre: Prefab = null!;
@property(Node)
posArrNode: Node = null!;
@property(Node)
bgSprNode: Node = null!;
private itemWidth = 100;
private itemHeight = 100;
private itemSpaceX = 2;
private itemSpaceY = 2;
private itemPosIfoArr: ItemPosIfo[] = [];
start () { start () {
// [3] // [3]
this.itemPosIfoArr = this.getSqPosIfoArr(this.row, this.column, this.itemWidth, this.itemHeight, this.itemSpaceX, this.itemSpaceY);
for(let i = 0; i < this.itemPosIfoArr.length; ++ i){
let node = instantiate(this.itemPre);
this.posArrNode.addChild(node);
node.setPosition(this.itemPosIfoArr[i].pos);
}
this.setBgSprSize();
}
setBgSprSize() {
let minWidth = this.column * this.itemWidth + (this.column - 1) * this.itemSpaceX;
let minHeight = this.row * this.itemHeight + (this.row - 1) * this.itemSpaceY;
this.bgSprNode.getComponent(UITransform)!.width = minWidth + 20;
this.bgSprNode.getComponent(UITransform)!.height = minHeight + 20;
} }
getSqPosIfoArr(row: number, column: number, s_width: number, s_height: number, spacingX: number, spacingY: number): ItemPosIfo[] {
let x_arr: number[] = [];
for (let c = 1; c <= column; ++c) {
let x = s_width * (c - 1 + 0.5) + (c - 1) * spacingX - (column * s_width + (column - 1) * spacingX) / 2;
x_arr.push(x);
}
let y_arr: number[] = [];
for (let r = 1; r <= row; ++r) {
let y = s_height * (r - 1 + 0.5) + (r - 1) * spacingY - (row * s_height + (row - 1) * spacingY) / 2;
y_arr.push(y);
}
let pos_arr: ItemPosIfo[] = [];
for (let c = 0; c < x_arr.length; ++c) {
for (let r = 0; r < y_arr.length; ++r) {
pos_arr.push({
pos: v3(x_arr[c], y_arr[r], 0)
, xIdx: c
, yIdx: r
, id: pos_arr.length
, target: null!
});
}
}
return pos_arr;
}
// update (deltaTime: number) { // update (deltaTime: number) {
// // [4] // // [4]
// } // }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment