倍数icon的倍率显示
This commit is contained in:
parent
7c19a6c89e
commit
1d89519690
@ -1175,8 +1175,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": null,
|
||||
"blurFrame": null,
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -25,20 +25,20 @@
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 44
|
||||
"__id__": 50
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 48
|
||||
"__id__": 54
|
||||
},
|
||||
{
|
||||
"__id__": 50
|
||||
"__id__": 56
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 52
|
||||
"__id__": 58
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -83,9 +83,6 @@
|
||||
},
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
@ -131,7 +128,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "frame",
|
||||
"_name": "spine",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
@ -193,22 +190,22 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 180,
|
||||
"height": 240
|
||||
"width": 183.35000610351562,
|
||||
"height": 184.50999450683594
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
"x": 0.4802290707426898,
|
||||
"y": 0.4981302173238328
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "bcADbiiAJAnJgskeLVB9uF"
|
||||
"fileId": "59LoecK5tD7pJBy73qYDy6"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
@ -229,31 +226,28 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "e0d2342e-1552-4df7-b742-cca7402f7c59@a2e74",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "e0d2342e-1552-4df7-b742-cca7402f7c59",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
"_skeletonData": {
|
||||
"__uuid__": "10469d5b-b900-44c8-9ed9-ead82618d746",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "spawn",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": true,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "42tbHcc7lAK5lDuDsbh+bF"
|
||||
"fileId": "b78oDPY8JE7osWArFEHKzB"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
@ -263,7 +257,7 @@
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "03H6hUW6dCc5mCMvYel1y+",
|
||||
"fileId": "d6zOiG9WlL2IqCMm/J3Y1P",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
@ -276,18 +270,72 @@
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "multi",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 10
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 12
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 14
|
||||
"__id__": 15
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -318,6 +366,115 @@
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 63.369140625,
|
||||
"height": 75.6
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "09x40qIhlI2bL+bGK5KRBe"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "x1",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 60,
|
||||
"_fontSize": 60,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 60,
|
||||
"_overflow": 0,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "afN6hv35NLI5x3SGAtAqRN"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "9cLODwQSdFS4V/0gO5JDvA",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@ -328,7 +485,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
"__id__": 17
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -356,7 +513,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 13
|
||||
"__id__": 19
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@ -407,142 +564,6 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "spine",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 15
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 183.35000610351562,
|
||||
"height": 184.50999450683594
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.4802290707426898,
|
||||
"y": 0.4981302173238328
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "59LoecK5tD7pJBy73qYDy6"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 15
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "10469d5b-b900-44c8-9ed9-ead82618d746",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "spawn",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": true,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b78oDPY8JE7osWArFEHKzB"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d6zOiG9WlL2IqCMm/J3Y1P",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@ -651,14 +672,14 @@
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 39
|
||||
"__id__": 45
|
||||
},
|
||||
{
|
||||
"__id__": 41
|
||||
"__id__": 47
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 43
|
||||
"__id__": 49
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -691,7 +712,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "frame",
|
||||
"_name": "spine",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
@ -753,22 +774,22 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 180,
|
||||
"height": 240
|
||||
"width": 183.35000610351562,
|
||||
"height": 184.50999450683594
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
"x": 0.4802290707426898,
|
||||
"y": 0.4981302173238328
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "6aLW38k0hOS4Eo5X4r1m/U"
|
||||
"fileId": "3cQRgRCP5PoJKZV8vfWxz6"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
@ -789,31 +810,28 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "e0d2342e-1552-4df7-b742-cca7402f7c59@a2e74",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "e0d2342e-1552-4df7-b742-cca7402f7c59",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
"_skeletonData": {
|
||||
"__uuid__": "10469d5b-b900-44c8-9ed9-ead82618d746",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "<None>",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": true,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "c73tDHs8dIELYDRHe5Fky8"
|
||||
"fileId": "0e0k7NKctFkpngzPcj9BgF"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
@ -823,7 +841,7 @@
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "3egrAbxVRPxIWGvon3PGeZ",
|
||||
"fileId": "b1XXtPsr1Ju5469aiiFDDa",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
@ -836,18 +854,72 @@
|
||||
"_parent": {
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 34
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 40
|
||||
},
|
||||
{
|
||||
"__id__": 42
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 44
|
||||
},
|
||||
"_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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "multi",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 33
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 34
|
||||
"__id__": 35
|
||||
},
|
||||
{
|
||||
"__id__": 36
|
||||
"__id__": 37
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 38
|
||||
"__id__": 39
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -878,6 +950,115 @@
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 34
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 36
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 63.369140625,
|
||||
"height": 75.6
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "14ILPBwQBEE5rFVl21ql3N"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 34
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 38
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 54,
|
||||
"b": 54,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "x1",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 60,
|
||||
"_fontSize": 60,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 60,
|
||||
"_overflow": 0,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b7fnpqqmpI078dHVJNbISk"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "aem8WuW4RK8ZAX/yKEZumq",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@ -888,7 +1069,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 35
|
||||
"__id__": 41
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -916,7 +1097,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 37
|
||||
"__id__": 43
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@ -977,7 +1158,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 40
|
||||
"__id__": 46
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -1005,7 +1186,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 42
|
||||
"__id__": 48
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@ -1068,11 +1249,11 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 45
|
||||
"__id__": 51
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 47
|
||||
"__id__": 53
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -1109,11 +1290,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 44
|
||||
"__id__": 50
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 46
|
||||
"__id__": 52
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -1154,7 +1335,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 49
|
||||
"__id__": 55
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -1182,20 +1363,14 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 51
|
||||
"__id__": 57
|
||||
},
|
||||
"iconSpine": {
|
||||
"__id__": 18
|
||||
"__id__": 6
|
||||
},
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
@ -138,7 +138,7 @@
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
@ -698,7 +698,7 @@
|
||||
"__id__": 26
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 28
|
||||
@ -1190,12 +1190,6 @@
|
||||
"bgNode": {
|
||||
"__id__": 2
|
||||
},
|
||||
"Frame": {
|
||||
"__id__": 6
|
||||
},
|
||||
"blurFrame": {
|
||||
"__id__": 30
|
||||
},
|
||||
"winSpinePrefab": {
|
||||
"__uuid__": "2aeb9059-cc98-440e-8120-260f48cbb94f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -49,8 +49,8 @@ export class SlotGame extends Component {
|
||||
private freeBg: Node = null;
|
||||
|
||||
private base: Node = null;
|
||||
private normalMultiAni: Animation = null;
|
||||
private multiLabel: Label = null;
|
||||
// private normalMultiAni: Animation = null;
|
||||
// private multiLabel: Label = null;
|
||||
private waysCount: Label = null;
|
||||
private waysLayout: Layout = null;
|
||||
private layCount: Label = null;
|
||||
@ -110,8 +110,8 @@ export class SlotGame extends Component {
|
||||
this.freeBg = this.node.getChildByName('free_bg');
|
||||
|
||||
this.base = this.node.getChildByName('base');
|
||||
this.normalMultiAni = this.base.getChildByName('NormalMultiAniNode').getComponent(Animation);
|
||||
this.multiLabel = this.base.getChildByName('multi').getComponent(Label);
|
||||
// this.normalMultiAni = this.base.getChildByName('NormalMultiAniNode').getComponent(Animation);
|
||||
// this.multiLabel = this.base.getChildByName('multi').getComponent(Label);
|
||||
let ways = this.base.getChildByName('ways');
|
||||
this.waysCount = ways.getChildByName('count').getComponent(Label);
|
||||
this.waysLayout = ways.getChildByName('lay').getComponent(Layout);
|
||||
@ -222,9 +222,9 @@ export class SlotGame extends Component {
|
||||
spin(isFree: boolean) {
|
||||
AudioManager.instance.playSFX('Spin_Button_Click');
|
||||
this.setWaysCount('...');
|
||||
if (!isFree) {
|
||||
this.setMultiLabel(1);
|
||||
}
|
||||
// if (!isFree) {
|
||||
// this.setMultiLabel(1);
|
||||
// }
|
||||
this.showWinScore(false, false, false, false, false);
|
||||
this.rollerManager.resetInfo();
|
||||
this.rollerManager.startScroll();
|
||||
@ -243,10 +243,10 @@ export class SlotGame extends Component {
|
||||
this.rollerManager.stopScroll(this.spinData);
|
||||
}
|
||||
|
||||
setMultiLabel(multi: number) {
|
||||
this.multiLabel.string = `x${multi}`;
|
||||
this.freeMultiLabel.string = `x${multi}`;
|
||||
}
|
||||
// setMultiLabel(multi: number) {
|
||||
// this.multiLabel.string = `x${multi}`;
|
||||
// this.freeMultiLabel.string = `x${multi}`;
|
||||
// }
|
||||
|
||||
setWaysCount(ways: any) {
|
||||
if (ways == '...') {
|
||||
@ -272,8 +272,7 @@ export class SlotGame extends Component {
|
||||
let bottomData = this.spinData.WinPosition.BottomNormal.map(pos => pos + 4);
|
||||
let topData = this.spinData.WinPosition.TopNormal || [];
|
||||
deleteMsg = [...topData, ...bottomData];
|
||||
|
||||
let specialIcons = [...this.spinData.WinPosition.BottomSilver, ...this.spinData.WinPosition.BottomGold];
|
||||
let specialIcons = [...this.spinData.WinPosition.BottomGold];
|
||||
let aniData = specialIcons.map(pos => pos + 4) || [];
|
||||
|
||||
this.rollerManager.handleWinIcons(this.winLayer, deleteMsg, aniData);
|
||||
@ -336,9 +335,10 @@ export class SlotGame extends Component {
|
||||
// 消除创建的逻辑
|
||||
createNewIconTop(spinData: any) {
|
||||
this.spinData = spinData;
|
||||
|
||||
let createDatas = this.spinData.PanChanges.TopNewSymbols;
|
||||
let createDatas2 = this.spinData.PanChanges.BottomNewSymbols;
|
||||
this.rollerManager.createNewIconTop([createDatas, ...createDatas2]);
|
||||
this.rollerManager.createNewIconTop([createDatas, ...createDatas2], spinData);
|
||||
}
|
||||
|
||||
// icon掉落的逻辑
|
||||
@ -534,13 +534,13 @@ export class SlotGame extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
playNormalMultiAni(isSwitch: boolean) {
|
||||
if (isSwitch) {
|
||||
this.normalMultiAni.play('NM_multiVFX_switch_animation');
|
||||
} else {
|
||||
this.normalMultiAni.play('NM_multiVFX_win_animation');
|
||||
}
|
||||
}
|
||||
// playNormalMultiAni(isSwitch: boolean) {
|
||||
// if (isSwitch) {
|
||||
// this.normalMultiAni.play('NM_multiVFX_switch_animation');
|
||||
// } else {
|
||||
// this.normalMultiAni.play('NM_multiVFX_win_animation');
|
||||
// }
|
||||
// }
|
||||
|
||||
playFreeMultiAni() {
|
||||
this.freeMultiAni.play('FS_multiVFX_win_animation');
|
||||
@ -640,7 +640,7 @@ export class SlotGame extends Component {
|
||||
this.featureBuyNode.getComponent(Sprite).grayscale = !isInteractable;
|
||||
this.featureBuyNode.getChildByName('FEATUREBUY').getComponent(Sprite).grayscale = !isInteractable;
|
||||
|
||||
this.featureBuyNode.getComponent(Button).interactable = isInteractable;
|
||||
this.featureBuyNode.getComponent(Button).interactable = isInteractable;
|
||||
}
|
||||
|
||||
// 修改winIconNodeMap的类型为存储更多信息
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { _decorator, Component, Prefab } from 'cc';
|
||||
import { FREE_SPIN_ROLLER_RULE, GameInfo, ROLLER_RULE, SLOT_BAR_EVENT, SLOT_GAME_EVENT, SYS_GIFT, WIN_TYPE, winTestData } from './game/Define';
|
||||
import { FREE_SPIN_ROLLER_RULE, GameInfo, ROLLER_RULE, SLOT_BAR_EVENT, SLOT_GAME_EVENT, SYS_GIFT, WIN_TYPE, testData } from './game/Define';
|
||||
import { SlotBar } from './SlotBar';
|
||||
import { SlotGame } from './SlotGame';
|
||||
import { BigWinUI } from './game/BigWinUI';
|
||||
@ -166,7 +166,7 @@ export class SlotScene extends Component {
|
||||
AudioManager.instance.playBGM('Normal_Mode_BGM');
|
||||
}
|
||||
this.slotGame.setWaysCount(this.spinData.WaysNum);
|
||||
this.slotGame.setMultiLabel(this.spinData.WinMultiPlier);
|
||||
// this.slotGame.setMultiLabel(this.spinData.WinMultiPlier);
|
||||
this.slotGame.setRollerIconRule(rollerIconRule);
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ export class SlotScene extends Component {
|
||||
// }
|
||||
|
||||
} else {
|
||||
this.spinInfo = winTestData;
|
||||
this.spinInfo = testData;
|
||||
}
|
||||
|
||||
if (this.TipPanel.getHasTip()) {
|
||||
@ -281,6 +281,7 @@ export class SlotScene extends Component {
|
||||
this.isReceiveMsg = true;
|
||||
await this.handleSpinResult();
|
||||
} catch (error) {
|
||||
console.log('获取数据时error', error)
|
||||
let errCode = parseInt(error.message.split('#')[0]);
|
||||
if (isNaN(errCode)) {
|
||||
this.showErrorTip(4);
|
||||
@ -290,7 +291,32 @@ export class SlotScene extends Component {
|
||||
this.handleErrSpin();
|
||||
}
|
||||
}
|
||||
// -----------调试
|
||||
|
||||
async spinBtnClick2(args) {
|
||||
try {
|
||||
this.isReceiveMsg = false;
|
||||
this.slotGame.spin(this.gameState.isInFreeSpin);
|
||||
this.slotGame.changeBg(this.gameState.isInFreeSpin);
|
||||
this.slotBar.setWin(0);
|
||||
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet());
|
||||
// if (!this.gameState.isDebug) {
|
||||
// this.spinInfo = await callGameApi("spin_dev", {
|
||||
// Bet: this.slotBar.getBet(),
|
||||
// ObjectId: this.objectId[args],
|
||||
// });
|
||||
// } else {
|
||||
this.spinInfo = testData;
|
||||
// }
|
||||
this.lastSpinInfo = this.spinInfo;
|
||||
this.isReceiveMsg = true;
|
||||
await this.handleSpinResult();
|
||||
} catch (error) {
|
||||
let errCode = parseInt(error.message.split('#')[0]);
|
||||
this.showErrorTip(errCode);
|
||||
this.handleErrSpin();
|
||||
}
|
||||
}
|
||||
// 万分比
|
||||
private onBetChanged(bet: number) {
|
||||
|
||||
@ -504,14 +530,16 @@ export class SlotScene extends Component {
|
||||
this.slotGame.changeIconAndFrameType(this.spinData);
|
||||
if (this.gameState.isInFreeSpin) {
|
||||
this.slotGame.playFreeMultiAni();
|
||||
} else {
|
||||
this.slotGame.playNormalMultiAni(true);
|
||||
}
|
||||
this.slotGame.setMultiLabel(this.spinData.WinMultiPlier);
|
||||
// else {
|
||||
// this.slotGame.playNormalMultiAni(true);
|
||||
// }
|
||||
// this.slotGame.setMultiLabel(this.spinData.WinMultiPlier);
|
||||
// 创建新图标
|
||||
this.slotGame.createNewIconTop(this.spinData);
|
||||
|
||||
} catch (error) {
|
||||
console.log('消除时error', error)
|
||||
let errCode = parseInt(error.message.split('#')[0]);
|
||||
if (isNaN(errCode)) {
|
||||
this.showErrorTip(5, () => {
|
||||
@ -822,32 +850,7 @@ export class SlotScene extends Component {
|
||||
}
|
||||
|
||||
|
||||
// -----------调试
|
||||
|
||||
async spinBtnClick2(args) {
|
||||
try {
|
||||
this.isReceiveMsg = false;
|
||||
this.slotGame.spin(this.gameState.isInFreeSpin);
|
||||
this.slotGame.changeBg(this.gameState.isInFreeSpin);
|
||||
this.slotBar.setWin(0);
|
||||
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet());
|
||||
if (!this.gameState.isDebug) {
|
||||
this.spinInfo = await callGameApi("spin_dev", {
|
||||
Bet: this.slotBar.getBet(),
|
||||
ObjectId: this.objectId[args],
|
||||
});
|
||||
} else {
|
||||
this.spinInfo = {};
|
||||
}
|
||||
this.lastSpinInfo = this.spinInfo;
|
||||
this.isReceiveMsg = true;
|
||||
await this.handleSpinResult();
|
||||
} catch (error) {
|
||||
let errCode = parseInt(error.message.split('#')[0]);
|
||||
this.showErrorTip(errCode);
|
||||
this.handleErrSpin();
|
||||
}
|
||||
}
|
||||
|
||||
onSysGiftClickContinue(bet: number) {
|
||||
this.gameState.isOnReconnect = false;
|
||||
|
||||
@ -28,6 +28,7 @@ export class Info {
|
||||
speed: number = 0; // 当前速度
|
||||
speedNode: Node; // 速度控制节点
|
||||
receiveStopData: boolean = false;// 是否收到停止数据
|
||||
StopXnInfo: any = null;// 是否收到停止数据
|
||||
speedDataComplete: boolean = false;// 速度数据是否完成
|
||||
stopSpeedData: number[][] = null;// 停止时的速度数据
|
||||
state: ROLLER_STATE = ROLLER_STATE.STOP; // 当前状态
|
||||
@ -44,6 +45,7 @@ export class Info {
|
||||
*/
|
||||
resetLxInfo() {
|
||||
this.receiveStopData = false;
|
||||
this.StopXnInfo = null
|
||||
this.speed = 0;
|
||||
this.stopSpeedData = null;
|
||||
this.isManualStop = false;
|
||||
@ -190,19 +192,19 @@ export abstract class BaseRoller extends Component {
|
||||
* @param data 初始图标数据数组
|
||||
* @param crossSymbols n*1 Icon数据
|
||||
*/
|
||||
initRollerWithIcon(id: number, data: number[], crossSymbols?: any) {
|
||||
initRollerWithIcon(id: number, data: number[], crossSymbols?: any, XnInfo?: any) {
|
||||
this.iconFactory.init();
|
||||
this.initRoller(id);
|
||||
// 创建图标
|
||||
this._crossSymbols = crossSymbols;
|
||||
this.createInitIcons(data);
|
||||
this.createInitIcons(data, XnInfo, id == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建初始图标,包括处理n*1 Icon
|
||||
* @param data 图标数据数组
|
||||
*/
|
||||
createInitIcons(data: number[]) {
|
||||
createInitIcons(data: number[], XnInfo: any, isHroll: boolean) {
|
||||
// 清空现有的图标和映射
|
||||
this._allIcons.clear();
|
||||
this._posToIconKey.clear();
|
||||
@ -210,7 +212,7 @@ export abstract class BaseRoller extends Component {
|
||||
// 先处理n*1 Icon
|
||||
if (this._crossSymbols && Object.keys(this._crossSymbols).length > 0) {
|
||||
// 创建n*1 Icon
|
||||
this.createSpecialIcons();
|
||||
this.createSpecialIcons(XnInfo);
|
||||
}
|
||||
|
||||
// 然后创建普通图标(跳过已被n*1 Icon占用的位置)
|
||||
@ -219,11 +221,11 @@ export abstract class BaseRoller extends Component {
|
||||
if (this._posToIconKey.has(i)) continue;
|
||||
|
||||
let iconIndex = data[i];
|
||||
this.createNormalIcon(i, iconIndex);
|
||||
this.createNormalIcon(i, iconIndex, XnInfo, isHroll);
|
||||
}
|
||||
}
|
||||
|
||||
createSpecialIcons() {
|
||||
createSpecialIcons(XnInfo: any) {
|
||||
// 直接使用已有的符号数据,避免重复处理
|
||||
let processedPoses = new Set<string>(); // 用于跟踪已处理的符号ID
|
||||
// 遍历所有位置的符号数据
|
||||
@ -234,7 +236,7 @@ export abstract class BaseRoller extends Component {
|
||||
// 标记这个符号ID为已处理
|
||||
processedPoses.add(iconSpecialMsg.id);
|
||||
// 创建特殊图标
|
||||
this.createOneSpecialIcon(iconSpecialMsg);
|
||||
this.createOneSpecialIcon(iconSpecialMsg, XnInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,7 +248,7 @@ export abstract class BaseRoller extends Component {
|
||||
* @param frameType 框架类型
|
||||
* @returns 创建的图标节点
|
||||
*/
|
||||
createOneSpecialIcon(iconSpecialMsg: any): Node {
|
||||
createOneSpecialIcon(iconSpecialMsg: any, XnInfo: any): Node {
|
||||
let startPos = iconSpecialMsg.startPos;
|
||||
let endPos = iconSpecialMsg.endPos;
|
||||
let height = iconSpecialMsg.lHeight;
|
||||
@ -257,7 +259,15 @@ export abstract class BaseRoller extends Component {
|
||||
// 创建图标节点
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
// 初始化图标
|
||||
icon.getComponent(Icon).initIcon(iconIndex, height, iconKey, frameType, this._rollerId);
|
||||
let multi = 0
|
||||
if (XnInfo.Bottom && iconIndex == 2) {
|
||||
for (let i = 0; i < XnInfo.Bottom.length; i++) {
|
||||
if (XnInfo.Bottom[i].StartIndex == startPos + (this._rollerId - 1) * 5) {
|
||||
multi = XnInfo.Bottom[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
icon.getComponent(Icon).initIcon(iconIndex, height, iconKey, frameType, this._rollerId, multi);
|
||||
// 设置位置
|
||||
let position = this.getIconPosition(startPos, height);
|
||||
this._content.addChild(icon);
|
||||
@ -278,13 +288,24 @@ export abstract class BaseRoller extends Component {
|
||||
* @param iconIndex 图标类型索引
|
||||
* @returns 创建的图标节点
|
||||
*/
|
||||
createNormalIcon(pos: number, iconIndex: number): Node {
|
||||
createNormalIcon(pos: number, iconIndex: number, XnInfo: any, isHroll: boolean): Node {
|
||||
// 生成图标ID
|
||||
let iconKey = this.generateIconKey(pos, 1, pos);
|
||||
// 创建图标节点
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
// 初始化图标
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId);
|
||||
let multi = 1
|
||||
if (XnInfo.Top || XnInfo.Bottom) {
|
||||
let XnInfoData = isHroll ? XnInfo.Top : XnInfo.Bottom
|
||||
if (XnInfoData) {
|
||||
for (let i = 0; i < XnInfoData.length; i++) {
|
||||
if (XnInfoData[i].StartIndex == pos + (isHroll ? 0 : (this._rollerId - 1) * 5)) {
|
||||
multi = XnInfoData[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId, multi);
|
||||
// 设置位置
|
||||
let position = this.getIconPosition(pos, 1);
|
||||
this._content.addChild(icon);
|
||||
@ -372,7 +393,8 @@ export abstract class BaseRoller extends Component {
|
||||
this._info.speedDataComplete = true;
|
||||
let stopSpeedData = this._info.isFastSpin ? [[0, 6000]] : [[0.1, 3500]];
|
||||
if (this._info.receiveStopData) {
|
||||
this.stopScrollWork(stopSpeedData);
|
||||
|
||||
this.stopScrollWork(stopSpeedData, this._info.StopXnInfo);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -382,13 +404,15 @@ export abstract class BaseRoller extends Component {
|
||||
* 停止滚动
|
||||
* @param data 停止时的图标数据
|
||||
*/
|
||||
stopScroll(data: number[], stopSpeedData: number[][]) {
|
||||
stopScroll(data: number[], stopSpeedData: number[][], XnInfo: any) {
|
||||
this._stopData = data;
|
||||
this._info.receiveStopData = true;
|
||||
this._info.StopXnInfo = XnInfo
|
||||
|
||||
// 如果速度数据已完成,执行停止逻辑
|
||||
if (this._info.speedDataComplete) {
|
||||
this.stopScrollWork(stopSpeedData);
|
||||
|
||||
this.stopScrollWork(stopSpeedData, this._info.StopXnInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -396,7 +420,7 @@ export abstract class BaseRoller extends Component {
|
||||
/**
|
||||
* 执行停止滚动的具体工作
|
||||
*/
|
||||
stopScrollWork(stopSpeedData: number[][]) {
|
||||
stopScrollWork(stopSpeedData: number[][], XnInfo) {
|
||||
// 如果不是手动停止,执行正常的停止逻辑
|
||||
if (!this._info.isManualStop) {
|
||||
this.changeState(ROLLER_STATE.DECELERATE);
|
||||
@ -406,7 +430,7 @@ export abstract class BaseRoller extends Component {
|
||||
|
||||
// 执行减速动画
|
||||
this.tweenSpeed(this._info.stopSpeedData, () => {
|
||||
this.changeState(ROLLER_STATE.LAST_PAGE_CREATE);
|
||||
this.changeState(ROLLER_STATE.LAST_PAGE_CREATE, XnInfo);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -493,7 +517,7 @@ export abstract class BaseRoller extends Component {
|
||||
* 改变滚轮状态
|
||||
* @param state 目标状态
|
||||
*/
|
||||
changeState(state: ROLLER_STATE) {
|
||||
changeState(state: ROLLER_STATE, XnInfo?: any) {
|
||||
if (this._info.state === state) return;
|
||||
|
||||
this._info.state = state;
|
||||
@ -501,7 +525,7 @@ export abstract class BaseRoller extends Component {
|
||||
// 状态变化处理
|
||||
switch (state) {
|
||||
case ROLLER_STATE.LAST_PAGE_CREATE:
|
||||
this.createLastPage();
|
||||
this.createLastPage(XnInfo);
|
||||
break;
|
||||
case ROLLER_STATE.BOUNCE:
|
||||
this.emitRollerEvent(ROLLER_EVENT.ROLLER_BOUNCE);
|
||||
@ -529,9 +553,17 @@ export abstract class BaseRoller extends Component {
|
||||
getRandomIconIndex(): number {
|
||||
let rule = this._info.iconRule;
|
||||
if (!rule?.length) {
|
||||
return Math.floor(Math.random() * this.iconFactory.getIconNum());
|
||||
let res = Math.floor(Math.random() * this.iconFactory.getIconNum());
|
||||
if (res == 2) {
|
||||
res = 3
|
||||
}
|
||||
return res
|
||||
}
|
||||
return rule[Math.floor(Math.random() * rule.length)];
|
||||
let res = rule[Math.floor(Math.random() * rule.length)];
|
||||
if (res == 2) {
|
||||
res = 3
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
@ -617,9 +649,9 @@ export abstract class BaseRoller extends Component {
|
||||
|
||||
abstract collectExistingIcons(): void;
|
||||
|
||||
abstract manualStopScroll(data: number[]): void;
|
||||
abstract manualStopScroll(data: number[], XnInfo: any): void;
|
||||
|
||||
abstract createLastPage(): void;
|
||||
abstract createLastPage(XnInfo: any): void;
|
||||
|
||||
abstract checkDeadLine(icon: Node): boolean;
|
||||
|
||||
@ -645,7 +677,7 @@ export abstract class BaseRoller extends Component {
|
||||
|
||||
abstract chanegeIconAndFrameType(data: any[]): void;
|
||||
|
||||
abstract createNewIconTop(createDatas: number[]): void;
|
||||
abstract createNewIconTop(createDatas: number[], XnInfo: any): void;
|
||||
|
||||
abstract iconFallDown(data: number[], crossSymbols: any): void;
|
||||
}
|
||||
@ -108,7 +108,7 @@ export enum SLOT_BAR_EVENT {
|
||||
ON_EXIT_CLICK = 'ON_EXIT_CLICK', // 退出游戏
|
||||
}
|
||||
|
||||
export enum SYS_GIFT{
|
||||
export enum SYS_GIFT {
|
||||
CLICK_CONTINUE = 'CLICK_CONTINUE',
|
||||
SETTLE_CONTINUE = 'SETTLE_CONTINUE',
|
||||
}
|
||||
@ -210,53 +210,20 @@ export interface GameData {
|
||||
ProfitScore: number;
|
||||
// 得分列表
|
||||
Scores: any;
|
||||
//倍率信息
|
||||
XnInfo: any;
|
||||
}
|
||||
|
||||
export interface SpinData {
|
||||
|
||||
}
|
||||
|
||||
export let gameInfo: any = {
|
||||
"Balance": 512887215700,
|
||||
"BetGrade": [
|
||||
10000,
|
||||
20000,
|
||||
30000,
|
||||
40000,
|
||||
50000,
|
||||
60000,
|
||||
70000,
|
||||
80000,
|
||||
90000,
|
||||
100000,
|
||||
200000,
|
||||
300000,
|
||||
400000,
|
||||
500000,
|
||||
600000,
|
||||
700000,
|
||||
800000,
|
||||
900000,
|
||||
1000000,
|
||||
2000000,
|
||||
3000000,
|
||||
4000000,
|
||||
5000000,
|
||||
6000000,
|
||||
7000000,
|
||||
8000000,
|
||||
9000000,
|
||||
10000000,
|
||||
15000000,
|
||||
20000000,
|
||||
25000000,
|
||||
30000000,
|
||||
35000000,
|
||||
40000000,
|
||||
45000000,
|
||||
50000000
|
||||
],
|
||||
|
||||
//
|
||||
export let testData: any = {
|
||||
"Balance": 51602584500, //余额
|
||||
"Data": {
|
||||
"Rid": "686389cd1bf37e54226ad747_1_1",
|
||||
"AllScore": 0,
|
||||
"Score": 0,
|
||||
"SpinScore": 0,
|
||||
@ -268,24 +235,25 @@ export let gameInfo: any = {
|
||||
"Mode": 0,
|
||||
"FreeSpin": null,
|
||||
"Bet": 10000,
|
||||
"Balance": 0,
|
||||
"WinMultiPlier": 1,
|
||||
"Balance": 99880882500,
|
||||
"IsFree": false,
|
||||
"WinMultiPlier": 0,
|
||||
"CrossSymbols": {
|
||||
"1": {
|
||||
"FrameType": 1,
|
||||
"FrameType": 0,
|
||||
"PosFirst": 5,
|
||||
"PosLast": 6,
|
||||
"Color": 4
|
||||
"Color": 12
|
||||
},
|
||||
"2": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 8,
|
||||
"PosLast": 9,
|
||||
"Color": 3
|
||||
"Color": 9
|
||||
},
|
||||
"3": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 11,
|
||||
"PosFirst": 10,
|
||||
"PosLast": 12,
|
||||
"Color": 7
|
||||
},
|
||||
@ -293,545 +261,114 @@ export let gameInfo: any = {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 13,
|
||||
"PosLast": 14,
|
||||
"Color": 9
|
||||
"Color": 7
|
||||
},
|
||||
"5": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 15,
|
||||
"PosLast": 16,
|
||||
"Color": 1
|
||||
"PosLast": 17,
|
||||
"Color": 8
|
||||
},
|
||||
"6": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 17,
|
||||
"PosLast": 18,
|
||||
"Color": 10
|
||||
},
|
||||
"7": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 20,
|
||||
"PosLast": 21,
|
||||
"Color": 3
|
||||
},
|
||||
"8": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 22,
|
||||
"PosLast": 23,
|
||||
"Color": 9
|
||||
"PosFirst": 21,
|
||||
"PosLast": 22,
|
||||
"Color": 7
|
||||
}
|
||||
},
|
||||
"WaysNum": 6400,
|
||||
"WaysNum": 6000,
|
||||
"SymbolNumOfReels": [
|
||||
5,
|
||||
4,
|
||||
3,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"IsEnd": true,
|
||||
"SymbolWinInfos": null,
|
||||
"SymbolWinInfos": {},
|
||||
"WinPosition": null,
|
||||
"PanColor": {
|
||||
"Top": [
|
||||
3,
|
||||
6,
|
||||
8,
|
||||
2
|
||||
4,
|
||||
2,
|
||||
2,
|
||||
11
|
||||
],
|
||||
"Bottom": [
|
||||
5,
|
||||
12,
|
||||
4,
|
||||
9,
|
||||
11,
|
||||
4,
|
||||
4,
|
||||
12,
|
||||
3,
|
||||
3,
|
||||
5,
|
||||
7,
|
||||
7,
|
||||
9,
|
||||
9,
|
||||
1,
|
||||
1,
|
||||
10,
|
||||
10,
|
||||
9,
|
||||
12,
|
||||
12,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
9,
|
||||
11,
|
||||
8,
|
||||
9,
|
||||
9,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
8,
|
||||
8,
|
||||
8,
|
||||
3,
|
||||
3,
|
||||
11,
|
||||
7,
|
||||
7,
|
||||
3,
|
||||
3,
|
||||
11,
|
||||
6,
|
||||
12,
|
||||
10,
|
||||
6,
|
||||
12
|
||||
8
|
||||
]
|
||||
},
|
||||
"PanChanges": null,
|
||||
"RoundInfo": null,
|
||||
"ScNum": 0,
|
||||
"GetGamesTimes": 0,
|
||||
"ProfitScore": 0,
|
||||
"Scores": null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
export let winData: any = {
|
||||
"Balance": 51602584500, //余额
|
||||
"Data": {
|
||||
"AllScore": 76000, //累积赢分
|
||||
"Score": 24000,//本盘赢分
|
||||
"SpinScore": 0, //忽略
|
||||
"Data": null,//忽略
|
||||
"Remove": null,//忽略
|
||||
"HitLine": null,//忽略
|
||||
"HitBlock": null,//忽略
|
||||
"DataType": null,//忽略
|
||||
"Mode": 1, //0普通模式 1购买模式
|
||||
"FreeSpin": {
|
||||
"MaxCount": 10, //小游戏总次数
|
||||
"LeftCount": 7 //小游戏剩余次数
|
||||
},
|
||||
"Bet": 10000, //下注
|
||||
"Balance": 51602584500, //余额
|
||||
"WinMultiPlier": 6, //当前算分的倍率 界面显示的X6倍
|
||||
"CrossSymbols": {//跨行的符号集
|
||||
"1": {
|
||||
"FrameType": 0, //0:普通框 1:银框 2:金框 3:百搭框
|
||||
"PosFirst": 6,
|
||||
"PosLast": 7,
|
||||
"Color": 12
|
||||
},
|
||||
"2": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 8,
|
||||
"PosLast": 9,
|
||||
"Color": 6
|
||||
},
|
||||
"3": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 11,
|
||||
"PosLast": 12,
|
||||
"Color": 6
|
||||
},
|
||||
"4": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 13,
|
||||
"PosLast": 14,
|
||||
"Color": 9
|
||||
},
|
||||
"5": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 18,
|
||||
"PosLast": 19,
|
||||
"Color": 6
|
||||
},
|
||||
"6": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 22,
|
||||
"PosLast": 23,
|
||||
"Color": 6
|
||||
}
|
||||
},
|
||||
"WaysNum": 10000,
|
||||
"SymbolNumOfReels": [ //每一根轴上有几个符号,跨行的符号算一个
|
||||
5,
|
||||
4,
|
||||
4,
|
||||
5,
|
||||
5,
|
||||
5
|
||||
],
|
||||
"IsEnd": false, //是否为最后一盘
|
||||
"SymbolWinInfos": {//赢分信息
|
||||
"9": {//9作为key代表symbol的color
|
||||
"Score": 4000, //中奖分数
|
||||
"Ways": 1, //中奖路数
|
||||
"SymbolPayoutValue": 8,//赢分对应的符号值,3个多少分,4个多少分,5个多少分
|
||||
"BottomSymbols": [ //2维数组,代表赢分的块
|
||||
[
|
||||
0
|
||||
],
|
||||
[
|
||||
5
|
||||
],
|
||||
[
|
||||
13,
|
||||
14
|
||||
]
|
||||
],
|
||||
"BottomPos": [//1维数组,底部代表赢分的块的占领的块索引值
|
||||
0,
|
||||
5,
|
||||
13,
|
||||
14
|
||||
],
|
||||
"TopPos": [//1维数组,顶部代表赢分的块的占领的块索引值
|
||||
2,
|
||||
3
|
||||
],
|
||||
"Formula": "0.07 x 6",//下注历史使用
|
||||
"FormulaDetail": "1.00 / 20 x 8 x 1 x 6",//下注历史使用
|
||||
"WinAxisNum": 5//下注历史使用
|
||||
}
|
||||
},
|
||||
"WinPosition": {//赢分位置
|
||||
"BottomNormal": [//赢分底部只占单个位置的符号的位置
|
||||
"ProfitScore": -10000,
|
||||
"ScoreInfos": null,
|
||||
"AllBet": 10000,
|
||||
"GmNum": 0,
|
||||
"MultiPlierSymbolNum": 0,
|
||||
"Nst": 0,
|
||||
"TopTNum": null,
|
||||
"AnimationCtrl": {
|
||||
"Axis13EqualPlayAnim": false,
|
||||
"AxisTitleInfo": [
|
||||
0,
|
||||
5
|
||||
],
|
||||
"BottomSpecial": [//赢分底部占多个位置的crossSymbol符号的位置
|
||||
13,
|
||||
14
|
||||
],
|
||||
"TopNormal": [//赢分顶部的位置
|
||||
2,
|
||||
3
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"PanColor": {//盘面
|
||||
"Top": [//盘面顶部
|
||||
2,
|
||||
11,
|
||||
9,
|
||||
9
|
||||
],
|
||||
"Bottom": [//盘面底部
|
||||
9,
|
||||
8,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
9,
|
||||
12,
|
||||
12,
|
||||
6,
|
||||
6,
|
||||
11,
|
||||
6,
|
||||
6,
|
||||
9,
|
||||
9,
|
||||
2,
|
||||
10,
|
||||
10,
|
||||
6,
|
||||
6,
|
||||
1,
|
||||
5,
|
||||
6,
|
||||
6,
|
||||
5,
|
||||
11,
|
||||
8,
|
||||
3,
|
||||
3,
|
||||
3
|
||||
]
|
||||
},
|
||||
"PanChanges": {//当前盘面相对于上一把盘面的变化
|
||||
"CrossSymbolFrameTypeChange": {//crossSymbol符号 银框金框等之间的变化
|
||||
"FrameType": 2,//变成金框了
|
||||
"PosFirst": 0,//crossSymbol的起始位置
|
||||
"PosLast": 3,
|
||||
},//crossSymbol的结束位置
|
||||
"CrossSymbolPosChange": {//crossSymbol符号的位置发生了变化
|
||||
"1": { //1的key对应于CrossSymbols字段中的key
|
||||
"OldPos": [//CrossSymbols的变化之前的位置
|
||||
5,
|
||||
6
|
||||
],
|
||||
"NewPos": [//CrossSymbols的变化之后的位置
|
||||
6,
|
||||
7
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"OldPos": [
|
||||
7,
|
||||
8
|
||||
],
|
||||
"NewPos": [
|
||||
8,
|
||||
9
|
||||
]
|
||||
}
|
||||
},
|
||||
"CrossSymbolColorChange": {},//crossSymbol符号的color发生了变化
|
||||
"BottomNewSymbols": [//此盘每一列新增加的symbol 数据中的值代表color
|
||||
[
|
||||
9
|
||||
],
|
||||
[
|
||||
9
|
||||
],
|
||||
[
|
||||
11
|
||||
],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"TopNewSymbols": []//此局头部新增加的symbol 数据中的值代表color
|
||||
},
|
||||
"RoundInfo": {//回合信息 //下注历史用
|
||||
"Current": 2,
|
||||
"Total": 3
|
||||
},
|
||||
"ScNum": 1,//下注历史用
|
||||
"GetGamesTimes": 0,//下注历史用
|
||||
"ProfitScore": 24000,//下注历史用
|
||||
"Scores": null//下注历史用
|
||||
}
|
||||
}
|
||||
|
||||
export let winTestData = {
|
||||
"Balance": 512890548700,
|
||||
"Data": {
|
||||
"Rid": "67da7b0e3fb9bd4878ff44d2_7_21",
|
||||
"AllScore": 56000,
|
||||
"Score": 42000,
|
||||
"SpinScore": 0,
|
||||
"Data": null,
|
||||
"Remove": null,
|
||||
"HitLine": null,
|
||||
"HitBlock": null,
|
||||
"DataType": null,
|
||||
"Mode": 1,
|
||||
"FreeSpin": {
|
||||
"MaxCount": 12,
|
||||
"LeftCount": 8,
|
||||
"SpinScore": 0
|
||||
},
|
||||
"Bet": 10000,
|
||||
"Balance": 512890548700,
|
||||
"IsFree": true,
|
||||
"WinMultiPlier": 6,
|
||||
"CrossSymbols": {
|
||||
"1": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 7,
|
||||
"PosLast": 9,
|
||||
"Color": 8
|
||||
},
|
||||
"2": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 10,
|
||||
"PosLast": 12,
|
||||
"Color": 10
|
||||
},
|
||||
"3": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 17,
|
||||
"PosLast": 18,
|
||||
"Color": 4
|
||||
},
|
||||
"4": {
|
||||
"FrameType": 0,
|
||||
"PosFirst": 20,
|
||||
"PosLast": 21,
|
||||
"Color": 3
|
||||
},
|
||||
"5": {
|
||||
"FrameType": 1,
|
||||
"PosFirst": 22,
|
||||
"PosLast": 23,
|
||||
"Color": 11
|
||||
}
|
||||
},
|
||||
"WaysNum": 8000,
|
||||
"SymbolNumOfReels": [
|
||||
5,
|
||||
4,
|
||||
4,
|
||||
5,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"IsEnd": false,
|
||||
"SymbolWinInfos": {
|
||||
"10": {
|
||||
"Score": 1000,
|
||||
"Ways": 1,
|
||||
"SymbolPayoutValue": 2,
|
||||
"BottomSymbols": [
|
||||
[
|
||||
3
|
||||
],
|
||||
[
|
||||
5
|
||||
],
|
||||
[
|
||||
10,
|
||||
11,
|
||||
12
|
||||
],
|
||||
[
|
||||
15
|
||||
]
|
||||
],
|
||||
"BottomPos": [
|
||||
3,
|
||||
5,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
15
|
||||
],
|
||||
"TopPos": null,
|
||||
"Formula": "0.02 x 6",
|
||||
"FormulaDetail": "1.00 / 20 x 2 x 1 x 6",
|
||||
"WinAxisNum": 4
|
||||
},
|
||||
"8": {
|
||||
"Score": 6000,
|
||||
"Ways": 2,
|
||||
"SymbolPayoutValue": 6,
|
||||
"BottomSymbols": [
|
||||
[
|
||||
1
|
||||
],
|
||||
[
|
||||
7,
|
||||
8,
|
||||
9
|
||||
],
|
||||
[
|
||||
13
|
||||
],
|
||||
[
|
||||
14
|
||||
],
|
||||
[
|
||||
19
|
||||
]
|
||||
],
|
||||
"BottomPos": [
|
||||
1,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
13,
|
||||
14,
|
||||
19
|
||||
],
|
||||
"TopPos": null,
|
||||
"Formula": "0.10 x 6",
|
||||
"FormulaDetail": "1.00 / 20 x 6 x 2 x 6",
|
||||
"WinAxisNum": 4
|
||||
}
|
||||
},
|
||||
"WinPosition": {
|
||||
"BottomNormal": [
|
||||
1,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
13,
|
||||
14,
|
||||
19,
|
||||
3,
|
||||
5,
|
||||
15
|
||||
],
|
||||
"BottomSpecial": [
|
||||
10,
|
||||
11,
|
||||
12
|
||||
],
|
||||
"TopNormal": null
|
||||
},
|
||||
"PanColor": {
|
||||
"HistoryDetail": null,
|
||||
"XnInfo": {
|
||||
"Top": [
|
||||
1,
|
||||
9,
|
||||
4,
|
||||
4
|
||||
],
|
||||
"Bottom": [
|
||||
5,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
9,
|
||||
10,
|
||||
6,
|
||||
8,
|
||||
8,
|
||||
8,
|
||||
10,
|
||||
10,
|
||||
10,
|
||||
8,
|
||||
8,
|
||||
10,
|
||||
11,
|
||||
4,
|
||||
4,
|
||||
8,
|
||||
3,
|
||||
3,
|
||||
11,
|
||||
11,
|
||||
4,
|
||||
6,
|
||||
6,
|
||||
5,
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
"PanChanges": {
|
||||
"CrossSymbolFrameTypeChange": {},
|
||||
"CrossSymbolPosChange": {
|
||||
"1": {
|
||||
"OldPos": [
|
||||
6,
|
||||
7,
|
||||
8
|
||||
],
|
||||
"NewPos": [
|
||||
7,
|
||||
8,
|
||||
9
|
||||
]
|
||||
{
|
||||
"StartIndex": 1,
|
||||
"N": 5
|
||||
},
|
||||
{
|
||||
"StartIndex": 2,
|
||||
"N": 8
|
||||
}
|
||||
},
|
||||
"CrossSymbolColorChange": {},
|
||||
"BottomNewSymbols": [
|
||||
[
|
||||
5,
|
||||
8
|
||||
],
|
||||
[
|
||||
10
|
||||
],
|
||||
[],
|
||||
[
|
||||
10
|
||||
],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
"TopNewSymbols": [
|
||||
4
|
||||
]
|
||||
},
|
||||
"RoundInfo": {
|
||||
"Current": 2,
|
||||
"Total": 3
|
||||
},
|
||||
"ScNum": 1,
|
||||
"GetGamesTimes": 0,
|
||||
"ProfitScore": 42000,
|
||||
"Scores": null
|
||||
"Bottom": null,
|
||||
"AddN": 6,
|
||||
"NowN": 6,
|
||||
"Win": "",
|
||||
"WinDetail": ""
|
||||
}
|
||||
},
|
||||
"Frb": {
|
||||
"Finished": null,
|
||||
"Ongoing": null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -33,34 +33,34 @@ export class HRoller extends BaseRoller {
|
||||
col: number = 3;
|
||||
|
||||
// 本地格式化相关
|
||||
@property
|
||||
_format = false;
|
||||
@property({ tooltip: '本地格式化' })
|
||||
get format(): boolean {
|
||||
return this._format;
|
||||
}
|
||||
set format(b: boolean) {
|
||||
this._format = b;
|
||||
this.resizeContentSize();
|
||||
// @property
|
||||
// _format = false;
|
||||
// @property({ tooltip: '本地格式化' })
|
||||
// get format(): boolean {
|
||||
// return this._format;
|
||||
// }
|
||||
// set format(b: boolean) {
|
||||
// this._format = b;
|
||||
// this.resizeContentSize();
|
||||
|
||||
if (!this.iconFactory) {
|
||||
console.error('IconFactory没有设置');
|
||||
return;
|
||||
}
|
||||
// if (!this.iconFactory) {
|
||||
// console.error('IconFactory没有设置');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 重新创建图标
|
||||
this._content.removeAllChildren();
|
||||
this._info.icons = [];
|
||||
this._allIcons.clear();
|
||||
this._posToIconKey.clear();
|
||||
// 清除位置缓存 - 添加这一行
|
||||
this._positionCache.clear();
|
||||
// // 重新创建图标
|
||||
// this._content.removeAllChildren();
|
||||
// this._info.icons = [];
|
||||
// this._allIcons.clear();
|
||||
// this._posToIconKey.clear();
|
||||
// // 清除位置缓存 - 添加这一行
|
||||
// this._positionCache.clear();
|
||||
|
||||
for (let i = 0; i < this.col; i++) {
|
||||
let randomIndex = Math.floor(Math.random() * this.iconFactory.getIconNum());
|
||||
this.createNormalIcon(i, randomIndex);
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < this.col; i++) {
|
||||
// let randomIndex = Math.floor(Math.random() * this.iconFactory.getIconNum());
|
||||
// this.createNormalIcon(i, randomIndex);
|
||||
// }
|
||||
// }
|
||||
|
||||
_cachedContentWidth: number = 0;
|
||||
_cachedAnchorX: number = 0;
|
||||
@ -198,7 +198,7 @@ export class HRoller extends BaseRoller {
|
||||
* 手动停止滚动
|
||||
* @param data 停止时的图标数据
|
||||
*/
|
||||
async manualStopScroll(data: number[]) {
|
||||
async manualStopScroll(data: number[], XnInfo: any) {
|
||||
if (this._info.isManualStop ||
|
||||
this._info.state === ROLLER_STATE.STOP) {
|
||||
return;
|
||||
@ -228,7 +228,7 @@ export class HRoller extends BaseRoller {
|
||||
this._allIcons.clear();
|
||||
this._posToIconKey.clear();
|
||||
|
||||
this.createInitIcons(data);
|
||||
this.createInitIcons(data, XnInfo, true);
|
||||
// 为所有创建的图标播放动画
|
||||
for (let icon of this._allIcons.values()) {
|
||||
icon.getComponent(Icon).playSpawnAni();
|
||||
@ -238,7 +238,7 @@ export class HRoller extends BaseRoller {
|
||||
/**
|
||||
* 创建最后一页图标
|
||||
*/
|
||||
createLastPage() {
|
||||
createLastPage(XnInfo) {
|
||||
let data = this._stopData;
|
||||
if (!data) return;
|
||||
|
||||
@ -262,10 +262,18 @@ export class HRoller extends BaseRoller {
|
||||
let pos = i;
|
||||
let iconIndex = data[i];
|
||||
let iconKey = this.generateIconKey(pos, 1, pos);
|
||||
let multi = 1
|
||||
if (XnInfo.Top) {
|
||||
for (let i = 0; i < XnInfo.Top.length; i++) {
|
||||
if (XnInfo.Top[i].StartIndex == pos) {
|
||||
multi = XnInfo.Top[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 创建图标节点
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId, multi);
|
||||
|
||||
// 计算位置
|
||||
let x = rightX + (pos + 1) * this.iconWidth;
|
||||
@ -645,7 +653,7 @@ export class HRoller extends BaseRoller {
|
||||
* 创建新icon
|
||||
* @param createMsg 信息
|
||||
*/
|
||||
createNewIconTop(createDatas: number[]) {
|
||||
createNewIconTop(createDatas: number[], XnInfo: any) {
|
||||
// 获取所有图标
|
||||
let rightX = this.getIconPosition(this.col - 1, 1).x;
|
||||
for (let i = 0; i < createDatas.length; i++) {
|
||||
@ -653,7 +661,16 @@ export class HRoller extends BaseRoller {
|
||||
let iconIndex = createDatas[i];
|
||||
let iconKey = this.generateIconKey(pos, 1, pos);
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId);
|
||||
let multi = 1
|
||||
if (XnInfo.Top && iconIndex == 2) {
|
||||
for (let i = 0; i < XnInfo.Top.length; i++) {
|
||||
if (XnInfo.Top[i].StartIndex == pos - createDatas.length - 1) {
|
||||
multi = XnInfo.Top[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId, multi);
|
||||
|
||||
let x = rightX + (i + 1) * this.iconWidth;
|
||||
icon.setPosition(x, 0, 0);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { _decorator, Component, Node, Prefab, sp, Sprite, UITransform, Vec3, v3, EventTarget } from 'cc';
|
||||
import { _decorator, Component, Node, Prefab, sp, Sprite, UITransform, Vec3, v3, EventTarget, Label } from 'cc';
|
||||
import { ICON_STATE, ICON_WIDTH } from './Define';
|
||||
import { GameDataManager } from 'db://assets/Loading/scripts/manager/GameDataManager';
|
||||
import { NodePoolManager } from 'db://assets/Loading/scripts/manager/NodePoolManager';
|
||||
@ -36,11 +36,11 @@ export class Icon extends Component {
|
||||
bgNode: Node = null;
|
||||
|
||||
// 普通框
|
||||
@property(Sprite)
|
||||
Frame: Sprite = null;
|
||||
// @property(Sprite)
|
||||
// Frame: Sprite = null;
|
||||
|
||||
@property(Sprite)
|
||||
blurFrame: Sprite = null;
|
||||
// @property(Sprite)
|
||||
// blurFrame: Sprite = null;
|
||||
|
||||
@property(Prefab)
|
||||
winSpinePrefab: Prefab = null;
|
||||
@ -49,23 +49,24 @@ export class Icon extends Component {
|
||||
private _normalNode: Node = null;
|
||||
private _fastNode: Node = null;
|
||||
private _btn: Node = null;
|
||||
private _frameNode: Node = null;
|
||||
private _fastFrameNode: Node = null;
|
||||
// private _frameNode: Node = null;
|
||||
// private _fastFrameNode: Node = null;
|
||||
private _normalSpriteNode: Node = null;
|
||||
private _fastSpriteNode: Node = null;
|
||||
|
||||
|
||||
// 组件缓存 - 提高性能
|
||||
private _transform: UITransform = null;
|
||||
private _frameTransform: UITransform = null;
|
||||
// private _frameTransform: UITransform = null;
|
||||
private _bgTransform: UITransform = null;
|
||||
private _fastFrameTransform: UITransform = null;
|
||||
// private _fastFrameTransform: UITransform = null;
|
||||
private _btnTransform: UITransform = null;
|
||||
// 基础属性
|
||||
private _iconId: number = 99;
|
||||
private _lheight: number = 1; // 图标的高度倍数,默认1*1
|
||||
private _state = ICON_STATE.ACTIVATE;
|
||||
private _iconKey: string = '';
|
||||
private _frameType: number = 0;
|
||||
// private _frameType: number = 0;
|
||||
private _rollerIndex: number = 0;
|
||||
|
||||
// 缓存的向量对象,避免重复创建
|
||||
@ -75,6 +76,7 @@ export class Icon extends Component {
|
||||
private _isInitialized: boolean = false;
|
||||
private _isFastMode: boolean = false;
|
||||
private _isWildOrScatter: boolean = false;
|
||||
private _isMulti: boolean = false;
|
||||
|
||||
// 动画相关
|
||||
private _iconChangeCallback: Function = null;
|
||||
@ -84,6 +86,7 @@ export class Icon extends Component {
|
||||
set index(id: number) {
|
||||
this._iconId = id;
|
||||
this._isWildOrScatter = id === 0 || id === 1;
|
||||
this._isMulti = id == 2;
|
||||
}
|
||||
|
||||
get index(): number {
|
||||
@ -123,20 +126,20 @@ export class Icon extends Component {
|
||||
return parseInt(parts[1]);
|
||||
}
|
||||
|
||||
set frameType(type: number) {
|
||||
if (this._frameType === type) return; // 避免重复设置
|
||||
// set frameType(type: number) {
|
||||
// if (this._frameType === type) return; // 避免重复设置
|
||||
|
||||
this._frameType = type;
|
||||
this.updateFrames();
|
||||
}
|
||||
// this._frameType = type;
|
||||
// this.updateFrames();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取icon框类型
|
||||
* @returns 0:普通框 1:银框 2:金框 3:百搭框
|
||||
*/
|
||||
get frameType(): number {
|
||||
return this._frameType;
|
||||
}
|
||||
// get frameType(): number {
|
||||
// return this._frameType;
|
||||
// }
|
||||
|
||||
// 生命周期:组件加载时
|
||||
onLoad() {
|
||||
@ -170,33 +173,33 @@ export class Icon extends Component {
|
||||
}
|
||||
|
||||
// 更新框架精灵
|
||||
updateFrames() {
|
||||
if (!this.Frame || !this.blurFrame) return;
|
||||
// updateFrames() {
|
||||
// if (!this.Frame || !this.blurFrame) return;
|
||||
|
||||
const manager = GameDataManager.instance;
|
||||
let frameName, blurFrameName;
|
||||
// const manager = GameDataManager.instance;
|
||||
// let frameName, blurFrameName;
|
||||
|
||||
switch (this._frameType) {
|
||||
case 0:
|
||||
frameName = 'fr01_IronFrame';
|
||||
blurFrameName = 'fr01_IronFrame_blur';
|
||||
break;
|
||||
case 1:
|
||||
frameName = 'fr02_SilverFrame';
|
||||
blurFrameName = 'fr02_SilverFrame_blur';
|
||||
break;
|
||||
case 2:
|
||||
frameName = 'fr03_GoldFrame';
|
||||
blurFrameName = 'fr03_GoldFrame_blur';
|
||||
break;
|
||||
default:
|
||||
frameName = 'fr01_IronFrame';
|
||||
blurFrameName = 'fr01_IronFrame_blur';
|
||||
}
|
||||
// switch (this._frameType) {
|
||||
// case 0:
|
||||
// frameName = 'fr01_IronFrame';
|
||||
// blurFrameName = 'fr01_IronFrame_blur';
|
||||
// break;
|
||||
// case 1:
|
||||
// frameName = 'fr02_SilverFrame';
|
||||
// blurFrameName = 'fr02_SilverFrame_blur';
|
||||
// break;
|
||||
// case 2:
|
||||
// frameName = 'fr03_GoldFrame';
|
||||
// blurFrameName = 'fr03_GoldFrame_blur';
|
||||
// break;
|
||||
// default:
|
||||
// frameName = 'fr01_IronFrame';
|
||||
// blurFrameName = 'fr01_IronFrame_blur';
|
||||
// }
|
||||
|
||||
this.Frame.spriteFrame = manager.getFrameTypeCache(frameName);
|
||||
this.blurFrame.spriteFrame = manager.getFrameTypeCache(blurFrameName);
|
||||
}
|
||||
// this.Frame.spriteFrame = manager.getFrameTypeCache(frameName);
|
||||
// this.blurFrame.spriteFrame = manager.getFrameTypeCache(blurFrameName);
|
||||
// }
|
||||
|
||||
// 初始化所有组件引用
|
||||
private initializeComponents() {
|
||||
@ -206,12 +209,12 @@ export class Icon extends Component {
|
||||
this._normalNode = this.node.getChildByName('normal');
|
||||
if (this._normalNode) {
|
||||
this._normalSpriteNode = this._normalNode.getChildByName('sprite');
|
||||
this._frameNode = this._normalNode.getChildByName('frame');
|
||||
// this._frameNode = this._normalNode.getChildByName('frame');
|
||||
|
||||
// 缓存组件
|
||||
if (this._frameNode) {
|
||||
this._frameTransform = this._frameNode.getComponent(UITransform);
|
||||
}
|
||||
// if (this._frameNode) {
|
||||
// this._frameTransform = this._frameNode.getComponent(UITransform);
|
||||
// }
|
||||
}
|
||||
|
||||
this._btn = this.node.getChildByName('btn');
|
||||
@ -221,14 +224,16 @@ export class Icon extends Component {
|
||||
}
|
||||
|
||||
this._fastNode = this.node.getChildByName('fast');
|
||||
if (this._fastNode) {
|
||||
this._fastFrameNode = this._fastNode.getChildByName('frame');
|
||||
this._fastSpriteNode = this._fastNode.getChildByName('sp_fast');
|
||||
|
||||
// 缓存组件
|
||||
if (this._fastFrameNode) {
|
||||
this._fastFrameTransform = this._fastFrameNode.getComponent(UITransform);
|
||||
}
|
||||
}
|
||||
// if (this._fastNode) {
|
||||
// this._fastFrameNode = this._fastNode.getChildByName('frame');
|
||||
|
||||
// // 缓存组件
|
||||
// if (this._fastFrameNode) {
|
||||
// this._fastFrameTransform = this._fastFrameNode.getComponent(UITransform);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 缓存背景节点组件
|
||||
if (this.bgNode) {
|
||||
@ -237,26 +242,25 @@ export class Icon extends Component {
|
||||
|
||||
// 设置初始状态
|
||||
if (this._normalNode) this._normalNode.active = true;
|
||||
if (this._frameNode) this._frameNode.active = true;
|
||||
// if (this._frameNode) this._frameNode.active = true;
|
||||
if (this._normalSpriteNode) this._normalSpriteNode.active = true;
|
||||
if (this._fastNode) this._fastNode.active = false;
|
||||
if (this._fastFrameNode) this._fastFrameNode.active = false;
|
||||
// if (this._fastFrameNode) this._fastFrameNode.active = false;
|
||||
|
||||
this._isInitialized = true;
|
||||
}
|
||||
|
||||
// 初始化图标
|
||||
initIcon(id: number, lHeight: number = 1, IconKey: string = '', frameType: number = 0, rollerIndex: number = 0) {
|
||||
initIcon(id: number, lHeight: number = 1, IconKey: string = '', frameType: number = 0, rollerIndex: number = 0, multi: number = 0) {
|
||||
// 确保组件已初始化
|
||||
if (!this._isInitialized) {
|
||||
this.initializeComponents();
|
||||
}
|
||||
|
||||
// 设置基本属性
|
||||
this.index = id;
|
||||
this.lHeight = lHeight;
|
||||
this.iconKey = IconKey;
|
||||
this.frameType = frameType;
|
||||
// this.frameType = frameType;
|
||||
this.rollerIndex = rollerIndex;
|
||||
// 设置尺寸
|
||||
if (this._transform) {
|
||||
@ -274,11 +278,11 @@ export class Icon extends Component {
|
||||
if (this._bgTransform) this._bgTransform.height = height;
|
||||
else this.updateHeightForLheight(lHeight, this.bgNode);
|
||||
|
||||
if (this._frameTransform) this._frameTransform.height = height;
|
||||
else this.updateHeightForLheight(lHeight, this._frameNode);
|
||||
// if (this._frameTransform) this._frameTransform.height = height;
|
||||
// else this.updateHeightForLheight(lHeight, this._frameNode);
|
||||
|
||||
if (this._fastFrameTransform) this._fastFrameTransform.height = height;
|
||||
else this.updateHeightForLheight(lHeight, this._fastFrameNode);
|
||||
// if (this._fastFrameTransform) this._fastFrameTransform.height = height;
|
||||
// else this.updateHeightForLheight(lHeight, this._fastFrameNode);
|
||||
|
||||
if (this._btnTransform) {
|
||||
this._btnTransform.height = BTN_HEIGHT_MAP[lHeight] || BTN_HEIGHT_MAP[1];
|
||||
@ -294,7 +298,10 @@ export class Icon extends Component {
|
||||
transform.width = ICON_WIDTH;
|
||||
}
|
||||
|
||||
|
||||
if (id == 2 && multi > 1) {
|
||||
this._normalSpriteNode.getChildByName('multi').getComponent(Label).string = "X" + multi
|
||||
this._fastSpriteNode.getChildByName('multi').getComponent(Label).string = "X" + multi
|
||||
}
|
||||
|
||||
// 重置状态
|
||||
this.resetState();
|
||||
@ -320,6 +327,11 @@ export class Icon extends Component {
|
||||
if (this._normalSpriteNode) this._normalSpriteNode.active = true;
|
||||
}
|
||||
|
||||
if (this._isMulti) {
|
||||
if (this.iconSpine && this.iconSpine.node) this.iconSpine.node.active = true;
|
||||
if (this._normalSpriteNode) this._normalSpriteNode.active = true;
|
||||
}
|
||||
|
||||
this._state = ICON_STATE.IDLE;
|
||||
}
|
||||
|
||||
@ -368,6 +380,9 @@ export class Icon extends Component {
|
||||
|
||||
case ICON_STATE.WIN:
|
||||
this.showFastIcon(false);
|
||||
if (this._isMulti) {
|
||||
break
|
||||
}
|
||||
|
||||
if (this._isWildOrScatter) {
|
||||
if (this.iconSpine && this.iconSpine.node) {
|
||||
@ -410,7 +425,7 @@ export class Icon extends Component {
|
||||
}
|
||||
|
||||
playSpawnAni() {
|
||||
if (!this.iconSpine || !this.iconSpine.node) return;
|
||||
if (!this.iconSpine || !this.iconSpine.node || this._isMulti) return;
|
||||
|
||||
this.iconSpine.node.active = true;
|
||||
this._normalSpriteNode && (this._normalSpriteNode.active = false);
|
||||
@ -452,7 +467,7 @@ export class Icon extends Component {
|
||||
if (this._normalNode) this._normalNode.active = !show;
|
||||
if (this._fastNode) this._fastNode.active = show;
|
||||
|
||||
if (!show) {
|
||||
if (!show && !this._isMulti) {
|
||||
if (this._isWildOrScatter && this.iconSpine) {
|
||||
this.iconSpine.node.active = true;
|
||||
this._normalSpriteNode && (this._normalSpriteNode.active = false);
|
||||
|
||||
@ -32,34 +32,34 @@ export class Roller extends BaseRoller {
|
||||
row: number = 3;
|
||||
|
||||
// 本地格式化相关
|
||||
@property
|
||||
private _format = false;
|
||||
@property({ tooltip: '本地格式化' })
|
||||
get format(): boolean {
|
||||
return this._format;
|
||||
}
|
||||
set format(b: boolean) {
|
||||
this._format = b;
|
||||
this.resizeContentSize();
|
||||
// @property
|
||||
// private _format = false;
|
||||
// @property({ tooltip: '本地格式化' })
|
||||
// get format(): boolean {
|
||||
// return this._format;
|
||||
// }
|
||||
// set format(b: boolean) {
|
||||
// this._format = b;
|
||||
// this.resizeContentSize();
|
||||
|
||||
if (!this.iconFactory) {
|
||||
console.error('IconFactory没有设置');
|
||||
return;
|
||||
}
|
||||
// if (!this.iconFactory) {
|
||||
// console.error('IconFactory没有设置');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 重新创建图标
|
||||
this._content.removeAllChildren();
|
||||
this._info.icons = [];
|
||||
this._allIcons.clear();
|
||||
this._posToIconKey.clear();
|
||||
// 清除位置缓存 - 添加这一行
|
||||
this._positionCache.clear();
|
||||
// // 重新创建图标
|
||||
// this._content.removeAllChildren();
|
||||
// this._info.icons = [];
|
||||
// this._allIcons.clear();
|
||||
// this._posToIconKey.clear();
|
||||
// // 清除位置缓存 - 添加这一行
|
||||
// this._positionCache.clear();
|
||||
|
||||
for (let i = 0; i < this.row; i++) {
|
||||
let randomIndex = Math.floor(Math.random() * this.iconFactory.getIconNum());
|
||||
this.createNormalIcon(i, randomIndex);
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < this.row; i++) {
|
||||
// let randomIndex = Math.floor(Math.random() * this.iconFactory.getIconNum());
|
||||
// this.createNormalIcon(i, randomIndex);
|
||||
// }
|
||||
// }
|
||||
|
||||
_cachedContentHeight: number = 0;
|
||||
_cachedAnchorY: number = 0;
|
||||
@ -199,7 +199,7 @@ export class Roller extends BaseRoller {
|
||||
* 手动停止滚动
|
||||
* @param data 停止时的图标数据
|
||||
*/
|
||||
async manualStopScroll(data: number[]) {
|
||||
async manualStopScroll(data: number[], XnInfo: any) {
|
||||
if (this._info.isManualStop ||
|
||||
this._info.state === ROLLER_STATE.STOP) {
|
||||
return;
|
||||
@ -229,7 +229,7 @@ export class Roller extends BaseRoller {
|
||||
this._allIcons.clear();
|
||||
this._posToIconKey.clear();
|
||||
|
||||
this.createInitIcons(data);
|
||||
this.createInitIcons(data, XnInfo, false);
|
||||
// 为所有创建的图标播放动画
|
||||
for (let icon of this._allIcons.values()) {
|
||||
icon.getComponent(Icon).playSpawnAni();
|
||||
@ -240,7 +240,7 @@ export class Roller extends BaseRoller {
|
||||
/**
|
||||
* 创建最后一页图标
|
||||
*/
|
||||
createLastPage() {
|
||||
createLastPage(XnInfo) {
|
||||
let data = this._stopData;
|
||||
if (!data) return;
|
||||
|
||||
@ -277,13 +277,22 @@ export class Roller extends BaseRoller {
|
||||
let height = iconSpecialMsg.lHeight;
|
||||
let iconIndex = iconSpecialMsg.iconIndex;
|
||||
let frameType = iconSpecialMsg.frameType;
|
||||
let multi = 1
|
||||
if (XnInfo.Bottom && iconIndex == 2) {
|
||||
for (let i = 0; i < XnInfo.Bottom.length; i++) {
|
||||
if (XnInfo.Bottom[i].StartIndex == startPos + (this._rollerId - 1) * 5) {
|
||||
multi = XnInfo.Bottom[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 生成图标ID
|
||||
let iconKey = this.generateIconKey(startPos, height, endPos);
|
||||
|
||||
// 创建图标节点
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, height, iconKey, frameType, this._rollerId);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, height, iconKey, frameType, this._rollerId, multi);
|
||||
|
||||
// 计算位置
|
||||
// 计算该位置普通图标应该在的Y坐标
|
||||
@ -312,10 +321,27 @@ export class Roller extends BaseRoller {
|
||||
let pos = i;
|
||||
let iconIndex = data[i];
|
||||
let iconKey = this.generateIconKey(pos, 1, pos);
|
||||
let startPos = pos + (this._rollerId - 1) * 5
|
||||
let multi = 1
|
||||
if (XnInfo.Bottom && iconIndex == 2) {
|
||||
for (let i = 0; i < XnInfo.Bottom.length; i++) {
|
||||
if (XnInfo.Bottom[i].StartIndex == startPos) {
|
||||
multi = XnInfo.Bottom[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
// else if (XnInfo.Top ) {
|
||||
// for (let i = 0; i < XnInfo.Top.length; i++) {
|
||||
// if (XnInfo.Top[i].StartIndex == startPos) {
|
||||
// multi = XnInfo.Top[i].N
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// 创建图标节点
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId, multi);
|
||||
|
||||
// 计算位置
|
||||
let y = topY + (this.row - pos) * this.iconHeight;
|
||||
@ -743,7 +769,7 @@ export class Roller extends BaseRoller {
|
||||
// 创建新的图标节点
|
||||
const newIcon = this.iconFactory.icfactoryCreateIcon(newIndex);
|
||||
// 初始化新的Icon组件
|
||||
newIcon.getComponent(Icon).initIcon(newIndex, lheight, iconKey, newFrameType, this._rollerId);
|
||||
newIcon.getComponent(Icon).initIcon(newIndex, lheight, iconKey, newFrameType, this._rollerId, 0);
|
||||
// 设置新图标的位置
|
||||
const newPos = this.getIconPosition(oldStartPos, lheight);
|
||||
newIcon.setPosition(newPos);
|
||||
@ -763,15 +789,36 @@ export class Roller extends BaseRoller {
|
||||
* 创建新icon
|
||||
* @param createMsg 信息
|
||||
*/
|
||||
createNewIconTop(createDatas: number[]) {
|
||||
createNewIconTop(createDatas: number[], XnInfo) {
|
||||
// 获取所有图标
|
||||
let topY = this.getIconPosition(0, 1);
|
||||
for (let i = 0; i < createDatas.length; i++) {
|
||||
let pos = i - createDatas.length;
|
||||
let iconIndex = createDatas[i];
|
||||
let iconKey = this.generateIconKey(pos, 1, pos);
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex);
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId);
|
||||
let icon = this.iconFactory.icfactoryCreateIcon(iconIndex)
|
||||
let startPos = (this._rollerId - 1) * 5 + i
|
||||
let multi = 1
|
||||
if (XnInfo.Bottom && iconIndex == 2) {
|
||||
// console.log('XnInfo.Bottom', XnInfo.Bottom)
|
||||
// console.log('startPos', startPos)
|
||||
// console.log('pos', pos)
|
||||
// console.log('i', i)
|
||||
// console.log('createDatas.length', createDatas.length)
|
||||
for (let i = 0; i < XnInfo.Bottom.length; i++) {
|
||||
if (XnInfo.Bottom[i].StartIndex == startPos) {
|
||||
multi = XnInfo.Bottom[i].N
|
||||
}
|
||||
}
|
||||
}
|
||||
// else if (XnInfo.Top && this._rollerId == 0) {
|
||||
// for (let i = 0; i < XnInfo.Top.length; i++) {
|
||||
// if (XnInfo.Top[i].StartIndex == startPos) {
|
||||
// multi = XnInfo.Top[i].N
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
icon.getComponent(Icon).initIcon(iconIndex, 1, iconKey, 0, this._rollerId, multi);
|
||||
|
||||
let y = topY.y + (createDatas.length - i) * this.iconHeight;
|
||||
icon.setPosition(0, y, 0); this._content.addChild(icon);
|
||||
|
||||
@ -94,7 +94,7 @@ export class RollerManager extends Component {
|
||||
|
||||
if (rollerMsg.isHorizontal) {
|
||||
let hRoller = HRoller.create(i, rollerMsg.col, this.iconWidth, this.iconHeight, this.iconFactory);
|
||||
hRoller.format = true;
|
||||
// hRoller.format = true;
|
||||
|
||||
this.hMaskNode.addChild(hRoller.node);
|
||||
|
||||
@ -106,7 +106,7 @@ export class RollerManager extends Component {
|
||||
this.allRollers.push(hRoller);
|
||||
} else {
|
||||
let roller = Roller.create(i, rollerMsg.row, this.iconWidth, this.iconHeight, this.iconFactory);
|
||||
roller.format = true;
|
||||
// roller.format = true;
|
||||
|
||||
this.vMaskNode.addChild(roller.node);
|
||||
|
||||
@ -213,7 +213,8 @@ export class RollerManager extends Component {
|
||||
if (nextStopRollerId != -1) {
|
||||
let nextStopRollerCrossSymbols = this._processedCrossSymbols[nextStopRollerId];
|
||||
this.allRollers[nextStopRollerId].setCrossSymbols(nextStopRollerCrossSymbols);
|
||||
this.allRollers[nextStopRollerId].stopScroll(this._resultStopData[nextStopRollerId], stopSpeedData);
|
||||
|
||||
this.allRollers[nextStopRollerId].stopScroll(this._resultStopData[nextStopRollerId], stopSpeedData, this._spinData.XnInfo);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -390,7 +391,8 @@ export class RollerManager extends Component {
|
||||
for (let i = 0; i < this.allRollers.length; i++) {
|
||||
let roller = this.allRollers[i];
|
||||
let rollerCrossSymbols = processedCrossSymbols[i];
|
||||
roller.initRollerWithIcon(i, this._resultStopData[i], rollerCrossSymbols);
|
||||
|
||||
roller.initRollerWithIcon(i, this._resultStopData[i], rollerCrossSymbols, this._spinData.XnInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -550,13 +552,13 @@ export class RollerManager extends Component {
|
||||
|
||||
let rollerCrossSymbols = processedCrossSymbols[i];
|
||||
roller.setCrossSymbols(rollerCrossSymbols);
|
||||
roller.stopScroll(stopData, stopSpeedData)
|
||||
roller.stopScroll(stopData, stopSpeedData, data.XnInfo)
|
||||
}
|
||||
} else {
|
||||
// this.stopRollersInSequence(processedCrossSymbols);
|
||||
let firstRollerCrossSymbols = processedCrossSymbols[0];
|
||||
this.allRollers[0].setCrossSymbols(firstRollerCrossSymbols);
|
||||
this.allRollers[0].stopScroll(this._resultStopData[0], stopSpeedData);
|
||||
this.allRollers[0].stopScroll(this._resultStopData[0], stopSpeedData, data.XnInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -576,7 +578,7 @@ export class RollerManager extends Component {
|
||||
let roller = this.allRollers[i];
|
||||
let rollerCrossSymbols = processedCrossSymbols[i];
|
||||
roller.setCrossSymbols(rollerCrossSymbols);
|
||||
roller.manualStopScroll(stopData)
|
||||
roller.manualStopScroll(stopData, data.XnInfo)
|
||||
}
|
||||
}
|
||||
|
||||
@ -801,10 +803,11 @@ export class RollerManager extends Component {
|
||||
}
|
||||
|
||||
|
||||
createNewIconTop(createDatas: number[][]) {
|
||||
createNewIconTop(createDatas: number[][], spinData: any) {
|
||||
this.allRollers.forEach((roller, index) => {
|
||||
let createData = createDatas[index];
|
||||
roller.createNewIconTop(createData);
|
||||
|
||||
roller.createNewIconTop(createData, spinData.XnInfo);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
9
assets/Game/textures/Images/new.meta
Normal file
9
assets/Game/textures/Images/new.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "e6a53ff8-1137-4091-8c63-b1b249f1d627",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@ -184,7 +184,7 @@
|
||||
"_priority": 0,
|
||||
"_fov": 45,
|
||||
"_fovAxis": 0,
|
||||
"_orthoHeight": 360,
|
||||
"_orthoHeight": 960,
|
||||
"_near": 0,
|
||||
"_far": 2000,
|
||||
"_color": {
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
import { log, path } from "cc"
|
||||
import { PREVIEW } from "cc/env"
|
||||
|
||||
const gameId = "rp_10003";
|
||||
const gameId = "rp_10012";
|
||||
// let apiaddr = "https://rpgames-api.rpfafafahkdev.com";
|
||||
let apiaddr = "";
|
||||
let token = "eyJQIjoxMDIyNDksIkUiOjE3NTQzMTU2NTQsIlMiOjEwMDEsIkQiOiJycF8xMDAwMyJ9.dLje43B9JF1J5BEosXpadwjiv_0HgQzPjGZzRMDSxOI";
|
||||
let token = "eyJQIjoxMDA5NDksIkUiOjE3NTYyMTUzMTgsIlMiOjEwMDIsIkQiOiJycF8xMDAxMiJ9.lC6BKImcKItMuWFmjsjsUakn8HiMfSa0gVKq2HKqNII";
|
||||
let language = "en"
|
||||
let currency = "THB"
|
||||
let supportUrl = ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user