开始商店 脚本和ui

This commit is contained in:
2025-08-20 17:46:06 +08:00
parent b531948d4d
commit 1896b5fab0
22 changed files with 9189 additions and 11412 deletions

View File

@@ -23104,7 +23104,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -242.5,
"x": -202.5,
"y": 0,
"z": 0
},
@@ -23154,7 +23154,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 25.6,
"x": 19.2,
"y": 0,
"z": 0
},
@@ -23293,7 +23293,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 153.89921875,
"x": 113.91904296875,
"y": 0,
"z": 0
},
@@ -23334,7 +23334,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100.69921875,
"width": 73.51904296875,
"height": 54.4
},
"_anchorPoint": {
@@ -23370,11 +23370,11 @@
"b": 0,
"a": 255
},
"_string": "{{0:kmbt}}",
"_string": "99999",
"_horizontalAlign": 2,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -23424,7 +23424,7 @@
"node": {
"__id__": 1022
},
"_enabled": true,
"_enabled": false,
"__prefab": {
"__id__": 1028
},
@@ -23476,7 +23476,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 155.89921875,
"x": 115.91904296875,
"y": 0,
"z": 0
},
@@ -23635,7 +23635,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 170.2341796875,
"x": 130.25400390625,
"y": 0,
"z": 0
},
@@ -23676,7 +23676,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 37.369140625,
"width": 73.51904296875,
"height": 54.4
},
"_anchorPoint": {
@@ -23712,11 +23712,11 @@
"b": 255,
"a": 255
},
"_string": "999",
"_string": "99999",
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -23785,7 +23785,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 240,
"width": 200,
"height": 100
},
"_anchorPoint": {
@@ -23936,7 +23936,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 25.6,
"x": 19.2,
"y": 0,
"z": 0
},
@@ -24075,7 +24075,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 153.89921875,
"x": 113.91904296875,
"y": 0,
"z": 0
},
@@ -24116,7 +24116,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100.69921875,
"width": 73.51904296875,
"height": 54.4
},
"_anchorPoint": {
@@ -24152,11 +24152,11 @@
"b": 20,
"a": 255
},
"_string": "{{0:kmbt}}",
"_string": "99999",
"_horizontalAlign": 2,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -24206,7 +24206,7 @@
"node": {
"__id__": 1054
},
"_enabled": true,
"_enabled": false,
"__prefab": {
"__id__": 1060
},
@@ -24258,7 +24258,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 155.89921875,
"x": 115.91904296875,
"y": 0,
"z": 0
},
@@ -24417,7 +24417,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 170.2341796875,
"x": 130.25400390625,
"y": 0,
"z": 0
},
@@ -24458,7 +24458,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 37.369140625,
"width": 73.51904296875,
"height": 54.4
},
"_anchorPoint": {
@@ -24494,11 +24494,11 @@
"b": 255,
"a": 255
},
"_string": "999",
"_string": "99999",
"_horizontalAlign": 0,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
@@ -24567,7 +24567,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 240,
"width": 200,
"height": 100
},
"_anchorPoint": {
@@ -24646,7 +24646,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 485,
"width": 405,
"height": 50
},
"_anchorPoint": {
@@ -24674,8 +24674,8 @@
},
"_alignFlags": 45,
"_target": null,
"_left": 97.5,
"_right": 97.5,
"_left": 137.5,
"_right": 137.5,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "39d50326-6ef1-4c37-814e-a8034d3c1f2d",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "goods"
}
}

View File

