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
12fad6ca
Commit
12fad6ca
authored
Dec 18, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
b0164a84
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1526 additions
and
703 deletions
+1526
-703
BlessingBagPage.scene
assets/Bundles/BlessingBagPage/BlessingBagPage.scene
+865
-442
earn_list_1.prefab
assets/Bundles/BlessingBagPage/earn_list_1.prefab
+90
-3
OpenLuckyPanel.prefab
assets/Bundles/OpenLuckyPanel/OpenLuckyPanel.prefab
+105
-37
PropPage.scene
assets/Bundles/PropPage/PropPage.scene
+63
-13
RankScene.scene
assets/Bundles/RankScene/RankScene.scene
+230
-169
AutoSkin.ts
assets/Scripts/AutoSkin.ts
+74
-23
OpenLuckyPanel.ts
assets/Scripts/Panels/OpenLuckyPanel.ts
+19
-5
Start.scene
assets/Start/Start.scene
+80
-11
No files found.
assets/Bundles/BlessingBagPage/BlessingBagPage.scene
View file @
12fad6ca
This diff is collapsed.
Click to expand it.
assets/Bundles/BlessingBagPage/earn_list_1.prefab
View file @
12fad6ca
...
...
@@ -38,10 +38,13 @@
},
{
"__id__": 48
},
{
"__id__": 50
}
],
"_prefab": {
"__id__": 5
0
"__id__": 5
4
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -785,6 +788,8 @@
"__id__": 0
},
"fileId": "dd2Foqv6hD7q6W6n32vozp",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
...
...
@@ -956,8 +961,11 @@
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_font": {
"__uuid__": "51c12289-a516-4991-8323-ac98cee8b520",
"__expectedType__": "cc.TTFFont"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
...
...
@@ -1257,6 +1265,85 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "77A/3U+EJIPodDESMu/Px2"
},
{
"__type__": "057b4KT4QZKeoxpS+8IVX1z",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 51
},
"skinNodeArr": [
{
"__id__": 52
},
{
"__id__": 53
}
],
"_genSkinNode": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "53Cs2sx6FM/JushGAwXjTF"
},
{
"__type__": "SkinNode",
"node": {
"__id__": 30
},
"type": 0,
"color1": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"color2": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"skin1": {
"__uuid__": "47ffddf6-9a25-40f2-98da-bb37598f9406@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "9f977aed-0e26-4e97-b30a-5c0af7a5832e@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
{
"__type__": "SkinNode",
"node": {
"__id__": 31
},
"type": 1,
"color1": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"color2": {
"__type__": "cc.Color",
"r": 51,
"g": 51,
"b": 51,
"a": 255
},
"skin1": null,
"skin2": null
},
{
"__type__": "cc.PrefabInfo",
"root": {
...
...
assets/Bundles/OpenLuckyPanel/OpenLuckyPanel.prefab
View file @
12fad6ca
...
...
@@ -50,10 +50,13 @@
},
{
"__id__": 152
},
{
"__id__": 154
}
],
"_prefab": {
"__id__": 15
4
"__id__": 15
7
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -430,7 +433,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
7clRBt1FtDvYOVJkDmT5Mx
"
"fileId": "
68VvtEuXRCm4JYZAF+2cum
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -472,7 +475,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
d9J+KB+mRBA4+1mfBUUJEs
"
"fileId": "
9cpVxGemBCeYYshgQ4BsyY
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -482,7 +485,7 @@
"asset": {
"__id__": 0
},
"fileId": "
1cdcVbq3NAmKHvIIyLiaLp
",
"fileId": "
28KwYcVjJOLL4v1SKMnvZF
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -563,7 +566,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
79OgcpITNA+KL7X9eAKeX4
"
"fileId": "
22ga0+/2lFrqzD7dyD+9Vp
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -605,7 +608,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
5cusFG5OJFhI/xsfbDmv2X
"
"fileId": "
0bnDCL5bpF04d0QFXqCAK4
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -615,7 +618,7 @@
"asset": {
"__id__": 0
},
"fileId": "
426//4omBEU60bjR3jGihX
",
"fileId": "
1cfh04IOJEMIKydxiWEb7D
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -696,7 +699,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
a4Z6sT2OVEuq7f2q713i/q
"
"fileId": "
f43Esp1tZDJpUgl4qujxLR
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -738,7 +741,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
376EHi8hVDWI+4n8+wZd7
B"
"fileId": "
f4SJYlBsdHB7lbOnXFdZg
B"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -748,7 +751,7 @@
"asset": {
"__id__": 0
},
"fileId": "
42MoPEoLhIKKWFcRPl4zqc
",
"fileId": "
b7CD3YbqVHG5cyGvn8xNU6
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -829,7 +832,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
85lJpIOixKCa3r3lH31sji
"
"fileId": "
c0Z+AayadL6oLZpwVuU6Sj
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -871,7 +874,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c
6sCu+ZldAAbGV+mL+148q
"
"fileId": "c
c6DN35OxFrrgEo0cINs1G
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -881,7 +884,7 @@
"asset": {
"__id__": 0
},
"fileId": "
d8I/d1I0pHM7VmVWggBdiC
",
"fileId": "
ecoA3wqINNVJOyflc4nHgc
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -962,7 +965,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0
bPrs6YNFLcaI01kssjnbh
"
"fileId": "0
6l1mmiQ9PX4IeSxzG/7F8
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1004,7 +1007,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
07rx1yg0dDNZpug8sv1HYS
"
"fileId": "
4fNHgz4nJAdIA0eIxpxb/V
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1014,7 +1017,7 @@
"asset": {
"__id__": 0
},
"fileId": "
728Rqm0BNGyY71jyintk/P
",
"fileId": "
1bRv/TQwtNHIFOo3uJJ8Qf
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1095,7 +1098,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
42Sn9dhsRD8Ytvw37JJuFN
"
"fileId": "
1biBz4dqtKEKOYzUnKPRq6
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1137,7 +1140,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
34iIY2HwpEK5CsFMUg2veY
"
"fileId": "
08o5OR+vtHmqwlXnDlgb73
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1147,7 +1150,7 @@
"asset": {
"__id__": 0
},
"fileId": "
478mzvcLhDEbEw7Hnbwd26
",
"fileId": "
61kAPU1d1DWbnWnoUkxAzy
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1228,7 +1231,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
bd1tOHYs9ET75/5ECo6oLk
"
"fileId": "
8deEuWMJpEhoJqHon3acD/
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1270,7 +1273,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
ee3JAgV5RO17c9OA3lPycE
"
"fileId": "
66repdsHxLdogtWJ6vzLAr
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1280,7 +1283,7 @@
"asset": {
"__id__": 0
},
"fileId": "
60yf6lYzlK2IV9siDa58F9
",
"fileId": "
07E8nnqrVEJIgOvR/WJ7PH
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1361,7 +1364,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
1dZg3Ry5tBl5rehr9J1+C7
"
"fileId": "
31ES87d5NMj4qeGexqS7Ud
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1403,7 +1406,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
53Hg3kS6BLnLEnz1J221Jc
"
"fileId": "
c3H/SAjA5N3Iiv6QiYCUnH
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1413,7 +1416,7 @@
"asset": {
"__id__": 0
},
"fileId": "1
4gdOT189O85UrP5zuOGRo
",
"fileId": "1
e5TUORsNHFbjmdInSJczY
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1494,7 +1497,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
1bo4yWoEhBLb0kEfE5zkSf
"
"fileId": "
d1R1LpJWVIKZHieclLdeQ1
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1536,7 +1539,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
c9xAkXo7RPUbJ8Y7hcAcAP
"
"fileId": "
45pUxyFflDmLPyMb7joN1y
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1546,7 +1549,7 @@
"asset": {
"__id__": 0
},
"fileId": "
29cs9eFI1BVomuQ38Er+qt
",
"fileId": "
5bwDIN4vFB6oKiBzkM8ZvF
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1627,7 +1630,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
daS6ZBaA1MmKcnHpYBSCyM
"
"fileId": "
7cw97s/t5Gt59DiaHxC9+U
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1669,7 +1672,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
55VAYX6L5NrqJuWxaYHaua
"
"fileId": "
c3jWHh5M5FmKbbCDehaOgl
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1679,7 +1682,7 @@
"asset": {
"__id__": 0
},
"fileId": "
d3Hi/xCLdBy7btoch51QXa
",
"fileId": "
469aUxtq9CyqEUXpVmCqTm
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1760,7 +1763,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
c5WeA34MdJA7APgCT6q5LX
"
"fileId": "
02DiGauPBCm6HQ41kzih6P
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1802,7 +1805,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2
9GQZygwxDGZmwaRnUcGa9
"
"fileId": "2
73xOfkd9AXalpEtN5RGXs
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1812,7 +1815,7 @@
"asset": {
"__id__": 0
},
"fileId": "
b2802SJglICqKcoQbANU8m
",
"fileId": "
0dPyua8BpJaJob56QrT8j3
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -1893,7 +1896,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
2bwKVbWsRPgIWgBzvV1lFB
"
"fileId": "
5aImpmytBJ1Jfo6wtR+i9s
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1935,7 +1938,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "
b8LdYjaSxKI56uFsrzC9HV
"
"fileId": "
246sDWE4pLRKcJ9//jODtf
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1945,7 +1948,7 @@
"asset": {
"__id__": 0
},
"fileId": "
6eI6Db4mhMIJrP+Lobb2NV
",
"fileId": "
d6cIs7IQ9D8qV0S6TUNaVw
",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
...
...
@@ -3499,12 +3502,77 @@
"__uuid__": "a29ee445-fb60-49eb-b22f-1888690aa391@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"sliverBag2": {
"__uuid__": "deb460a3-9320-4614-99bc-963bd73496d5@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"goldBag2": {
"__uuid__": "51888e3f-0c3e-4aab-b998-8c54ce990185@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"diamondBag2": {
"__uuid__": "3f3ff295-1508-442a-8df9-6a8ffcd2361e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "cfN+TNTZROFaES36YzYuU+"
},
{
"__type__": "057b4KT4QZKeoxpS+8IVX1z",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 155
},
"skinNodeArr": [
{
"__id__": 156
}
],
"_genSkinNode": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e5TgNop4FD0Y1qNb7A11vY"
},
{
"__type__": "SkinNode",
"node": {
"__id__": 98
},
"type": 0,
"color1": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"color2": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"skin1": {
"__uuid__": "406a705b-d498-412a-8326-3fd42feafd7e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "e8bc981a-8ec7-4573-be02-5f99a4e0f3f6@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
{
"__type__": "cc.PrefabInfo",
"root": {
...
...
assets/Bundles/PropPage/PropPage.scene
View file @
12fad6ca
...
...
@@ -23,7 +23,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 4
4
"__id__": 4
6
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -54,7 +54,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 4
7
"__id__": 4
9
},
"_id": "bbf4500c-d4d5-4452-87cb-d464062a3f41"
},
...
...
@@ -99,6 +99,9 @@
},
{
"__id__": 43
},
{
"__id__": 44
}
],
"_prefab": null,
...
...
@@ -190,7 +193,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight":
850.9565217391305
,
"_orthoHeight":
739.6666666666667
,
"_near": 1,
"_far": 2000,
"_color": {
...
...
@@ -1595,6 +1598,53 @@
"listComp": null,
"_id": "6fb2Gu9kBBIZWw8cJg1055"
},
{
"__type__": "057b4KT4QZKeoxpS+8IVX1z",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": null,
"skinNodeArr": [
{
"__id__": 45
}
],
"_genSkinNode": true,
"_id": "939gRsCOZPY771yRd4LTqp"
},
{
"__type__": "SkinNode",
"node": {
"__id__": 35
},
"type": 0,
"color1": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"color2": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"skin1": {
"__uuid__": "6ca595a2-0aa7-4634-a4be-fe0ee4ce1dc8@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "08a7d346-f4a0-49b3-8be3-2564e4705eb3@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
{
"__type__": "cc.PrefabInfo",
"root": null,
...
...
@@ -1603,7 +1653,7 @@
"instance": null,
"targetOverrides": [
{
"__id__": 4
5
"__id__": 4
7
}
]
},
...
...
@@ -1618,7 +1668,7 @@
],
"target": null,
"targetInfo": {
"__id__": 4
6
"__id__": 4
8
}
},
{
...
...
@@ -1630,28 +1680,28 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__":
48
"__id__":
50
},
"shadows": {
"__id__":
49
"__id__":
51
},
"_skybox": {
"__id__": 5
0
"__id__": 5
2
},
"fog": {
"__id__": 5
1
"__id__": 5
3
},
"octree": {
"__id__": 5
2
"__id__": 5
4
},
"skin": {
"__id__": 5
3
"__id__": 5
5
},
"lightProbeInfo": {
"__id__": 5
4
"__id__": 5
6
},
"postSettings": {
"__id__": 5
5
"__id__": 5
7
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
...
...
assets/Bundles/RankScene/RankScene.scene
View file @
12fad6ca
This diff is collapsed.
Click to expand it.
assets/Scripts/AutoSkin.ts
View file @
12fad6ca
import
{
_decorator
,
Co
mponent
,
Node
,
Sprite
,
SpriteFrame
}
from
"cc"
;
import
{
_decorator
,
Co
lor
,
Component
,
Enum
,
Label
,
Node
,
Sprite
,
SpriteFrame
}
from
"cc"
;
import
{
getUrlParams
}
from
"./Utils/WebNet/web/webTools"
;
import
Svga
from
"../Component/Svga/Svga"
;
const
{
ccclass
,
property
,
executeInEditMode
}
=
_decorator
;
const
{
ccclass
,
property
,
executeInEditMode
,
disallowMultiple
,
executionOrder
}
=
_decorator
;
enum
ESkinType
{
Sprite
,
Label
}
Enum
(
ESkinType
);
@
ccclass
(
"SkinNode"
)
class
SkinNode
{
@
property
(
Node
)
node
:
Node
=
null
;
@
property
(
SpriteFrame
)
skin1
:
SpriteFrame
=
null
;
@
property
(
SpriteFrame
)
skin2
:
SpriteFrame
=
null
;
@
property
({
type
:
ESkinType
})
type
:
ESkinType
=
ESkinType
.
Sprite
;
@
property
({
type
:
Color
,
visible
:
function
(
this
)
{
return
this
.
type
==
ESkinType
.
Label
;
}
})
color1
:
Color
;
@
property
({
type
:
Color
,
visible
:
function
(
this
)
{
return
this
.
type
==
ESkinType
.
Label
;
}
})
color2
:
Color
;
@
property
({
type
:
SpriteFrame
,
visible
:
function
(
this
)
{
return
this
.
type
==
ESkinType
.
Sprite
;
}
})
skin1
:
SpriteFrame
=
null
;
@
property
({
type
:
SpriteFrame
,
visible
:
function
(
this
)
{
return
this
.
type
==
ESkinType
.
Sprite
;
}
})
skin2
:
SpriteFrame
=
null
;
}
@
ccclass
(
"AutoSkin"
)
@
executeInEditMode
@
executionOrder
(
-
1
)
@
disallowMultiple
()
export
class
AutoSkin
extends
Component
{
@
property
([
SkinNode
])
skinNodeArr
:
SkinNode
[]
=
[];
...
...
@@ -26,22 +63,32 @@ export class AutoSkin extends Component {
if
(
+
type
==
1
)
{
// 赵一鸣,红色版本
this
.
skinNodeArr
.
forEach
((
skNode
:
SkinNode
)
=>
{
if
(
skNode
.
node
&&
skNode
.
skin1
)
{
if
(
!
skNode
.
node
)
return
;
if
(
skNode
.
type
==
ESkinType
.
Sprite
&&
skNode
.
skin1
)
{
skNode
.
node
.
getComponent
(
Sprite
).
spriteFrame
=
skNode
.
skin1
;
}
else
if
(
skNode
.
type
==
ESkinType
.
Label
&&
skNode
.
color1
)
{
skNode
.
node
.
getComponent
(
Label
).
color
=
skNode
.
color1
;
}
});
}
else
{
// 零食很忙,黄色版本
this
.
skinNodeArr
.
forEach
((
skNode
:
SkinNode
)
=>
{
if
(
skNode
.
node
&&
skNode
.
skin2
)
{
if
(
!
skNode
.
node
)
return
;
if
(
skNode
.
type
==
ESkinType
.
Sprite
&&
skNode
.
skin2
)
{
skNode
.
node
.
getComponent
(
Sprite
).
spriteFrame
=
skNode
.
skin2
;
}
else
if
(
skNode
.
type
==
ESkinType
.
Label
&&
skNode
.
color2
)
{
skNode
.
node
.
getComponent
(
Label
).
color
=
skNode
.
color2
;
}
});
}
}
@
property
private
_genSkinNode
=
tru
e
;
private
_genSkinNode
=
fals
e
;
@
property
get
genSkinNode
()
{
...
...
@@ -54,34 +101,38 @@ export class AutoSkin extends Component {
}
genNodeList
()
{
const
nodeArr
:
Node
[]
=
[];
const
loopList
:
Node
[]
=
[
this
.
node
];
const
ids
=
this
.
skinNodeArr
.
map
((
skNode
:
SkinNode
)
=>
{
return
skNode
.
node
.
uuid
;
});
while
(
loopList
.
length
>
0
)
{
const
node
=
loopList
[
0
];
loopList
.
shift
();
if
(
!
node
.
getComponent
(
Svga
))
{
loopList
.
push
(...
node
.
children
)
loopList
.
unshift
(...
node
.
children
);
}
console
.
log
(
loopList
)
;
if
(
ids
.
indexOf
(
node
.
uuid
)
>
-
1
)
return
;
if
(
node
.
getComponent
(
Sprite
))
{
nodeArr
.
push
(
node
);
const
skNode
=
new
SkinNode
();
skNode
.
node
=
node
;
skNode
.
type
=
ESkinType
.
Sprite
;
skNode
.
skin1
=
node
.
getComponent
(
Sprite
).
spriteFrame
;
this
.
skinNodeArr
.
push
(
skNode
);
}
}
const
ids
=
this
.
skinNodeArr
.
map
((
skNode
:
SkinNode
)
=>
{
return
skNode
.
node
.
uuid
;
});
nodeArr
.
forEach
((
node
:
Node
)
=>
{
if
(
ids
.
indexOf
(
node
.
uuid
)
>
-
1
)
{
return
;
if
(
node
.
getComponent
(
Label
))
{
const
skNode
=
new
SkinNode
();
skNode
.
node
=
node
;
skNode
.
type
=
ESkinType
.
Label
;
skNode
.
color1
=
Color
.
clone
(
node
.
getComponent
(
Label
).
color
);
this
.
skinNodeArr
.
push
(
skNode
);
}
const
skNode
=
new
SkinNode
();
skNode
.
node
=
node
;
this
.
skinNodeArr
.
push
(
skNode
);
});
}
}
...
...
assets/Scripts/Panels/OpenLuckyPanel.ts
View file @
12fad6ca
...
...
@@ -7,6 +7,7 @@ import GetPrize from "db://assets/Scripts/Panels/GetPrize";
import
{
_asyncThrottle
,
sleep
}
from
"../Utils/Utils"
;
import
{
AudioMgr
}
from
"db://assets/core_tgx/base/AudioMgr"
;
import
store
from
"../store/store"
;
import
{
getUrlParams
}
from
"../Utils/WebNet/web/webTools"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -31,6 +32,10 @@ export default class OpenLuckyPanel extends Panel {
@
property
(
SpriteFrame
)
goldBag
:
SpriteFrame
=
null
;
@
property
(
SpriteFrame
)
diamondBag
:
SpriteFrame
=
null
;
@
property
(
SpriteFrame
)
sliverBag2
:
SpriteFrame
=
null
;
@
property
(
SpriteFrame
)
goldBag2
:
SpriteFrame
=
null
;
@
property
(
SpriteFrame
)
diamondBag2
:
SpriteFrame
=
null
;
onLoad
()
{
this
.
open
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickOpen
,
this
);
...
...
@@ -39,11 +44,20 @@ export default class OpenLuckyPanel extends Panel {
start
()
{
const
{
type
,
num
=
1
}
=
this
.
data
;
this
.
bag
.
getComponent
(
Sprite
).
spriteFrame
=
{
"sliver"
:
this
.
sliverBag
,
"gold"
:
this
.
goldBag
,
"diamond"
:
this
.
diamondBag
,
}[
type
]
||
this
.
sliverBag
;
if
(
+
getUrlParams
(
"type"
)
==
1
)
{
this
.
bag
.
getComponent
(
Sprite
).
spriteFrame
=
{
"sliver"
:
this
.
sliverBag
,
"gold"
:
this
.
goldBag
,
"diamond"
:
this
.
diamondBag
,
}[
type
]
||
this
.
sliverBag
;
}
else
{
this
.
bag
.
getComponent
(
Sprite
).
spriteFrame
=
{
"sliver"
:
this
.
sliverBag2
,
"gold"
:
this
.
goldBag2
,
"diamond"
:
this
.
diamondBag2
,
}[
type
]
||
this
.
sliverBag2
;
}
this
.
x5
.
active
=
num
==
5
;
}
...
...
assets/Start/Start.scene
View file @
12fad6ca
...
...
@@ -23,7 +23,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 3
0
"__id__": 3
4
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -54,7 +54,7 @@
},
"autoReleaseAssets": true,
"_globals": {
"__id__": 3
1
"__id__": 3
5
},
"_id": "9e293cde-e27b-4902-808b-e884f3e9da32"
},
...
...
@@ -93,6 +93,9 @@
},
{
"__id__": 29
},
{
"__id__": 30
}
],
"_prefab": null,
...
...
@@ -184,7 +187,7 @@
"_priority": 65535,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight":
406
,
"_orthoHeight":
739.6666666666667
,
"_near": 1,
"_far": 2000,
"_color": {
...
...
@@ -1072,6 +1075,72 @@
},
"_id": "ccwYlVBqtP3qOrWWpSPSZW"
},
{
"__type__": "057b4KT4QZKeoxpS+8IVX1z",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": null,
"skinNodeArr": [
{
"__id__": 31
},
{
"__id__": 32
},
{
"__id__": 33
}
],
"_genSkinNode": true,
"_id": "81MnN5FOZO9okRsQyfRxCD"
},
{
"__type__": "SkinNode",
"node": {
"__id__": 9
},
"skin1": {
"__uuid__": "4a038fd0-6019-4409-bb30-663b83a756eb@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "eb2abb13-dd12-481c-b88d-a6edd827eac5@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
{
"__type__": "SkinNode",
"node": {
"__id__": 14
},
"skin1": {
"__uuid__": "a5636d44-661d-4e68-8eda-f0fd9b5cd647@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "e0130c0f-2d6a-408c-a775-126f3a888ce9@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
{
"__type__": "SkinNode",
"node": {
"__id__": 17
},
"skin1": {
"__uuid__": "979b8e0b-ee8a-4711-8627-55773ac71179@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "ec31c82f-98eb-43e6-9a17-58ad6684f02d@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
{
"__type__": "cc.PrefabInfo",
"root": null,
...
...
@@ -1083,28 +1152,28 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 3
2
"__id__": 3
6
},
"shadows": {
"__id__": 3
3
"__id__": 3
7
},
"_skybox": {
"__id__": 3
4
"__id__": 3
8
},
"fog": {
"__id__": 3
5
"__id__": 3
9
},
"octree": {
"__id__":
36
"__id__":
40
},
"skin": {
"__id__":
37
"__id__":
41
},
"lightProbeInfo": {
"__id__":
38
"__id__":
42
},
"postSettings": {
"__id__":
39
"__id__":
43
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
...
...
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