Commit accfd0ff authored by haiyoucuv's avatar haiyoucuv

init

parent 37868293
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 126 "__id__": 153
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 130 "__id__": 157
}, },
"_id": "53947ca7-3484-4b53-800d-509405063d68" "_id": "53947ca7-3484-4b53-800d-509405063d68"
}, },
...@@ -92,16 +92,16 @@ ...@@ -92,16 +92,16 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 122 "__id__": 149
}, },
{ {
"__id__": 123 "__id__": 150
}, },
{ {
"__id__": 124 "__id__": 151
}, },
{ {
"__id__": 125 "__id__": 152
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1806,10 +1806,10 @@ ...@@ -1806,10 +1806,10 @@
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
"handle": { "handle": {
"__id__": 116 "__id__": 143
}, },
"bg": { "bg": {
"__id__": 120 "__id__": 147
}, },
"normalSp": { "normalSp": {
"__uuid__": "7f413237-4b73-4bae-bca7-7ab9e9742ebc@f9941", "__uuid__": "7f413237-4b73-4bae-bca7-7ab9e9742ebc@f9941",
...@@ -1831,22 +1831,22 @@ ...@@ -1831,22 +1831,22 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 116 "__id__": 143
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 119 "__id__": 146
}, },
{ {
"__id__": 120 "__id__": 147
}, },
{ {
"__id__": 51 "__id__": 51
}, },
{ {
"__id__": 121 "__id__": 148
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1908,18 +1908,21 @@ ...@@ -1908,18 +1908,21 @@
}, },
{ {
"__id__": 106 "__id__": 106
},
{
"__id__": 113
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 113 "__id__": 140
}, },
{ {
"__id__": 114 "__id__": 141
}, },
{ {
"__id__": 115 "__id__": 142
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2052,7 +2055,7 @@ ...@@ -2052,7 +2055,7 @@
"__id__": 53 "__id__": 53
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 57 "__id__": 57
...@@ -3879,80 +3882,186 @@ ...@@ -3879,80 +3882,186 @@
"_id": "b8mmGmKndE0LJBMZ6aYkgE" "_id": "b8mmGmKndE0LJBMZ6aYkgE"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.Node",
"_name": "", "_name": "target",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "_parent": {
"__id__": 53 "__id__": 53
}, },
"_enabled": true, "_children": [
"__prefab": null, {
"_contentSize": { "__id__": 114
"__type__": "cc.Size",
"width": 1624,
"height": 750
}, },
"_anchorPoint": { {
"__type__": "cc.Vec2", "__id__": 130
"x": 0.5,
"y": 0.5
}, },
"_id": "33mxfvlWJOYoIbx4ZEAfKS" {
"__id__": 133
}
],
"_active": true,
"_components": [
{
"__id__": 137
}, },
{ {
"__type__": "cc.Canvas", "__id__": 138
"_name": "", },
{
"__id__": 139
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"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
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "b7dZUkRcFL6Zm67QkOK7zA"
},
{
"__type__": "cc.Node",
"_name": "倒计时背景",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "_parent": {
"__id__": 53 "__id__": 113
}, },
"_enabled": true, "_children": [
"__prefab": null, {
"_cameraComponent": { "__id__": 115
"__id__": 55 }
],
"_active": true,
"_components": [
{
"__id__": 128
}, },
"_alignCanvasWithScreen": true, {
"_id": "34wxp/0vpKH4Wcp1ieFQOS" "__id__": 129
}
],
"_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
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "81uk4rZUpHcqbF1sGIkuzj"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Node",
"_name": "", "_name": "cd",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "_parent": {
"__id__": 53 "__id__": 114
}, },
"_enabled": true, "_children": [
"__prefab": null, {
"_alignFlags": 45, "__id__": 116
"_target": null, },
"_left": 0, {
"_right": 0, "__id__": 119
"_top": 0, },
"_bottom": 0, {
"_horizontalCenter": 0, "__id__": 122
"_verticalCenter": 0, }
"_isAbsLeft": true, ],
"_isAbsRight": true, "_active": true,
"_isAbsTop": true, "_components": [
"_isAbsBottom": true, {
"_isAbsHorizontalCenter": true, "__id__": 125
"_isAbsVerticalCenter": true, },
"_originalWidth": 0, {
"_originalHeight": 0, "__id__": 126
"_alignMode": 2, },
"_lockFlags": 0, {
"_id": "06Ujytz0pEyLB5yn9hXAKx" "__id__": 127
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -30,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "c3X/jkEBJD6ZNJkVW36Qrf"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "handle", "_name": "还剩",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 52 "__id__": 115
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -3967,8 +4076,8 @@ ...@@ -3967,8 +4076,8 @@
"_prefab": null, "_prefab": null,
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": -36.4,
"y": 0, "y": -7.4499999999999975,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
...@@ -3992,7 +4101,7 @@ ...@@ -3992,7 +4101,7 @@
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
"_id": "afSm7CFGFEXrWoQl6Y6Gxn" "_id": "bfITLv6thArJx5R2ptQgaL"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -4006,18 +4115,18 @@ ...@@ -4006,18 +4115,18 @@
"__prefab": null, "__prefab": null,
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 60, "width": 40,
"height": 60 "height": 25.2
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0.5 "y": 0.5
}, },
"_id": "90ZZLRikdJoKqiyDQXUVwh" "_id": "ffI8JOfC1Pw5nrcaC/GTMs"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
...@@ -4031,29 +4140,992 @@ ...@@ -4031,29 +4140,992 @@
"_dstBlendFactor": 4, "_dstBlendFactor": 4,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 137,
"g": 255, "g": 111,
"b": 255, "b": 45,
"a": 255 "a": 255
}, },
"_spriteFrame": { "_string": "还剩",
"__uuid__": "3663d54b-ed86-4cd2-afb7-17cf31563804@f9941", "_horizontalAlign": 1,
"__expectedType__": "cc.SpriteFrame" "_verticalAlign": 1,
}, "_actualFontSize": 20,
"_type": 0, "_fontSize": 20,
"_fillType": 0, "_fontFamily": "Arial",
"_sizeMode": 1, "_lineHeight": 20,
"_fillCenter": { "_overflow": 0,
"__type__": "cc.Vec2", "_enableWrapText": true,
"x": 0, "_font": {
"y": 0 "__uuid__": "51c12289-a516-4991-8323-ac98cee8b520",
}, "__expectedType__": "cc.TTFFont"
"_fillStart": 0, },
"_fillRange": 0, "_isSystemFontUsed": false,
"_isTrimmedMode": true, "_spacingX": 0,
"_useGrayscale": false, "_isItalic": false,
"_atlas": null, "_isBold": false,
"_id": "6bMPXGycdENoxLG4JE1aI7" "_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "7cr9+mpVVAe40PRf6Varo8"
},
{
"__type__": "cc.Node",
"_name": "Label-001",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 115
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
},
{
"__id__": 121
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 10.000000000000007,
"y": 3.552713678800501e-15,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "4bV/R9tidFta4KOISFIph9"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 119
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 28.8,
"height": 40.1
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "ccFxb4/E9B9b8PQvIRF/0G"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 119
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 0,
"b": 0,
"a": 255
},
"_string": "5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 50,
"_fontSize": 50,
"_fontFamily": "Arial",
"_lineHeight": 40.1,
"_overflow": 0,
"_enableWrapText": true,
"_font": {
"__uuid__": "51c12289-a516-4991-8323-ac98cee8b520",
"__expectedType__": "cc.TTFFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 2,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "12MbzNMtRAFbq3reqF9L3S"
},
{
"__type__": "cc.Node",
"_name": "秒",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 115
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 123
},
{
"__id__": 124
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 46.4,
"y": -7.4499999999999975,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "77JhklPAdI87bMIptNR/0y"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 122
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 20,
"height": 25.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "day9Z6gG1JZrMfVDLPwcm4"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 122
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 137,
"g": 111,
"b": 45,
"a": 255
},
"_string": "秒",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 20,
"_overflow": 0,
"_enableWrapText": true,
"_font": {
"__uuid__": "51c12289-a516-4991-8323-ac98cee8b520",
"__expectedType__": "cc.TTFFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "0bdUsoA8dJeZhr4Fe19iqI"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 115
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 112.8,
"height": 40.10000000000001
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "ecbya306BKNLzzLMTfvoap"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 115
},
"_enabled": true,
"__prefab": null,
"_resizeMode": 1,
"_layoutType": 3,
"_cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_startAxis": 1,
"_paddingLeft": 0,
"_paddingRight": 0,
"_paddingTop": 0,
"_paddingBottom": 0,
"_spacingX": 12,
"_spacingY": 0,
"_verticalDirection": 0,
"_horizontalDirection": 0,
"_constraint": 0,
"_constraintNum": 2,
"_affectedByScale": false,
"_isAlign": false,
"_id": "a2q7wiJVNFCKClxlZU5Xn/"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 115
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 5,
"_target": null,
"_left": 70,
"_right": 70,
"_top": 9.949999999999996,
"_bottom": 9.949999999999996,
"_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": "83TOiWPN9L2KDEO7ip7eZO"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 114
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 240,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_id": "0df1CP5wRMqqokcEMTZYbO"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 114
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "c43af500-7323-4cfa-9738-490f627d956a@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": "9dB/uGoZ5CaIaF965thlWQ"
},
{
"__type__": "cc.Node",
"_name": "Graphics",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 113
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 131
},
{
"__id__": 132
}
],
"_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
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "8a+3OiYONHmIbYJoBb3GEL"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 130
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "72E5CX8/1M3IbNg/zGKYy6"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 130
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 3,
"_strokeColor": {
"__type__": "cc.Color",
"r": 255,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 0,
"b": 0,
"a": 255
},
"_miterLimit": 10,
"_id": "52G9lgUYNO6rYRJ0J2gjiD"
},
{
"__type__": "cc.Node",
"_name": "目标",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 113
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 134
},
{
"__id__": 135
},
{
"__id__": 136
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -82,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "87yiNs0WdJz47alsK9vuRq"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 133
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 86.94398498535156,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "5aLSwSWc9B1LSb55DyQFNt"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 133
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 51,
"g": 51,
"b": 51,
"a": 255
},
"_string": "存活10秒",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 22,
"_fontSize": 22,
"_fontFamily": "Arial",
"_lineHeight": 22,
"_overflow": 0,
"_enableWrapText": true,
"_font": {
"__uuid__": "51c12289-a516-4991-8323-ac98cee8b520",
"__expectedType__": "cc.TTFFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 1,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "f85xhgLrdJtbeLG4GvL9Hl"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 133
},
"_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": "bcbE54p9lJ8r8nZGmNKmnU"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 113
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "56OVu4dihBFaZLJO2vUu8e"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 113
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 17,
"_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": "06tku5v/VLoppTihseKod1"
},
{
"__type__": "63008uOBt9H6447o3VxyfFv",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 113
},
"_enabled": true,
"__prefab": null,
"graphics": {
"__id__": 132
},
"_id": "dfl2fX641H3qOpggystLiY"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 1624,
"height": 750
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "33mxfvlWJOYoIbx4ZEAfKS"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
},
"_enabled": true,
"__prefab": null,
"_cameraComponent": {
"__id__": 55
},
"_alignCanvasWithScreen": true,
"_id": "34wxp/0vpKH4Wcp1ieFQOS"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
},
"_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": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "06Ujytz0pEyLB5yn9hXAKx"
},
{
"__type__": "cc.Node",
"_name": "handle",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 52
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 144
},
{
"__id__": 145
}
],
"_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
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "afSm7CFGFEXrWoQl6Y6Gxn"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 143
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "90ZZLRikdJoKqiyDQXUVwh"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 143
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "3663d54b-ed86-4cd2-afb7-17cf31563804@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": "6bMPXGycdENoxLG4JE1aI7"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -4270,7 +5342,7 @@ ...@@ -4270,7 +5342,7 @@
"instance": null, "instance": null,
"targetOverrides": [ "targetOverrides": [
{ {
"__id__": 127 "__id__": 154
} }
], ],
"nestedPrefabInstanceRoots": [ "nestedPrefabInstanceRoots": [
...@@ -4288,7 +5360,7 @@ ...@@ -4288,7 +5360,7 @@
"__id__": 39 "__id__": 39
}, },
"sourceInfo": { "sourceInfo": {
"__id__": 128 "__id__": 155
}, },
"propertyPath": [ "propertyPath": [
"head" "head"
...@@ -4297,7 +5369,7 @@ ...@@ -4297,7 +5369,7 @@
"__id__": 39 "__id__": 39
}, },
"targetInfo": { "targetInfo": {
"__id__": 129 "__id__": 156
} }
}, },
{ {
...@@ -4315,28 +5387,28 @@ ...@@ -4315,28 +5387,28 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 131 "__id__": 158
}, },
"shadows": { "shadows": {
"__id__": 132 "__id__": 159
}, },
"_skybox": { "_skybox": {
"__id__": 133 "__id__": 160
}, },
"fog": { "fog": {
"__id__": 134 "__id__": 161
}, },
"octree": { "octree": {
"__id__": 135 "__id__": 162
}, },
"skin": { "skin": {
"__id__": 136 "__id__": 163
}, },
"lightProbeInfo": { "lightProbeInfo": {
"__id__": 137 "__id__": 164
}, },
"postSettings": { "postSettings": {
"__id__": 138 "__id__": 165
}, },
"bakedWithStationaryMainLight": false, "bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false "bakedWithHighpLightmap": false
......
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "c43af500-7323-4cfa-9738-490f627d956a",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "c43af500-7323-4cfa-9738-490f627d956a@6c48a",
"displayName": "倒计时背景",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "c43af500-7323-4cfa-9738-490f627d956a",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "c43af500-7323-4cfa-9738-490f627d956a@f9941",
"displayName": "倒计时背景",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 240,
"height": 60,
"rawWidth": 240,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-120,
-30,
0,
120,
-30,
0,
-120,
30,
0,
120,
30,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
60,
240,
60,
0,
0,
240,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-120,
-30,
0
],
"maxPos": [
120,
30,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "c43af500-7323-4cfa-9738-490f627d956a@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "c43af500-7323-4cfa-9738-490f627d956a@6c48a"
}
}
import { _decorator, Component, Graphics, math, misc, Node } from "cc";
const { ccclass, property, executeInEditMode } = _decorator;
@ccclass("Target")
@executeInEditMode()
export class Target extends Component {
@property(Graphics) graphics: Graphics = null;
start() {
// this.graphics.clear();
// this.graphics.moveTo(120, 0);
// this.graphics.lineTo(120, -51);
// this.graphics.arc(110, -51, 10, 0, -Math.PI / 2, false);
// this.graphics.lineTo(-110, -61);
// this.graphics.arc(-110, -51, 10, -Math.PI / 2, -Math.PI, false);
// this.graphics.lineTo(-120, 0);
// this.graphics.stroke();
this.drawProcess(0.5);
}
drawProcess = (() => {
const phases = [
51,
Math.PI / 2 * 10,
220,
Math.PI / 2 * 10,
51,
];
const totalLength = phases.reduce((a, b, i) => {
phases[i] = a + b;
return phases[i];
}, 0);
// Tip: 注意此时phases的结果
return (process: number) => {
// Ensure process is between 0 and 1
process = misc.clampf(process, 0, 1);
this.graphics.clear();
const targetLength = totalLength * process;
let currentLength = 0;
this.graphics.moveTo(120, 0);
// Draw vertical line on right
const rightVertical = Math.min(51, targetLength - currentLength);
if (rightVertical > 0) {
this.graphics.lineTo(120, -rightVertical);
currentLength += rightVertical;
if (currentLength >= targetLength) {
this.graphics.stroke();
return;
}
}
// Draw right arc
const rightArcLength = Math.PI * 10 / 2;
if (targetLength > currentLength) {
const rightArcAngle = Math.min((targetLength - currentLength) / 10, Math.PI / 2);
this.graphics.arc(110, -51, 10, 0, -rightArcAngle, false);
currentLength += rightArcLength;
if (currentLength >= targetLength) {
this.graphics.stroke();
return;
}
}
// Draw horizontal line
const horizontalLength = Math.min(220, targetLength - currentLength);
if (horizontalLength > 0) {
this.graphics.lineTo(-110 + (220 - horizontalLength), -61);
currentLength += horizontalLength;
if (currentLength >= targetLength) {
this.graphics.stroke();
return;
}
}
// Draw left arc
const leftArcLength = Math.PI * 10 / 2;
if (targetLength > currentLength) {
const leftArcAngle = Math.min((targetLength - currentLength) / 10, Math.PI / 2);
this.graphics.arc(-110, -51, 10, -Math.PI / 2, -Math.PI / 2 - leftArcAngle, false);
currentLength += leftArcLength;
if (currentLength >= targetLength) {
this.graphics.stroke();
return;
}
}
// Draw vertical line on left
const leftVertical = Math.min(51, targetLength - currentLength);
if (leftVertical > 0) {
this.graphics.lineTo(-120, -51 + leftVertical);
}
this.graphics.stroke();
};
})();
update(deltaTime: number) {
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "63008b8e-06df-47eb-8e3b-a37571c9f16f",
"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