@@ -17,9 +17,9 @@
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{93,1},{44,52}}</string>
<string>{{57,153},{44,52}}</string>
<key>textureRotated</key>
<false/>
<true/>
</dict>
<key>1002.png</key>
<dict>
@@ -34,9 +34,9 @@
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{139,1},{44,52}}</string>
<string>{{1,187},{44,52}}</string>
<key>textureRotated</key>
<false/>
<true/>
</dict>
<key>1003.png</key>
<dict>
@@ -51,9 +51,9 @@
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{185,1},{44,52}}</string>
<string>{{55,199},{44,52}}</string>
<key>textureRotated</key>
<false/>
<true/>
</dict>
<key>1004.png</key>
<dict>
@@ -68,9 +68,9 @@
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{231,1},{44,52}}</string>
<string>{{1,233},{44,52}}</string>
<key>textureRotated</key>
<false/>
<true/>
</dict>
<key>1005.png</key>
<dict>
@@ -85,7 +85,7 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{771,1},{45,49}}</string>
<string>{{64,1},{45,49}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -102,9 +102,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{432,1},{51,47}}</string>
<string>{{54,296},{51,47}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1007.png</key>
<dict>
@@ -119,9 +119,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{481,1},{51,47}}</string>
<string>{{1,330},{51,47}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1008.png</key>
<dict>
@@ -136,9 +136,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{530,1},{51,47}}</string>
<string>{{54,345},{51,47}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1009.png</key>
<dict>
@@ -153,9 +153,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{726,1},{51,43}}</string>
<string>{{54,443},{51,43}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1010.png</key>
<dict>
@@ -170,9 +170,9 @@
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{1,1},{42,56}}</string>
<string>{{1,51},{42,56}}</string>
<key>textureRotated</key>
<false/>
<true/>
</dict>
<key>1011.png</key>
<dict>
@@ -187,9 +187,9 @@
<key>spriteSourceSize</key>
<string>{64,64}</string>
<key>textureRect</key>
<string>{{45,1},{46,54}}</string>
<string>{{1,139},{46,54}}</string>
<key>textureRotated</key>
<false/>
<true/>
</dict>
<key>1012.png</key>
<dict>
@@ -204,9 +204,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{579,1},{51,47}}</string>
<string>{{1,379},{51,47}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1013.png</key>
<dict>
@@ -221,9 +221,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{628,1},{51,47}}</string>
<string>{{54,394},{51,47}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1014.png</key>
<dict>
@@ -238,9 +238,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{381,1},{51,49}}</string>
<string>{{55,245},{51,49}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1015.png</key>
<dict>
@@ -255,9 +255,9 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{677,1},{51,47}}</string>
<string>{{1,428},{51,47}}</string>
<key>textureRotated</key>
<true/>
<false/>
</dict>
<key>1016.png</key>
<dict>
@@ -272,7 +272,7 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{277,1},{51,51}}</string>
<string>{{58,100},{51,51}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -289,7 +289,160 @@
<key>spriteSourceSize</key>
<string>{51,51}</string>
<key>textureRect</key>
<string>{{330,1},{49,51}}</string>
<string>{{1,279},{49,51}}</string>
<key>textureRotated</key>
<true/>
</dict>
<key>9001.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{45,38}</string>
<key>spriteSourceSize</key>
<string>{45,38}</string>
<key>textureRect</key>
<string>{{1,565},{45,38}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9002.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{55,42}</string>
<key>spriteSourceSize</key>
<string>{55,42}</string>
<key>textureRect</key>
<string>{{1,95},{55,42}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9003.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{48,42}</string>
<key>spriteSourceSize</key>
<string>{48,42}</string>
<key>textureRect</key>
<string>{{1,477},{48,42}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9004.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{45,33}</string>
<key>spriteSourceSize</key>
<string>{45,33}</string>
<key>textureRect</key>
<string>{{50,530},{45,33}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9005.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{46,37}</string>
<key>spriteSourceSize</key>
<string>{46,37}</string>
<key>textureRect</key>
<string>{{48,565},{46,37}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9006.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{48,40}</string>
<key>spriteSourceSize</key>
<string>{48,40}</string>
<key>textureRect</key>
<string>{{51,488},{48,40}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9007.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{47,42}</string>
<key>spriteSourceSize</key>
<string>{47,42}</string>
<key>textureRect</key>
<string>{{1,521},{47,42}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9008.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{50,46}</string>
<key>spriteSourceSize</key>
<string>{50,46}</string>
<key>textureRect</key>
<string>{{59,52},{50,46}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>9009.png</key>
<dict>
<key>aliases</key>
<array/>
<key>anchor</key>
<string>{0.5,0.5}</string>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{61,48}</string>
<key>spriteSourceSize</key>
<string>{61,48}</string>
<key>textureRect</key>
<string>{{1,1},{61,48}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -305,9 +458,9 @@
<key>realTextureFileName</key>
<string>items.png</string>
<key>size</key>
<string>{817,58}</string>
<string>{110,604}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:3027c7eafa8a769d8f7cb790c1044b73:135ef51b06d7bd52de8f1dd81c40859e:9b2c40378ce3448cae3ca053079d3001$</string>
<string>$TexturePacker:SmartUpdate:24368dabbe6c1d679fdb9c47273d90e1:656031abd887efd12afb65e2a74b0bbf:9b2c40378ce3448cae3ca053079d3001$</string>
<key>textureFileName</key>
<string>items.png</string>
</dict>

View File

@@ -19,7 +19,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 771,
"trimX": 64,
"trimY": 1,
"width": 45,
"height": 49,
@@ -53,6 +53,52 @@
],
"subMetas": {}
},
"80343": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@80343",
"displayName": "",
"id": "80343",
"name": "9006",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 51,
"trimY": 488,
"width": 48,
"height": 40,
"rawWidth": 48,
"rawHeight": 40,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"94586": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@94586",
@@ -62,11 +108,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 432,
"trimY": 1,
"trimX": 54,
"trimY": 296,
"width": 51,
"height": 47,
"rawWidth": 51,
@@ -108,11 +154,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": -1,
"trimX": 93,
"trimY": 1,
"trimX": 57,
"trimY": 153,
"width": 44,
"height": 52,
"rawWidth": 64,
@@ -154,11 +200,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": -1,
"trimX": 139,
"trimY": 1,
"trimX": 1,
"trimY": 187,
"width": 44,
"height": 52,
"rawWidth": 64,
@@ -200,11 +246,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": -1,
"trimX": 185,
"trimY": 1,
"trimX": 55,
"trimY": 199,
"width": 44,
"height": 52,
"rawWidth": 64,
@@ -246,11 +292,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": -1,
"trimX": 231,
"trimY": 1,
"trimX": 1,
"trimY": 233,
"width": 44,
"height": 52,
"rawWidth": 64,
@@ -292,11 +338,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 481,
"trimY": 1,
"trimX": 1,
"trimY": 330,
"width": 51,
"height": 47,
"rawWidth": 51,
@@ -338,11 +384,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 530,
"trimY": 1,
"trimX": 54,
"trimY": 345,
"width": 51,
"height": 47,
"rawWidth": 51,
@@ -384,11 +430,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 1,
"trimX": 726,
"trimY": 1,
"trimX": 54,
"trimY": 443,
"width": 51,
"height": 43,
"rawWidth": 51,
@@ -430,11 +476,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": -1,
"trimX": 1,
"trimY": 1,
"trimY": 51,
"width": 42,
"height": 56,
"rawWidth": 64,
@@ -475,11 +521,11 @@
"name": "1011",
"userData": {
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": -1,
"trimX": 45,
"trimY": 1,
"trimX": 1,
"trimY": 139,
"width": 46,
"height": 54,
"rawWidth": 64,
@@ -522,11 +568,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 1,
"trimX": 579,
"trimY": 1,
"trimX": 1,
"trimY": 379,
"width": 51,
"height": 47,
"rawWidth": 51,
@@ -568,11 +614,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 628,
"trimY": 1,
"trimX": 54,
"trimY": 394,
"width": 51,
"height": 47,
"rawWidth": 51,
@@ -614,11 +660,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 1,
"trimX": 381,
"trimY": 1,
"trimX": 55,
"trimY": 245,
"width": 51,
"height": 49,
"rawWidth": 51,
@@ -660,11 +706,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 677,
"trimY": 1,
"trimX": 1,
"trimY": 428,
"width": 51,
"height": 47,
"rawWidth": 51,
@@ -709,8 +755,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 277,
"trimY": 1,
"trimX": 58,
"trimY": 100,
"width": 51,
"height": 51,
"rawWidth": 51,
@@ -752,11 +798,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 330,
"trimY": 1,
"trimX": 1,
"trimY": 279,
"width": 49,
"height": 51,
"rawWidth": 51,
@@ -788,6 +834,374 @@
".json"
],
"subMetas": {}
},
"c8366": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@c8366",
"displayName": "",
"id": "c8366",
"name": "9001",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 565,
"width": 45,
"height": 38,
"rawWidth": 45,
"rawHeight": 38,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"fa39c": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@fa39c",
"displayName": "",
"id": "fa39c",
"name": "9002",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 95,
"width": 55,
"height": 42,
"rawWidth": 55,
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"5c4dd": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@5c4dd",
"displayName": "",
"id": "5c4dd",
"name": "9003",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 477,
"width": 48,
"height": 42,
"rawWidth": 48,
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"3e072": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@3e072",
"displayName": "",
"id": "3e072",
"name": "9004",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 50,
"trimY": 530,
"width": 45,
"height": 33,
"rawWidth": 45,
"rawHeight": 33,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"675ef": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@675ef",
"displayName": "",
"id": "675ef",
"name": "9005",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 48,
"trimY": 565,
"width": 46,
"height": 37,
"rawWidth": 46,
"rawHeight": 37,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"618a6": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@618a6",
"displayName": "",
"id": "618a6",
"name": "9007",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 521,
"width": 47,
"height": 42,
"rawWidth": 47,
"rawHeight": 42,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"a073d": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@a073d",
"displayName": "",
"id": "a073d",
"name": "9008",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 59,
"trimY": 52,
"width": 50,
"height": 46,
"rawWidth": 50,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"d2107": {
"importer": "sprite-frame",
"uuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d@d2107",
"displayName": "",
"id": "d2107",
"name": "9009",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 61,
"height": 48,
"rawWidth": 61,
"rawHeight": 48,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4ca85ea7-6d3d-4e52-bb59-e0ad41ff0599@6c48a",
"atlasUuid": "7b0e7263-3b25-4fec-8935-abdd67c4b86d",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 100 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -65,9 +65,6 @@ export class GameDataSyncManager {
console.log(`[Initialize]: 装备数据已从${dataSource}覆盖`);
}
// 同步ViewModel数据
smc.syncData();
// 保存到本地存储(确保数据持久化)
// smc.saveGameData();
@@ -457,10 +454,7 @@ export class GameDataSyncManager {
smc.items = cloudData.items;
smc.tals = cloudData.tals;
smc.equips = cloudData.equips;
// 同步vmdata
smc.syncData();
console.log(`[GameDataSyncManager]: 云端数据加载成功,本地数据已同步`);
return true;
} else {

View File

@@ -8,6 +8,7 @@ import { GameData, WxCloudApi } from "../wx_clound_client_api/WxCloudApi";
import { gameDataSyncManager } from "./GameDataSyncManager";
import { GameSet } from "./config/BoxSet";
import { Test } from "./Test";
import { GameEvent } from "./config/GameEvent";
// import { Role } from "../role/Role";
@@ -76,13 +77,7 @@ export class SingletonModuleComp extends ecs.Comp {
}
// ==================== 数据管理方法 ====================
/**
* 同步数据到vmdata
*/
syncData(){
this.vmdata.data = this.data;
}
/**
* 判断是否为微信客户端
*/
@@ -152,56 +147,50 @@ export class SingletonModuleComp extends ecs.Comp {
*/
addExp(exp:number,autoSave:boolean=true){
this.data.exp+=exp
this.vmdata.data.exp+=exp
if(this.isWxClient()){
this.gameDataSyncManager.addGameProperty("exp",exp)
}
}
addGold(gold:number,autoSave:boolean=true){
this.data.gold+=gold
this.vmdata.data.gold+=gold
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
if(this.isWxClient()){
this.gameDataSyncManager.addGameProperty("gold",gold)
}
}
addDiamond(diamond:number,autoSave:boolean=true){
this.data.diamond+=diamond
this.vmdata.data.diamond+=diamond
oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE)
if(this.isWxClient()){
this.gameDataSyncManager.addGameProperty("diamond",diamond)
}
}
addMission(mission:number,autoSave:boolean=true){
this.data.mission+=mission
this.vmdata.data.mission+=mission
oops.message.dispatchEvent(GameEvent.MISSION_UPDATE)
if(this.isWxClient()){
this.gameDataSyncManager.addGameProperty("mission",mission)
}
}
spendMission(mission:number,autoSave:boolean=true){
this.data.mission-=mission
this.vmdata.data.mission-=mission
if(this.isWxClient()){
this.gameDataSyncManager.spendGameProperty("mission",mission)
}
}
spendExp(exp:number,autoSave:boolean=true){
this.data.exp-=exp
this.vmdata.data.exp-=exp
if(this.isWxClient()){
this.gameDataSyncManager.spendGameProperty("exp",exp)
}
}
spendGold(gold:number,autoSave:boolean=true){
this.data.gold-=gold
this.vmdata.data.gold-=gold
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
if(this.isWxClient()){
this.gameDataSyncManager.spendGameProperty("gold",gold)
}
}
spendDiamond(diamond:number,autoSave:boolean=true){
this.data.diamond-=diamond
this.vmdata.data.diamond-=diamond
oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE)
if(this.isWxClient()){
this.gameDataSyncManager.spendGameProperty("diamond",diamond)
}
@@ -227,7 +216,6 @@ export class SingletonModuleComp extends ecs.Comp {
}
const newValue = currentValue - value;
this.data[property] = newValue;
this.vmdata.data[property] = newValue;
console.log(`[SMC]: 消耗游戏数据 ${property} = ${value}, 当前值: ${newValue}`);
return true;
}
@@ -252,7 +240,6 @@ export class SingletonModuleComp extends ecs.Comp {
const current = this.data[key] || 0;
const next = current - need;
this.data[key] = next;
this.vmdata.data[key] = next;
console.log(`[SMC]: 消耗游戏数据 ${key} = ${need}, 当前值: ${next}`);
}

View File

@@ -0,0 +1,24 @@
import { Items } from "./Items";
export enum GType{
ITEM=1, //物品
GOLD=2, //金币
DIAMOND=3, //钻石
EXP=4, //经验
MEAT=5, //能量
}
export enum CType{
GOLD=1, //金币
DIAMOND=2, //钻石
FREE=3, //免费
AD=4, //广告
}
export const Goods={
1001:{i_uuid:Items[9001].uuid,num:10000,cast:0,type:GType.GOLD,c_type:CType.FREE},
1002:{i_uuid:Items[9002].uuid,num:100000,cast:0,type:GType.GOLD,c_type:CType.AD,},
1003:{i_uuid:Items[9003].uuid,num:500000,cast:100,type:GType.GOLD,c_type:CType.DIAMOND},
1004:{i_uuid:Items[9004].uuid,num:100,cast:0,type:GType.DIAMOND,c_type:CType.FREE},
1005:{i_uuid:Items[9005].uuid,num:200,cast:0,type:GType.DIAMOND,c_type:CType.FREE},
1006:{i_uuid:Items[9006].uuid,num:300,cast:0,type:GType.DIAMOND,c_type:CType.AD},
1007:{i_uuid:Items[9007].uuid,num:500,cast:0,type:GType.DIAMOND,c_type:CType.AD},
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0ca1e413-6bfd-4e8a-95cc-56fb3e54075a",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -33,6 +33,15 @@ export const Items={
1006:{uuid: 1006,path: "1006",type:1,quality:QualitySet.BLUE,name: "铜钥匙",info:"解锁稀有英雄 也可以直接兑换金币", },
1007:{uuid: 1007,path: "1007",type:1,quality:QualitySet.PURPLE,name: "银钥匙",info:"解锁史诗英雄 也可以直接兑换金币", },
1008:{uuid: 1008,path: "1008",type:1,quality:QualitySet.ORANGE,name: "金钥匙",info:"解锁传说英雄 也可以直接兑换金币", },
9001:{uuid: 9001,path: "9001",type:1,quality:QualitySet.GREEN,name: "金币",info:"少许金币", },
9002:{uuid: 9002,path: "9002",type:1,quality:QualitySet.BLUE,name: "小袋金币",info:"一小袋金币", },
9003:{uuid: 9003,path: "9003",type:1,quality:QualitySet.PURPLE,name: "大袋金币",info:"一大袋金币", },
9004:{uuid: 9004,path: "9004",type:1,quality:QualitySet.GREEN,name: "钻石",info:"少许钻石", },
9005:{uuid: 9005,path: "9005",type:1,quality:QualitySet.GREEN,name: "钻石",info:"少许钻石", },
9006:{uuid: 9006,path: "9006",type:1,quality:QualitySet.BLUE,name: "小袋钻石",info:"一小袋钻石", },
9007:{uuid: 9007,path: "9007",type:1,quality:QualitySet.BLUE,name: "大袋钻石",info:"一大袋钻石", },
9008:{uuid: 9008,path: "9008",type:1,quality:QualitySet.PURPLE,name: "小箱钻石",info:"一小箱钻石", },
9009:{uuid: 9009,path: "9009",type:1,quality:QualitySet.PURPLE,name: "大箱钻石",info:"一大箱钻石", },
}
export enum DropKey{

View File

@@ -1,9 +0,0 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "f6f84e06-578b-446b-b5d7-595b686efbe0",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -287,11 +287,9 @@ export class HeroViewComp extends CCComp {
}
if(gold>0){
smc.addGold(gold)
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
}
if(diamond>0){
smc.addDiamond(diamond)
oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE)
}
console.log("[HeroViewComp]:do_drop",this.hero_uuid,drop_item,exp,gold,diamond)
}

View File

@@ -363,11 +363,11 @@ export class CardComp extends CCComp {
this.reset_card()
}
cost_gold_check(){
if(smc.vmdata.data.gold< this.cost_gold){
if(smc.data.gold< this.cost_gold){
oops.gui.toast("[cardcomp]:金币不足", false);
return false
}
smc.vmdata.data.gold-=this.cost_gold
smc.data.gold-=this.cost_gold
return true
}
reset() {

View File

@@ -0,0 +1,73 @@
import { _decorator, Component, Node, Label, Sprite, SpriteFrame, resources } from 'cc';
import { Goods, GType, CType } from '../common/config/Goods';
import { Items } from '../common/config/Items';
import { NumberFormatter } from '../common/config/BoxSet';
const { ccclass, property } = _decorator;
@ccclass('GoodsComp')
export class GoodsComp extends Component {
// 数据(仅用于更新显示)
private goodsData: any = null;
private itemData: any = null;
private currentUuid: number = 0;
/**
* 更新物品数据
* @param uuid 物品UUID
*/
update_data(uuid: number) {
this.currentUuid = uuid;
this.goodsData = Goods[uuid];
if (!this.goodsData) {
console.error(`Goods data not found for uuid: ${uuid}`);
return;
}
this.itemData = Items[this.goodsData.i_uuid];
if (!this.itemData) {
console.error(`Item data not found for i_uuid: ${this.goodsData.i_uuid}`);
return;
}
this.updateIcon();
this.updateTexts();
this.update_btn(this.goodsData.c_type)
}
update_btn(type:CType){
this.node.getChildByName("ad").active=type==CType.AD
this.node.getChildByName("free").active=type==CType.FREE
this.node.getChildByName("cast").active=type==(CType.DIAMOND||CType.GOLD)
this.node.getChildByName("cast").getChildByName("diamond").active=type==CType.DIAMOND
this.node.getChildByName("cast").getChildByName("gold").active=type==CType.GOLD
this.node.getChildByName("cast").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(this.goodsData.cast)
}
/**
* 更新图标
*/
private updateIcon() {
const iconSprite = this.node.getChildByName("icon")?.getComponent(Sprite);
if (!iconSprite) return;
const path = `gui/items/${this.itemData.path}`;
resources.load(path, SpriteFrame, (err, spriteFrame) => {
if (err) {
console.warn(`icon load failed: ${path}`, err);
return;
}
iconSprite.spriteFrame = spriteFrame;
});
}
/** 仅更新文字(名称与数量) */
private updateTexts() {
// 名称
const nameLabel = this.node.getChildByName("name")?.getComponent(Label);
if (nameLabel) nameLabel.string = this.itemData.name;
// 数量(根节点下的 num
const mainNumLabel = this.node.getChildByName("num")?.getComponent(Label);
if (mainNumLabel) mainNumLabel.string = NumberFormatter.formatNumber(this.goodsData.num);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "e24167ce-79d0-4f99-a3d8-f144bbe959a3",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -4,6 +4,7 @@ import { UIID } from '../common/config/GameUIConfig';
import { getHeroList, getHeroStatsByLevel, getUpgradeResources, HeroInfo, HType } from '../common/config/heroSet';
import { smc } from '../common/SingletonModuleComp';
import { GameEvent } from '../common/config/GameEvent';
import { NumberFormatter } from '../common/config/BoxSet';
const { ccclass, property } = _decorator;
@ccclass('HInfoComp')
@@ -42,14 +43,20 @@ export class HInfoComp extends Component {
this.node.getChildByName("info").getChildByName("ap").getChildByName("num").getComponent(Label).string=ap.toString()
this.node.getChildByName("info").getChildByName("def").getChildByName("num").getComponent(Label).string=def.toString()
let {experience,gold}=getUpgradeResources(lv)
let need_node=this.node.getChildByName("upNeed").getChildByName("need")
need_node.getChildByName("exp").getChildByName("need").getComponent(Label).string=experience.toString()
need_node.getChildByName("gold").getChildByName("need").getComponent(Label).string=gold.toString()
this.updata_need(experience,gold)
this.node.getChildByName("upBtn").active=smc.data.exp>=experience&&smc.data.gold>=gold
this.node.getChildByName("type").getChildByName("w").active=hero_data.type==HType.warrior
this.node.getChildByName("type").getChildByName("r").active=hero_data.type==HType.remote
this.node.getChildByName("type").getChildByName("m").active=hero_data.type==HType.mage
this.show_luck(smc.heros[uuid]?.lv??0)
}
updata_need(experience:number,gold:number){
let need_node=this.node.getChildByName("upNeed").getChildByName("need")
need_node.getChildByName("exp").getChildByName("need").getComponent(Label).string=NumberFormatter.formatNumber(experience)
need_node.getChildByName("gold").getChildByName("need").getComponent(Label).string=NumberFormatter.formatNumber(gold)
need_node.getChildByName("exp").getChildByName("has").getComponent(Label).string=NumberFormatter.formatNumber(smc.data.exp)
need_node.getChildByName("gold").getChildByName("has").getComponent(Label).string=NumberFormatter.formatNumber(smc.data.gold)
}
show_luck(lv:number){
this.node.getChildByName("upBtn").active=lv > 0
this.node.getChildByName("upNeed").active=lv > 0
@@ -58,7 +65,7 @@ export class HInfoComp extends Component {
uplevel(){
let lv=smc.heros[this.h_uuid].lv
let {experience,gold}=getUpgradeResources(lv)
if(smc.vmdata.data.exp<=experience||smc.vmdata.data.gold<=gold){
if(smc.data.exp<=experience||smc.data.gold<=gold){
oops.gui.toast("经验或金币不足")
return
}

View File

@@ -36,15 +36,13 @@ export class MissionHomeComp extends CCComp {
oops.message.dispatchEvent(GameEvent.UpdateHero, {})
}
uodate_data(){
smc.syncData()
}
isWxClient(){
return typeof wx !== 'undefined' && typeof (wx as any).getSystemInfoSync === 'function';
}
btn_func(e:string,data:any){
if(!this.isWxClient()){
smc.syncDataFromLocal() //调试用,正式环境去掉
}
// console.log("[MissionHomeComp]:btn_func",e,data)
let page_heros=this.node.getChildByName("heros_page")
let page_shop=this.node.getChildByName("shop_page")

View File

@@ -113,7 +113,7 @@ export class MissionMonCompComp extends CCComp { // 添加刷怪队列 - 使
// 根据新的关卡配置生成怪物
private generateMonstersFromStageConfig(monsterConfigs: any[]) {
const currentStage = smc.vmdata.data.mission;
const currentStage = smc.data.mission;
// 设置怪物总数
console.log("[MissionMonComp] generateMonstersFromStageConfig",monsterConfigs)

View File

@@ -0,0 +1,26 @@
import { _decorator, Component, Node } from 'cc';
import { GoodsComp } from './GoodsComp';
const { ccclass, property } = _decorator;
@ccclass('ShopPageComp')
export class ShopPageComp extends Component {
daily_goods:any[]=[1001,1002,1004,1006]
weekly_goods:any[]=[]
monthly_goods:any[]=[]
special_goods:any[]=[]
start() {
this.update_daily_goods()
}
update_daily_goods(){
let items=this.node.getChildByName("daily").getChildByName("items").children
for(let i=0;i<items.length;i++){
let goods=items[i]
goods.getComponent(GoodsComp).update_data(this.daily_goods[i])
}
}
update(deltaTime: number) {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "6e8e04b0-e0eb-4668-8543-30322e2c359f",
"files": [],
"subMetas": {},
"userData": {}
}