Commit bce34096 authored by unknown's avatar unknown

数式接龙暂存

parent 400e77fe
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "376f17d3-d5da-42e8-9fd9-9939ade42c4c",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "3c103e9f-7884-42dd-babb-1953fdcb22dc",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5@6c48a",
"displayName": "名称框",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5@f9941",
"displayName": "名称框",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 262,
"height": 69,
"rawWidth": 262,
"rawHeight": 69,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "0717846d-497e-4b51-9454-a40465268107",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "0717846d-497e-4b51-9454-a40465268107@6c48a",
"displayName": "图标_橡皮",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "0717846d-497e-4b51-9454-a40465268107"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "0717846d-497e-4b51-9454-a40465268107@f9941",
"displayName": "图标_橡皮",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": 1.5,
"trimX": 3,
"trimY": 1,
"width": 55,
"height": 55,
"rawWidth": 60,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "0717846d-497e-4b51-9454-a40465268107@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "0717846d-497e-4b51-9454-a40465268107@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "dd599e9d-2831-453b-8841-48148d964a86",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "dd599e9d-2831-453b-8841-48148d964a86@6c48a",
"displayName": "图标_铅笔 ",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "dd599e9d-2831-453b-8841-48148d964a86"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "dd599e9d-2831-453b-8841-48148d964a86@f9941",
"displayName": "图标_铅笔 ",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1.5,
"offsetY": 1,
"trimX": 0,
"trimY": 0,
"width": 50,
"height": 51,
"rawWidth": 53,
"rawHeight": 53,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "dd599e9d-2831-453b-8841-48148d964a86@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "dd599e9d-2831-453b-8841-48148d964a86@f9941"
}
}
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "064fe36d-e3e0-485e-b248-780121d3546d",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "FormulaSolitaireItem",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 6
},
{
"__id__": 12
},
{
"__id__": 18
},
{
"__id__": 24
},
{
"__id__": 30
},
{
"__id__": 36
}
],
"_active": true,
"_components": [
{
"__id__": 42
},
{
"__id__": 44
}
],
"_prefab": {
"__id__": 46
},
"_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.Node",
"_name": "clickNode",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 5
},
"_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__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "565ImB6KxDBbYaaT40mGDS"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "8eG3VEVk5GMK0qbZ8StHkw"
},
{
"__type__": "cc.Node",
"_name": "topSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 9
}
],
"_prefab": {
"__id__": 11
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 2,
"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__": 6
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 102
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 238,
"g": 21,
"b": 21,
"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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "637Jc7X9hLiIIJPIDkxm4A"
},
{
"__type__": "cc.Node",
"_name": "bottomSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 15
}
],
"_prefab": {
"__id__": 17
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -2,
"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__": 12
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 102
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 79,
"g": 111,
"b": 241,
"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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "5bCkXk0mlIOoDKoIRFfP34"
},
{
"__type__": "cc.Node",
"_name": "leftSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 21
}
],
"_prefab": {
"__id__": 23
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -2,
"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__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_contentSize": {
"__type__": "cc.Size",
"width": 102,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 22
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 218,
"g": 241,
"b": 93,
"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.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d1XRBt7+VEU6uoi2uw/MG/"
},
{
"__type__": "cc.Node",
"_name": "rightSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
},
{
"__id__": 27
}
],
"_prefab": {
"__id__": 29
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 2,
"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__": 24
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_contentSize": {
"__type__": "cc.Size",
"width": 102,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"__prefab": {
"__id__": 28
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 55,
"g": 216,
"b": 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,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7eEV76HUJAaJu2wyEpxynT"
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 31
},
{
"__id__": 33
}
],
"_prefab": {
"__id__": 35
},
"_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__": 30
},
"_enabled": true,
"__prefab": {
"__id__": 32
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
},
"_enabled": true,
"__prefab": {
"__id__": 34
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "94vpGofk1H7rf7lg2EoWZt"
},
{
"__type__": "cc.Node",
"_name": "textLab",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 37
},
{
"__id__": 39
}
],
"_prefab": {
"__id__": 41
},
"_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__": 36
},
"_enabled": true,
"__prefab": {
"__id__": 38
},
"_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__": 36
},
"_enabled": true,
"__prefab": {
"__id__": 40
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_string": "1",
"_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": "a38XiRMmlMlre6ZvgDxwfm"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 43
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "09Z6cy2YZJV42YSDGBjgoP"
},
{
"__type__": "88952JgqsRFJrJByEcNnAcX",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 45
},
"bgSpr": {
"__id__": 33
},
"topSpr": {
"__id__": 9
},
"bottomSpr": {
"__id__": 15
},
"leftSpr": {
"__id__": 21
},
"rightSpr": {
"__id__": 27
},
"textLab": {
"__id__": 39
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "01WSOY+LJEOrZyXvBQxD4E"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "33vt+ZFs5A+6K7lExE7Txm"
}
]
\ No newline at end of file
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "691c3ce4-04d8-44e6-8399-93ef7ce3a485",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "FormulaSolitaireItem"
}
}
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "d7150472-9b68-4732-9e61-71b7d740d5ad",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_name": "FormulaSolitaire",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_active": true,
"_components": [],
"_prefab": null,
"autoReleaseAssets": false,
"_globals": {
"__id__": 32
},
"_id": "1cd9e018-8b35-4525-bca9-8418f7439cca"
},
{
"__type__": "cc.Node",
"_name": "Main Light",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": -0.24999999999999997,
"y": -0.24999999999999997,
"z": -0.06698729810778066,
"w": 0.9330127018922194
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": -30,
"y": -30,
"z": 0
},
"_id": "c0y6F5f+pAvI805TdmxIjx"
},
{
"__type__": "cc.DirectionalLight",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": null,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_useColorTemperature": false,
"_colorTemperature": 6550,
"_staticSettings": {
"__id__": 4
},
"_illuminance": 65000,
"_id": "597uMYCbhEtJQc0ffJlcgA"
},
{
"__type__": "cc.StaticLightSettings",
"_baked": false,
"_editorOnly": false,
"_bakeable": false,
"_castShadow": false
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -10,
"y": 10,
"z": 10
},
"_lrot": {
"__type__": "cc.Quat",
"x": -0.27781593346944056,
"y": -0.36497167621709875,
"z": -0.11507512748638377,
"w": 0.8811195706053617
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": -35,
"y": -45,
"z": 0
},
"_id": "c9DMICJLFO5IeO07EPon7U"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"__prefab": null,
"_projection": 1,
"_priority": 0,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 10,
"_near": 1,
"_far": 1000,
"_color": {
"__type__": "cc.Color",
"r": 51,
"g": 51,
"b": 51,
"a": 255
},
"_depth": 1,
"_stencil": 0,
"_clearFlags": 7,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_aperture": 19,
"_shutter": 7,
"_iso": 0,
"_screenScale": 1,
"_visibility": 1822425087,
"_targetTexture": null,
"_id": "7dWQTpwS5LrIHnc1zAPUtf"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 8
},
{
"__id__": 10
},
{
"__id__": 16
},
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 25
},
{
"__id__": 27
},
{
"__id__": 29
},
{
"__id__": 31
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 667,
"y": 375,
"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": "c5oXz7PrdBRJNQybRcUczq"
},
{
"__type__": "cc.Node",
"_name": "Camera",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 1000
},
"_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": "24PdF1WslJNYwdEVeLpj4a"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": null,
"_projection": 0,
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 466.3930510314875,
"_near": 1,
"_far": 2000,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": 1,
"_stencil": 0,
"_clearFlags": 6,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_aperture": 19,
"_shutter": 7,
"_iso": 0,
"_screenScale": 1,
"_visibility": 41943040,
"_targetTexture": null,
"_id": "f1+7pgENJHnZvG7f4A2w8K"
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
},
{
"__id__": 15
}
],
"_prefab": null,
"_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": "2cQOBnp7JFxo8xJIaNYwZ1"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
"height": 750
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "080f0iLMdGBZ9+7Jz9t/7r"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 139,
"g": 104,
"b": 79,
"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": "20ajmcnIpC9LKJC8IszBrS"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": null,
"_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": "1a9X+NF2JOU6TThAmYby12"
},
{
"__type__": "cc.Node",
"_name": "bottomSpr",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
},
{
"__id__": 19
},
{
"__id__": 21
}
],
"_prefab": null,
"_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": "26YZqRDgFOAbv2n+gZcpww"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "0670AIPUlEU6q4T8vo4g0t"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 60
},
"_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": "4f/PMmKexBcJPUBfnKxkhN"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 18,
"_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": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "d3a2pOUMdFKIpW7QMmMgnl"
},
{
"__type__": "cc.Node",
"_name": "posArrNode",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 24
}
],
"_prefab": null,
"_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": "3dMQ13XHBKuaN0mb2Popx2"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "5dio8Noc9Dg4ucWEl15TDi"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 18,
"_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": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "dbdpvhRYNHH7TOIusIbAEA"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
"height": 750
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "23Xwqno/BJsL+nIqAddgzI"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0dngp/9gNO34wUQjZfN/CX"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 28
},
"_cameraComponent": {
"__id__": 9
},
"_alignCanvasWithScreen": true,
"_id": "78axfk7P1IsbJQvBZ80EHp"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3f2oTdCepERZdpmIfLsrhd"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 30
},
"_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": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "868lr3fzNNN7YZbQGoQ2Zt"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e8a+bU/8dPDbbJguUzLdoF"
},
{
"__type__": "2a0e2TL1OJAoISTn0XIADXR",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": null,
"posArrNode": {
"__id__": 22
},
"bottomSprNode": {
"__id__": 16
},
"itemPre": {
"__uuid__": "691c3ce4-04d8-44e6-8399-93ef7ce3a485",
"__expectedType__": "cc.Prefab"
},
"countdownLab": null,
"totalTime": 60,
"_id": "604qNVtc5GtKxU+Lzl4Mik"
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 33
},
"shadows": {
"__id__": 34
},
"_skybox": {
"__id__": 35
},
"fog": {
"__id__": 36
}
},
{
"__type__": "cc.AmbientInfo",
"_skyColor": {
"__type__": "cc.Color",
"r": 51,
"g": 128,
"b": 204,
"a": 1
},
"_skyIllum": 20000,
"_groundAlbedo": {
"__type__": "cc.Color",
"r": 51,
"g": 51,
"b": 51,
"a": 255
}
},
{
"__type__": "cc.ShadowsInfo",
"_type": 0,
"_enabled": false,
"_normal": {
"__type__": "cc.Vec3",
"x": 0,
"y": 1,
"z": 0
},
"_distance": 0,
"_shadowColor": {
"__type__": "cc.Color",
"r": 76,
"g": 76,
"b": 76,
"a": 255
},
"_autoAdapt": true,
"_pcf": 0,
"_bias": 0.00001,
"_packing": false,
"_linear": true,
"_selfShadow": false,
"_normalBias": 0,
"_near": 1,
"_far": 30,
"_aspect": 1,
"_orthoSize": 5,
"_maxReceived": 4,
"_size": {
"__type__": "cc.Vec2",
"x": 512,
"y": 512
}
},
{
"__type__": "cc.SkyboxInfo",
"_envmap": null,
"_isRGBE": false,
"_enabled": false,
"_useIBL": false
},
{
"__type__": "cc.FogInfo",
"_type": 0,
"_fogColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"_enabled": false,
"_fogDensity": 0.3,
"_fogStart": 0.5,
"_fogEnd": 300,
"_fogAtten": 5,
"_fogTop": 1.5,
"_fogRange": 1.2
}
]
\ No newline at end of file
{
"ver": "1.1.27",
"importer": "scene",
"imported": true,
"uuid": "1cd9e018-8b35-4525-bca9-8418f7439cca",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "26d057f4-bf07-43a3-a9fc-85f4614c489e",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
import { _decorator, Component, Node, Sprite, Vec3, Prefab, Label, CCFloat, instantiate, UITransform, v3, director } from 'cc';
import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef';
import { viewMgr } from '../../../../startFolder/script/common/ViewMgr';
import { GameDescView } from '../../commonView/script/GameDescView';
import { FS_ITEM_STATE } from './FormulaSolitaireItem';
const { ccclass, property } = _decorator;
export interface ItemPosIfo {
id: number, //唯一标识
pos: Vec3, //位置
xIdx: number, //列
yIdx: number, //行
target: Node //占有这个节点的对象
}
enum GAME_STATE {
READY = 10,
RUN = 20,
END = 30,
PAUSE = 40,
}
@ccclass('FormulaSolitaireCtr')
export class FormulaSolitaireCtr extends Component {
@property(Node)
posArrNode: Node = null!;
@property(Node)
bottomSprNode: Node = null!;
@property(Prefab)
itemPre: Prefab = null!;
@property(Label)
countdownLab: Label = null!;
@property(CCFloat)
totalTime: number = 0;
private itemWidth = 100;
private itemHeight = 100;
private itemSpaceX = 2;
private itemSpaceY = 2;
private itemPosIfoArr: ItemPosIfo[] = [];
private row = 4;
private column = 4;
private gameState = GAME_STATE.READY;
private costTime = 0;
private isPlayCountdownMus = false;
private isShowGameDescViewOnce = false;
showGameDescView() {
this.isShowGameDescViewOnce = true;
viewMgr.openView(VIEW_DEF.GameDescView, (node) => {
node.getComponent(GameDescView)?.setDesc("选择数字填入空格使横着的和竖着的算式都要成立。\n注意:不论从左到右还是从上到下都要符合四则运算优先级。");
});
}
onCloseGameDescView() {
this.gameState = GAME_STATE.RUN;
}
setGameData(resData: object) {
//@ts-ignore
if (resData.totalTime) {
//@ts-ignore
this.totalTime = resData.totalTime;
}
//@ts-ignore
if (resData.level) {
//@ts-ignore
this.level = resData.level;
}
//@ts-ignore
if (resData.isShowGuide) {
//@ts-ignore
this.isShowGameDescViewOnce = false;
}
else {
this.isShowGameDescViewOnce = true;
}
}
start () {
// [3]
this.gameStart();
}
gameStart(){
this.creAllItem();
this.setBgSprSize();
}
creAllItem() {
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.itemPosIfoArr[i].target = node;
}
}
setBgSprSize() {
let minWidth = this.column * this.itemWidth + (this.column - 1) * this.itemSpaceX;
let minHeight = this.row * this.itemHeight + (this.row - 1) * this.itemSpaceY;
this.bottomSprNode.getComponent(UITransform)!.width = minWidth + 20;
this.bottomSprNode.getComponent(UITransform)!.height = minHeight + 20;
this.posArrNode.getComponent(UITransform)!.width = minWidth;
this.posArrNode.getComponent(UITransform)!.height = minHeight;
}
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);
y_arr.sort((a, b) => {
return b - a;
});
}
let pos_arr: ItemPosIfo[] = [];
for (let r = 0; r < y_arr.length; ++r) {
for (let c = 0; c < x_arr.length; ++c) {
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;
}
calculator(numStrArr: string[]): number {
let operatorIdx = -1;
for (let i = 0; i < numStrArr.length; ++i) {
if (numStrArr[i] == "+" || numStrArr[i] == "-" || numStrArr[i] == "÷" || numStrArr[i] == "×") {
operatorIdx = i;
break;
}
}
for (let i = 0; i < numStrArr.length; ++i) {
if (numStrArr[i] == "÷" || numStrArr[i] == "×") {
operatorIdx = i;
break;
}
}
if (operatorIdx == 0 || operatorIdx == numStrArr.length - 1) {
throw new Error(`传入的算式不符合规则`);
}
if (operatorIdx == -1) return Number(numStrArr[0]);
let num_1 = Number(numStrArr[operatorIdx - 1]);
let num_2 = Number(numStrArr[operatorIdx + 1]);
let num_ret = 0;
switch (numStrArr[operatorIdx]) {
case "+":
num_ret = num_1 + num_2;
break;
case "-":
num_ret = num_1 - num_2;
break;
case "÷":
if (num_2 == 0) throw new Error(`除数为零`);
num_ret = num_1 / num_2;
break;
case "×":
num_ret = num_1 * num_2;
break;
default:
break;
}
numStrArr[operatorIdx - 1] = num_ret.toString();
numStrArr.splice(operatorIdx, 2);
return this.calculator(numStrArr);
}
getItemsDirArr(itemPosIfos: ItemPosIfo[]){
let dirArr: FS_ITEM_STATE[] = [];
for(let i = 0; i < itemPosIfos.length - 1; ++ i){
if(itemPosIfos[i +1].pos.x - itemPosIfos[i].pos.x < 0){
dirArr.push(FS_ITEM_STATE.LEFT);
}
else if(itemPosIfos[i +1].pos.x - itemPosIfos[i].pos.x > 0){
dirArr.push(FS_ITEM_STATE.RIGHT);
}
else if(itemPosIfos[i +1].pos.y - itemPosIfos[i].pos.y < 0){
dirArr.push(FS_ITEM_STATE.BOTTOM);
}
else if(itemPosIfos[i +1].pos.y - itemPosIfos[i].pos.y > 0){
dirArr.push(FS_ITEM_STATE.TOP);
}
}
if(itemPosIfos.length > 0) dirArr.push(FS_ITEM_STATE.CENTER);
return dirArr;
}
// update (deltaTime: number) {
// // [4]
// }
}
\ No newline at end of file
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "2a0e24cb-d4e2-40a0-8493-9f45c80035d1",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, Sprite, Label, math, Color, director, UITransform } from 'cc';
const { ccclass, property } = _decorator;
export enum FS_ITEM_STATE {
CENTER = 10,
TOP = 20,
BOTTOM = 30,
LEFT = 40,
RIGHT = 50
}
@ccclass('FormulaSolitaireItem')
export class FormulaSolitaireItem extends Component {
@property(Sprite)
bgSpr: Sprite = null!;
@property(Sprite)
topSpr: Sprite = null!;
@property(Sprite)
bottomSpr: Sprite = null!;
@property(Sprite)
leftSpr: Sprite = null!;
@property(Sprite)
rightSpr: Sprite = null!;
@property(Label)
textLab: Label = null!;
@property(Node)
clickNode: Node = null!;
private _itemState = FS_ITEM_STATE.CENTER;
private _text = "";
start () {
// [3]
}
setItemState(state: FS_ITEM_STATE){
this._itemState = state;
this.topSpr.node.active = this._itemState == FS_ITEM_STATE.TOP;
this.bottomSpr.node.active = this._itemState == FS_ITEM_STATE.BOTTOM;
this.leftSpr.node.active = this._itemState == FS_ITEM_STATE.LEFT;
this.rightSpr.node.active = this._itemState == FS_ITEM_STATE.RIGHT;
}
getItemState(state: FS_ITEM_STATE){
return this._itemState;
}
setText(text: string){
this.textLab.string = text;
this.textLab.string = text;
}
getText(){
return this._text;
}
setColor(color: math.IColorLike){
this.bgSpr.color = new Color(color.r, color.g, color.b, color.a);
this.topSpr.color = new Color(color.r, color.g, color.b, color.a);
this.bottomSpr.color = new Color(color.r, color.g, color.b, color.a);
this.leftSpr.color = new Color(color.r, color.g, color.b, color.a);
this.rightSpr.color = new Color(color.r, color.g, color.b, color.a);
}
getWorldAABB(){
return this.clickNode.getComponent(UITransform)!.getBoundingBoxToWorld();
}
// update (deltaTime: number) {
// // [4]
// }
}
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "88952260-aac4-4526-b241-c8470d9c0717",
"files": [],
"subMetas": {},
"userData": {}
}
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