Commit 2f3de712 authored by unknown's avatar unknown

数式接龙好了

parent d87f860d
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8@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": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8@f9941",
"displayName": "时间框",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 376,
"height": 69,
"rawWidth": 376,
"rawHeight": 69,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8@f9941"
}
}
......@@ -29,7 +29,7 @@
"_prefab": null,
"autoReleaseAssets": false,
"_globals": {
"__id__": 32
"__id__": 79
},
"_id": "1cd9e018-8b35-4525-bca9-8418f7439cca"
},
......@@ -210,21 +210,27 @@
},
{
"__id__": 22
},
{
"__id__": 25
},
{
"__id__": 54
}
],
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 72
},
{
"__id__": 27
"__id__": 74
},
{
"__id__": 29
"__id__": 76
},
{
"__id__": 31
"__id__": 78
}
],
"_prefab": null,
......@@ -736,70 +742,200 @@
"_lockFlags": 0,
"_id": "dbdpvhRYNHH7TOIusIbAEA"
},
{
"__type__": "cc.Node",
"_name": "Layout",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 26
},
{
"__id__": 32
},
{
"__id__": 43
}
],
"_active": true,
"_components": [
{
"__id__": 49
},
{
"__id__": 51
},
{
"__id__": 53
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 325,
"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": "d87p/7xs1GrouEdakdi0gT"
},
{
"__type__": "cc.Node",
"_name": "名称框",
"_objFlags": 0,
"_parent": {
"__id__": 25
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 27
},
{
"__id__": 29
},
{
"__id__": 31
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -526,
"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": "5dmYirkoNFOLcw2HVEoy8h"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 26
},
"_enabled": true,
"__prefab": {
"__id__": 26
"__id__": 28
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
"height": 750
"width": 262,
"height": 69
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "23Xwqno/BJsL+nIqAddgzI"
"_id": "4cxTuxaMpFL64gNsuH6Wug"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0dngp/9gNO34wUQjZfN/CX"
"fileId": "f7NISe7HdAD68SLfhnddy8"
},
{
"__type__": "cc.Canvas",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 26
},
"_enabled": true,
"__prefab": {
"__id__": 28
"__id__": 30
},
"_cameraComponent": {
"__id__": 9
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_alignCanvasWithScreen": true,
"_id": "78axfk7P1IsbJQvBZ80EHp"
"_spriteFrame": {
"__uuid__": "27f9e1c5-9a40-47ab-8f5c-721bb5d34eb5@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "14YoHAekVKQJs1PEskhsxU"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3f2oTdCepERZdpmIfLsrhd"
"fileId": "e71ctEmpxFC4KlSYRZNz/a"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 26
},
"_enabled": true,
"__prefab": {
"__id__": 30
},
"_alignFlags": 45,
"__prefab": null,
"_alignFlags": 9,
"_target": null,
"_left": 0,
"_left": 10,
"_right": 0,
"_top": 0,
"_top": 15.5,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
......@@ -813,48 +949,1067 @@
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "868lr3fzNNN7YZbQGoQ2Zt"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e8a+bU/8dPDbbJguUzLdoF"
"_id": "51ww3D/ZNPOZcQfFinmfkE"
},
{
"__type__": "2a0e2TL1OJAoISTn0XIADXR",
"_name": "",
"__type__": "cc.Node",
"_name": "时间框",
"_objFlags": 0,
"node": {
"__id__": 7
"_parent": {
"__id__": 25
},
"_enabled": true,
"__prefab": null,
"posArrNode": {
"__id__": 22
"_children": [
{
"__id__": 33
}
],
"_active": true,
"_components": [
{
"__id__": 38
},
{
"__id__": 40
},
{
"__id__": 42
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 464,
"y": 0,
"z": 0
},
"bottomSprNode": {
"__id__": 16
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"itemPre": {
"__uuid__": "691c3ce4-04d8-44e6-8399-93ef7ce3a485",
"__expectedType__": "cc.Prefab"
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"countdownLab": null,
"totalTime": 60,
"_id": "604qNVtc5GtKxU+Lzl4Mik"
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "00+tePsJBBMIyD5GVrvaRs"
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 33
"__type__": "cc.Node",
"_name": "timeLab",
"_objFlags": 0,
"_parent": {
"__id__": 32
},
"shadows": {
"__id__": 34
"_children": [],
"_active": true,
"_components": [
{
"__id__": 34
},
{
"__id__": 36
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 94.847,
"y": 0,
"z": 0
},
"_skybox": {
"__id__": 35
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"fog": {
"__id__": 36
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "a3Sy5LjUpOHIsmQObp/qKf"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"__prefab": {
"__id__": 35
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100.1,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "e7W9i4CydEFKWLO6msxI7k"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"__prefab": {
"__id__": 37
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "00:00",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 40,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "1c6JWiMA9Ckr4els4LOBcR"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"__prefab": {
"__id__": 39
},
"_contentSize": {
"__type__": "cc.Size",
"width": 376,
"height": 69
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "36FE8twstL6Lm2YUmZfpYG"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f7NISe7HdAD68SLfhnddy8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"__prefab": {
"__id__": 41
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "4ca08d57-ebb2-435a-910c-7b6c15aa85c8@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "c2r8qak6RM7IafH2bmFcnU"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e71ctEmpxFC4KlSYRZNz/a"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 33,
"_target": null,
"_left": 0,
"_right": 15,
"_top": 15.5,
"_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": "b1vr+me/dEDKL5NWX7Jqdb"
},
{
"__type__": "cc.Node",
"_name": "resultLab",
"_objFlags": 0,
"_parent": {
"__id__": 25
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 44
},
{
"__id__": 46
},
{
"__id__": 48
}
],
"_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": "e4jXva4ZdOPre9SFh67c6+"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
},
"_enabled": true,
"__prefab": {
"__id__": 45
},
"_contentSize": {
"__type__": "cc.Size",
"width": 266.74,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "aeVBfupBBHe5xe13VLnJ6a"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
},
"_enabled": true,
"__prefab": {
"__id__": 47
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "正确答案:666",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 40,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "48ixDMIgBGl4xebUuZN2uU"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 16,
"_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": "bbbhbHRghG1oZLsplNeT4h"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"__prefab": {
"__id__": 50
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "8byt9RjqBOJpbIV3KeDOh0"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "71F9vsVsZH7ZFd+PpN0azA"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": false,
"__prefab": {
"__id__": 52
},
"_resizeMode": 1,
"_layoutType": 1,
"_cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_startAxis": 0,
"_paddingLeft": 0,
"_paddingRight": 0,
"_paddingTop": 0,
"_paddingBottom": 0,
"_spacingX": 0,
"_spacingY": 0,
"_verticalDirection": 1,
"_horizontalDirection": 0,
"_constraint": 0,
"_constraintNum": 2,
"_affectedByScale": false,
"_isAlign": false,
"_id": "22fXVDp8lOh7Py3nuPR1m4"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "eaGEkmlCpANK+GS6CImtZa"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 41,
"_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": 1334,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "bdgUo7irFBBpqziZWQwIqa"
},
{
"__type__": "cc.Node",
"_name": "gameDescBtn",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 55
},
{
"__id__": 60
}
],
"_active": true,
"_components": [
{
"__id__": 65
},
{
"__id__": 67
},
{
"__id__": 69
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 527.627,
"y": 211.904,
"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": "98Dy+ccbdPKo49slGUgFRW"
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 54
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
},
{
"__id__": 58
}
],
"_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": "bc+U0tf1hLQbm/9zsgLmHA"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"__prefab": {
"__id__": 57
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "dejCKqimBMQ7ovnJ0alUy8"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"__prefab": {
"__id__": 59
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 120
},
"_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": "6b6/qPCuNPD5cE52zWuIhK"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 54
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 61
},
{
"__id__": 63
}
],
"_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": "e9bM82rDhHK5k6wLKIe6XA"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
},
"_enabled": true,
"__prefab": {
"__id__": 62
},
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "e6bCNa4QRGEqA2cd5jIbyA"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
},
"_enabled": true,
"__prefab": {
"__id__": 64
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "玩法说明",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 32,
"_fontSize": 32,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "d1Nw2AA6JP2rf1f33QSrJH"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
},
"_enabled": true,
"__prefab": {
"__id__": 66
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "ddAnERZ1BNxLoVZfSF5gTS"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "30AFpV6rhJLKJMbjqrvDLm"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
},
"_enabled": true,
"__prefab": {
"__id__": 68
},
"_alignFlags": 33,
"_target": null,
"_left": 0,
"_right": 59.37300000000005,
"_top": 133.096,
"_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": "e4SYDWpuhAtp22QPZQevyq"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ebKiXA481GJaVCm3yUMRB/"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
},
"_enabled": true,
"__prefab": {
"__id__": 70
},
"clickEvents": [
{
"__id__": 71
}
],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": "4c/dcDP0tEroRkwqvLBp6W"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fasaRsl0VPiqKt+O6/ppa2"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
},
"component": "",
"_componentId": "2a0e2TL1OJAoISTn0XIADXR",
"handler": "showGameDescView",
"customEventData": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 73
},
"_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__": 75
},
"_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__": 77
},
"_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": {
"__id__": 36
},
"totalTime": 100,
"resultLab": {
"__id__": 46
},
"_id": "604qNVtc5GtKxU+Lzl4Mik"
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 80
},
"shadows": {
"__id__": 81
},
"_skybox": {
"__id__": 82
},
"fog": {
"__id__": 83
}
},
{
......
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
export interface FormulaSolitaireCfg {
row: number,
column: number,
result: number,
resultCount: number,
formulaArr: string[][]
}
//÷ ×
export const FS_LV_1: FormulaSolitaireCfg = {
row: 4,
column: 4,
result: 8,
resultCount: 2,
formulaArr: [
["5", "6", "+", "-"],
["×", "4", "2", "5"],
["8", "+", "1", "-"],
["÷", "2", "-", "11"]
]
}
export const FS_LV_2: FormulaSolitaireCfg = {
row: 4,
column: 4,
result: 12,
resultCount: 2,
formulaArr: [
["4", "6", "+", "0"],
["×", "÷", "3", "-"],
["2", "6", "×", "1"],
["+", "4", "8", "+"]
]
}
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "96e3c939-105b-4aa8-9224-6410ab56497e",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, Sprite, Vec3, Prefab, Label, CCFloat, instantiate, UITransform, v3, director, EventTouch, v2, Color } from 'cc';
import { countdownMus, failMus, succMus } from '../../../../startFolder/script/common/AudioDef';
import { AudioMgr } from '../../../../startFolder/script/common/AudioMgr';
import { Utils } from '../../../../startFolder/script/common/Utils';
import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef';
import { viewMgr } from '../../../../startFolder/script/common/ViewMgr';
import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewMgr';
import { BeginCountdownView } from '../../commonView/script/BeginCountdownView';
import { ChallengeSuccView } from '../../commonView/script/ChallengeSuccView';
import { GameDescView } from '../../commonView/script/GameDescView';
import { FormulaSolitaireCfg, FS_LV_1, FS_LV_2 } from './FormulaSolitaireCfg';
import { FormulaSolitaireItem, FS_ITEM_STATE } from './FormulaSolitaireItem';
const { ccclass, property } = _decorator;
......@@ -61,6 +67,9 @@ export class FormulaSolitaireCtr extends Component {
@property(CCFloat)
totalTime: number = 0;
@property(Label)
resultLab: Label = null!;
private itemWidth = 100;
private itemHeight = 100;
private itemSpaceX = 2;
......@@ -80,10 +89,13 @@ export class FormulaSolitaireCtr extends Component {
private curLinePointArr: ItemPosIfo[] = [];
private allLinePointArr: ItemPosIfo[][] = [];
private level = 2;
private levelData: FormulaSolitaireCfg = null!;
showGameDescView() {
this.isShowGameDescViewOnce = true;
viewMgr.openView(VIEW_DEF.GameDescView, (node) => {
node.getComponent(GameDescView)?.setDesc("把算式连接在一起。");
node.getComponent(GameDescView)?.setDesc("划过图中的数字和算式运算符,把它们连接在一起组成一个式子,\n得到上方的结果。\n成功条件:尽可能多的组合能得到正确答案的式子。\n注意:再次划过已经组合完成的式子可以拆散还原。\n有些数字和运算符可能不会用到");
});
}
......@@ -114,6 +126,17 @@ export class FormulaSolitaireCtr extends Component {
start() {
// [3]
director.on("begin_countdown_end", () => {
//引导
if (!this.isShowGameDescViewOnce) {
this.gameState = GAME_STATE.PAUSE;
this.showGameDescView();
}
else {
this.gameState = GAME_STATE.IDLE;
}
}, this);
director.on("game_desc_close", this.onCloseGameDescView, this);
this.posArrNode.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
this.posArrNode.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
this.posArrNode.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
......@@ -195,6 +218,12 @@ export class FormulaSolitaireCtr extends Component {
selPoint.target.getComponent(FormulaSolitaireItem)?.setColor(Color.fromHEX(new Color(), colorStr));
}
this.paintPaths();
if (this.checkWin()) {
this.gameEnd(true);
}
else {
}
}
paintPaths() {
......@@ -224,30 +253,64 @@ export class FormulaSolitaireCtr extends Component {
}
}
}
}
console.log(`线段集合`);
console.log(this.allLinePointArr);
gameEnd(isWin: boolean) {
this.gameState = GAME_STATE.END;
if (isWin) {
viewMgr.openView(VIEW_DEF.ChallengeSuccView, (node) => {
AudioMgr.playOneShot(succMus);
node?.getComponent(ChallengeSuccView)?.init();
}, VIEW_INDEX.TOP);
}
else {
viewMgr.openView(VIEW_DEF.ChallengeFailView, (node) => {
AudioMgr.playOneShot(failMus);
}, VIEW_INDEX.TOP);
}
}
getResult(numStrArr: string[]){
checkWin() {
if (this.allLinePointArr.length < this.levelData.resultCount) return false;
let retArr: number[][] = [];
for (let i = 0; i < this.allLinePointArr.length; ++i) {
let numAtrArr: string[] = [];
for (let j = 0; j < this.allLinePointArr[i].length; ++j) {
numAtrArr.push(this.allLinePointArr[i][j].target.getComponent(FormulaSolitaireItem)!.getText());
}
console.log(`检测一个算式`);
console.log(numAtrArr);
retArr.push(this.getResult(numAtrArr));
}
let count = 0;
for (let i = 0; i < retArr.length; ++i) {
if (retArr[i].indexOf(this.levelData.result) != -1) count += 1;
}
console.log(`所有结果`);
console.log(retArr);
if (count >= this.levelData.resultCount) return true;
return false;
}
getResult(numStrArr: string[]) {
let ret: any[] = [];
try{
try {
let tempArr: string[] = [];
tempArr = tempArr.concat(numStrArr);
ret.push(this.calculator(tempArr));
}
catch{
catch {
console.log(`错误的算式1`);
ret.push(null);
}
try{
try {
let tempArr: string[] = [];
tempArr = tempArr.concat(numStrArr);
tempArr = tempArr.reverse();
ret.push(this.calculator(tempArr));
}
catch{
catch {
console.log(`错误的算式2`);
ret.push(null);
}
......@@ -257,7 +320,7 @@ export class FormulaSolitaireCtr extends Component {
findLineWithPoint(point: ItemPosIfo) {
for (let i = 0; i < this.allLinePointArr.length; ++i) {
for (let j = 0; j < this.allLinePointArr[i].length; ++j) {
if (point.id== this.allLinePointArr[i][j].id) {
if (point.id == this.allLinePointArr[i][j].id) {
return this.allLinePointArr[i];
}
}
......@@ -267,12 +330,17 @@ export class FormulaSolitaireCtr extends Component {
gameStart() {
this.gameState = GAME_STATE.READY;
this.countdownLab.string = Utils.formatTime(Math.floor(this.totalTime * 1000));
this.usedColorArr = [];
this.curLinePointArr = [];
this.allLinePointArr = [];
this.loadLevelData();
this.resultLab.string = `正确答案:` + this.levelData.result;
this.creAllItem();
this.setBgSprSize();
this.gameState = GAME_STATE.IDLE;
viewMgr.openView(VIEW_DEF.BeginCountdownView, (node) => {
node.getComponent(BeginCountdownView)?.init();
}, VIEW_INDEX.UPPER);
}
getRandomItemColor() {
......@@ -295,6 +363,7 @@ export class FormulaSolitaireCtr extends Component {
this.itemPosIfoArr[i].target = node;
node.getComponent(FormulaSolitaireItem)?.setItemState(FS_ITEM_STATE.CENTER);
node.getComponent(FormulaSolitaireItem)?.setColor(Color.fromHEX(new Color(), this.orgColor));
node.getComponent(FormulaSolitaireItem)?.setText(this.levelData.formulaArr[this.itemPosIfoArr[i].yIdx][this.itemPosIfoArr[i].xIdx]);
}
}
......@@ -352,9 +421,12 @@ export class FormulaSolitaireCtr extends Component {
}
}
if (operatorIdx == 0 || operatorIdx == numStrArr.length - 1) {
throw new Error(`传入的算式不符合规则`);
throw new Error(`传入的算式不符合规则1`);
}
if (operatorIdx == -1) {
if (numStrArr.length == 1) return Number(numStrArr[0]);
else throw new Error(`传入的算式不符合规则2`);
}
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;
......@@ -415,7 +487,43 @@ export class FormulaSolitaireCtr extends Component {
return FS_ITEM_STATE.LEFT;
}
}
// update (deltaTime: number) {
// // [4]
// }
loadLevelData() {
switch (this.level) {
case 1:
this.levelData = FS_LV_1;
break;
case 2:
this.levelData = FS_LV_2;
break;
default:
this.levelData = FS_LV_1;
break;
}
this.row = this.levelData.row;
this.column = this.levelData.column;
}
//倒计时
countdownTime(dt: number) {
if (this.gameState == GAME_STATE.READY || this.gameState == GAME_STATE.END || this.gameState == GAME_STATE.PAUSE) {
return;
}
this.costTime += dt;
if (!this.isPlayCountdownMus && this.totalTime - this.costTime < 3.5) {
this.isPlayCountdownMus = true;
AudioMgr.playOneShot(countdownMus);
}
if (this.totalTime - this.costTime <= 0) {
console.log(`游戏时间到`);
this.gameEnd(false);
return;
}
this.countdownLab.string = Utils.formatTime(Math.floor((this.totalTime - this.costTime) * 1000));
}
update(deltaTime: number) {
// [4]
this.countdownTime(deltaTime);
}
}
\ No newline at end of file
......@@ -55,7 +55,7 @@ export class FormulaSolitaireItem extends Component {
setText(text: string){
this.textLab.string = text;
this.textLab.string = text;
this._text = text;
}
getText(){
......
......@@ -1137,4 +1137,32 @@ export const levelCfg: OneVarLevelItf[] = [
}
]
}
, {
gameIdHead: 190,
title: "数式接龙",
desc: "数式接龙,第一个版本",
levelArr: [{
gameId: 19001,
sceneUnitIfo: SCENE_DEF.FormulaSolitaire_1,
comName: "FormulaSolitaireCtr",
level: 1,
resData: {
totalTime: 60,
level: 1,
isShowGuide: true
}
}
, {
gameId: 19002,
sceneUnitIfo: SCENE_DEF.FormulaSolitaire_1,
comName: "FormulaSolitaireCtr",
level: 2,
resData: {
totalTime: 120,
level: 2
}
}
]
}
];
\ No newline at end of file
......@@ -26,7 +26,7 @@ export class LevelHomeCtr extends Component {
// [3]
if (!levelMgr.loadedOutData) {
levelMgr.loadedOutData = true;
levelMgr.gameIdHead = 180;
levelMgr.gameIdHead = 190;
levelMgr.unLockCount = 10;
if (Utils.getValueFromHref("gameIdHead")) {
levelMgr.gameIdHead = Number(Utils.getValueFromHref("gameIdHead"));
......
......@@ -105,6 +105,8 @@ interface ScenePathItf {
AdjacentArray_1: ScenePathUnitItf,
//纵横填数
VHFillNum_1: ScenePathUnitItf,
//数式接龙
FormulaSolitaire_1: ScenePathUnitItf,
}
export const SCENE_DEF: ScenePathItf = {
TestScene: {
......@@ -447,9 +449,14 @@ export const SCENE_DEF: ScenePathItf = {
sceneName: "AdjacentArray_1",
desc: "邻接数组,第一个版本"
},
VHFillNum_1: {
VHFillNum_1: {
bundleName: "sceneBundle",
sceneName: "VHFillNum_1",
desc: "纵横填数,第一个版本"
},
FormulaSolitaire_1: {
bundleName: "sceneBundle",
sceneName: "FormulaSolitaire_1",
desc: "数式接龙,第一个版本"
},
}
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