Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
accfd0ff
Commit
accfd0ff
authored
Nov 26, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
37868293
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1431 additions
and
106 deletions
+1431
-106
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+1178
-106
倒计时背景.png
assets/Bundles/MainGame/png/倒计时背景.png
+0
-0
倒计时背景.png.meta
assets/Bundles/MainGame/png/倒计时背景.png.meta
+134
-0
Target.ts
assets/Scripts/Scenes/MainGame/Components/Target.ts
+110
-0
Target.ts.meta
assets/Scripts/Scenes/MainGame/Components/Target.ts.meta
+9
-0
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
accfd0ff
...
...
@@ -26,7 +26,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 1
26
"__id__": 1
53
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -57,7 +57,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 1
30
"__id__": 1
57
},
"_id": "53947ca7-3484-4b53-800d-509405063d68"
},
...
...
@@ -92,16 +92,16 @@
"_active": true,
"_components": [
{
"__id__": 1
22
"__id__": 1
49
},
{
"__id__": 1
23
"__id__": 1
50
},
{
"__id__": 1
24
"__id__": 1
51
},
{
"__id__": 1
25
"__id__": 1
52
}
],
"_prefab": null,
...
...
@@ -1806,10 +1806,10 @@
"_enabled": true,
"__prefab": null,
"handle": {
"__id__": 1
16
"__id__": 1
43
},
"bg": {
"__id__": 1
20
"__id__": 1
47
},
"normalSp": {
"__uuid__": "7f413237-4b73-4bae-bca7-7ab9e9742ebc@f9941",
...
...
@@ -1831,22 +1831,22 @@
},
"_children": [
{
"__id__": 1
16
"__id__": 1
43
}
],
"_active": true,
"_components": [
{
"__id__": 1
19
"__id__": 1
46
},
{
"__id__": 1
20
"__id__": 1
47
},
{
"__id__": 51
},
{
"__id__": 1
21
"__id__": 1
48
}
],
"_prefab": null,
...
...
@@ -1908,18 +1908,21 @@
},
{
"__id__": 106
},
{
"__id__": 113
}
],
"_active": true,
"_components": [
{
"__id__": 1
13
"__id__": 1
40
},
{
"__id__": 1
14
"__id__": 1
41
},
{
"__id__": 1
15
"__id__": 1
42
}
],
"_prefab": null,
...
...
@@ -2052,7 +2055,7 @@
"__id__": 53
},
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
{
"__id__": 57
...
...
@@ -3879,80 +3882,186 @@
"_id": "b8mmGmKndE0LJBMZ6aYkgE"
},
{
"__type__": "cc.
UITransform
",
"_name": "",
"__type__": "cc.
Node
",
"_name": "
target
",
"_objFlags": 0,
"__editorExtras__": {},
"
node
": {
"
_parent
": {
"__id__": 53
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 1624,
"height": 750
"_children": [
{
"__id__": 114
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
{
"__id__": 130
},
"_id": "33mxfvlWJOYoIbx4ZEAfKS"
{
"__id__": 133
}
],
"_active": true,
"_components": [
{
"__id__": 137
},
{
"__type__": "cc.Canvas",
"_name": "",
"__id__": 138
},
{
"__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,
"__editorExtras__": {},
"
node
": {
"__id__":
5
3
"
_parent
": {
"__id__":
11
3
},
"_enabled": true,
"__prefab": null,
"_cameraComponent": {
"__id__": 55
"_children": [
{
"__id__": 115
}
],
"_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
",
"_name": "",
"__type__": "cc.
Node
",
"_name": "
cd
",
"_objFlags": 0,
"__editorExtras__": {},
"
node
": {
"__id__":
53
"
_parent
": {
"__id__":
114
},
"_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"
"_children": [
{
"__id__": 116
},
{
"__id__": 119
},
{
"__id__": 122
}
],
"_active": true,
"_components": [
{
"__id__": 125
},
{
"__id__": 126
},
{
"__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",
"_name": "
handle
",
"_name": "
还剩
",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__":
52
"__id__":
115
},
"_children": [],
"_active": true,
...
...
@@ -3967,8 +4076,8 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x":
0
,
"y":
0
,
"x":
-36.4
,
"y":
-7.4499999999999975
,
"z": 0
},
"_lrot": {
...
...
@@ -3992,7 +4101,7 @@
"y": 0,
"z": 0
},
"_id": "
afSm7CFGFEXrWoQl6Y6Gxn
"
"_id": "
bfITLv6thArJx5R2ptQgaL
"
},
{
"__type__": "cc.UITransform",
...
...
@@ -4006,18 +4115,18 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width":
6
0,
"height":
60
"width":
4
0,
"height":
25.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "
90ZZLRikdJoKqiyDQXUVwh
"
"_id": "
ffI8JOfC1Pw5nrcaC/GTMs
"
},
{
"__type__": "cc.
Sprite
",
"__type__": "cc.
Label
",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
...
...
@@ -4031,29 +4140,992 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r":
255
,
"g":
255
,
"b":
25
5,
"r":
137
,
"g":
111
,
"b":
4
5,
"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"
"_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": "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",
...
...
@@ -4270,7 +5342,7 @@
"instance": null,
"targetOverrides": [
{
"__id__": 1
27
"__id__": 1
54
}
],
"nestedPrefabInstanceRoots": [
...
...
@@ -4288,7 +5360,7 @@
"__id__": 39
},
"sourceInfo": {
"__id__": 1
28
"__id__": 1
55
},
"propertyPath": [
"head"
...
...
@@ -4297,7 +5369,7 @@
"__id__": 39
},
"targetInfo": {
"__id__": 1
29
"__id__": 1
56
}
},
{
...
...
@@ -4315,28 +5387,28 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 1
31
"__id__": 1
58
},
"shadows": {
"__id__": 1
32
"__id__": 1
59
},
"_skybox": {
"__id__": 1
33
"__id__": 1
60
},
"fog": {
"__id__": 1
34
"__id__": 1
61
},
"octree": {
"__id__": 1
35
"__id__": 1
62
},
"skin": {
"__id__": 1
36
"__id__": 1
63
},
"lightProbeInfo": {
"__id__": 1
37
"__id__": 1
64
},
"postSettings": {
"__id__": 1
38
"__id__": 1
65
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
...
...
assets/Bundles/MainGame/png/倒计时背景.png
0 → 100644
View file @
accfd0ff
881 Bytes
assets/Bundles/MainGame/png/倒计时背景.png.meta
0 → 100644
View file @
accfd0ff
{
"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"
}
}
assets/Scripts/Scenes/MainGame/Components/Target.ts
0 → 100644
View file @
accfd0ff
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
)
{
}
}
assets/Scripts/Scenes/MainGame/Components/Target.ts.meta
0 → 100644
View file @
accfd0ff
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "63008b8e-06df-47eb-8e3b-a37571c9f16f",
"files": [],
"subMetas": {},
"userData": {}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment