小游戏内固定按普通速度滚动
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m19s

This commit is contained in:
TJH 2026-06-25 10:22:37 +08:00
parent 6ec4529f89
commit ee79975ea7
5 changed files with 133 additions and 107 deletions

View File

@ -25,14 +25,11 @@
"__id__": 12 "__id__": 12
}, },
{ {
"__id__": 28 "__id__": 30
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 80
},
{ {
"__id__": 82 "__id__": 82
}, },
@ -41,10 +38,13 @@
}, },
{ {
"__id__": 86 "__id__": 86
},
{
"__id__": 88
} }
], ],
"_prefab": { "_prefab": {
"__id__": 88 "__id__": 90
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -286,9 +286,6 @@
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 19
},
{ {
"__id__": 21 "__id__": 21
}, },
@ -297,10 +294,13 @@
}, },
{ {
"__id__": 25 "__id__": 25
},
{
"__id__": 27
} }
], ],
"_prefab": { "_prefab": {
"__id__": 27 "__id__": 29
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -347,10 +347,13 @@
}, },
{ {
"__id__": 16 "__id__": 16
},
{
"__id__": 18
} }
], ],
"_prefab": { "_prefab": {
"__id__": 18 "__id__": 20
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -454,6 +457,25 @@
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "b1t/5ILB5NyYSZZ7cIvE+T" "fileId": "b1t/5ILB5NyYSZZ7cIvE+T"
}, },
{
"__type__": "cc.UIOpacity",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 13
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"_opacity": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4c6i+ABgxO6pjQW1axaAYX"
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {
@ -477,7 +499,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 20 "__id__": 22
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -505,7 +527,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 22 "__id__": 24
}, },
"_type": 0, "_type": 0,
"_inverted": false, "_inverted": false,
@ -527,7 +549,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 24 "__id__": 26
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -573,7 +595,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 26 "__id__": 28
}, },
"_alignFlags": 40, "_alignFlags": 40,
"_target": null, "_target": null,
@ -622,32 +644,32 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 29 "__id__": 31
}, },
{ {
"__id__": 35 "__id__": 37
}, },
{ {
"__id__": 43 "__id__": 45
}, },
{ {
"__id__": 51 "__id__": 53
}, },
{ {
"__id__": 57 "__id__": 59
}, },
{ {
"__id__": 63 "__id__": 65
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 77 "__id__": 79
} }
], ],
"_prefab": { "_prefab": {
"__id__": 79 "__id__": 81
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -684,20 +706,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 28 "__id__": 30
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 30 "__id__": 32
}, },
{ {
"__id__": 32 "__id__": 34
} }
], ],
"_prefab": { "_prefab": {
"__id__": 34 "__id__": 36
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -734,11 +756,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 29 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 31 "__id__": 33
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -762,11 +784,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 29 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 33 "__id__": 35
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -846,23 +868,23 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 28 "__id__": 30
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 36
},
{ {
"__id__": 38 "__id__": 38
}, },
{ {
"__id__": 40 "__id__": 40
},
{
"__id__": 42
} }
], ],
"_prefab": { "_prefab": {
"__id__": 42 "__id__": 44
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -899,11 +921,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 35 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 37 "__id__": 39
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -927,11 +949,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 35 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 39 "__id__": 41
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -972,11 +994,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 35 "__id__": 37
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 41 "__id__": 43
}, },
"spriteName": "FREELoading", "spriteName": "FREELoading",
"_id": "" "_id": ""
@ -1004,23 +1026,23 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 28 "__id__": 30
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 44
},
{ {
"__id__": 46 "__id__": 46
}, },
{ {
"__id__": 48 "__id__": 48
},
{
"__id__": 50
} }
], ],
"_prefab": { "_prefab": {
"__id__": 50 "__id__": 52
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1057,11 +1079,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 43 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 45 "__id__": 47
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1085,11 +1107,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 43 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 47 "__id__": 49
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1130,11 +1152,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 43 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 49 "__id__": 51
}, },
"spriteName": "FREELoading1", "spriteName": "FREELoading1",
"_id": "" "_id": ""
@ -1162,20 +1184,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 28 "__id__": 30
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 52 "__id__": 54
}, },
{ {
"__id__": 54 "__id__": 56
} }
], ],
"_prefab": { "_prefab": {
"__id__": 56 "__id__": 58
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1212,11 +1234,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 51 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 53 "__id__": 55
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1240,11 +1262,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 51 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 55 "__id__": 57
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1298,20 +1320,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 28 "__id__": 30
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 58 "__id__": 60
}, },
{ {
"__id__": 60 "__id__": 62
} }
], ],
"_prefab": { "_prefab": {
"__id__": 62 "__id__": 64
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1348,11 +1370,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 57 "__id__": 59
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 59 "__id__": 61
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1376,11 +1398,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 57 "__id__": 59
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 61 "__id__": 63
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1460,24 +1482,24 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 28 "__id__": 30
}, },
"_children": [ "_children": [
{ {
"__id__": 64 "__id__": 66
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 72 "__id__": 74
}, },
{ {
"__id__": 74 "__id__": 76
} }
], ],
"_prefab": { "_prefab": {
"__id__": 76 "__id__": 78
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1514,23 +1536,23 @@
"_objFlags": 512, "_objFlags": 512,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 63 "__id__": 65
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 65
},
{ {
"__id__": 67 "__id__": 67
}, },
{ {
"__id__": 69 "__id__": 69
},
{
"__id__": 71
} }
], ],
"_prefab": { "_prefab": {
"__id__": 71 "__id__": 73
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1567,11 +1589,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 64 "__id__": 66
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 66 "__id__": 68
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1595,11 +1617,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 64 "__id__": 66
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 68 "__id__": 70
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1640,11 +1662,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 64 "__id__": 66
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 70 "__id__": 72
}, },
"spriteName": "FREELoading2", "spriteName": "FREELoading2",
"_id": "" "_id": ""
@ -1672,11 +1694,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 63 "__id__": 65
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 73 "__id__": 75
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1700,11 +1722,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 63 "__id__": 65
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 75 "__id__": 77
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1758,11 +1780,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 28 "__id__": 30
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 78 "__id__": 80
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1803,7 +1825,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 81 "__id__": 83
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1831,25 +1853,25 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 83 "__id__": 85
}, },
"mainNode": { "mainNode": {
"__id__": 28 "__id__": 30
}, },
"envEnterSpineNode": { "envEnterSpineNode": {
"__id__": 13 "__id__": 13
}, },
"freeSpinCount": { "freeSpinCount": {
"__id__": 32 "__id__": 34
}, },
"loadingProgressLabel": { "loadingProgressLabel": {
"__id__": 60 "__id__": 62
}, },
"loadingNode": { "loadingNode": {
"__id__": 51 "__id__": 53
}, },
"startBtn": { "startBtn": {
"__id__": 63 "__id__": 65
}, },
"_id": "" "_id": ""
}, },
@ -1867,7 +1889,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 85 "__id__": 87
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -1903,9 +1925,9 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 87 "__id__": 89
}, },
"_opacity": 255, "_opacity": 0,
"_id": "" "_id": ""
}, },
{ {

View File

@ -42,11 +42,14 @@ export class FreeSpinEnterSpine extends Component {
}); });
this.mainNode.active = true; this.mainNode.active = true;
this.envEnterSpineNode.active = true;
AudioManager.instance.playBGM('Change_Free_Bgm'); AudioManager.instance.playBGM('Change_Free_Bgm');
// 透明度 // 透明度
let opacity = this.node.getComponent(UIOpacity); let opacity = this.node.getComponent(UIOpacity);
opacity.opacity = 0; opacity.opacity = 0;
this.envEnterSpineNode.active = true;
this.envEnterSpineNode.getComponent(UIOpacity).opacity = 255;
tween(opacity) tween(opacity)
.to(0.5, { opacity: 255 }, { easing: 'quadIn' }) .to(0.5, { opacity: 255 }, { easing: 'quadIn' })
.start(); .start();

View File

@ -213,7 +213,7 @@ export class Roller extends Component {
// ─── 旋转主流程 ────────────────────────────────────────────────────────── // ─── 旋转主流程 ──────────────────────────────────────────────────────────
/** 开始旋转:现有图标向上飞出(退场动画) */ /** 开始旋转:现有图标向上飞出(退场动画) */
startScroll() { startScroll(isFastSpin) {
if (this._info.state != ROLLER_STATE.STOP) return; if (this._info.state != ROLLER_STATE.STOP) return;
AudioManager.instance.playSFX('Roller_Start'); AudioManager.instance.playSFX('Roller_Start');
@ -228,7 +228,7 @@ export class Roller extends Component {
seen.add(icon); seen.add(icon);
this._exitingIcons.push(icon); this._exitingIcons.push(icon);
let iconRef = icon; let iconRef = icon;
let exitDelay = this._info.isFastSpin ? 0 : (this.row - 1 - i) * 0.02; let exitDelay = isFastSpin ? 0 : (this.row - 1 - i) * 0.02;
tween(iconRef) tween(iconRef)
.delay(exitDelay) .delay(exitDelay)
.to(0.14, { position: v3(0, exitTopY, 0) }, { easing: 'quadIn' }) .to(0.14, { position: v3(0, exitTopY, 0) }, { easing: 'quadIn' })
@ -251,7 +251,7 @@ export class Roller extends Component {
this._info.state = ROLLER_STATE.ACCELERATE; this._info.state = ROLLER_STATE.ACCELERATE;
// 退场结束后标记"可掉落" // 退场结束后标记"可掉落"
let exitDuration = this._info.isFastSpin ? 0.14 : 0.14 + (this.row - 1) * 0.02; let exitDuration = isFastSpin ? 0.14 : 0.14 + (this.row - 1) * 0.02;
this.scheduleOnce(() => { this.scheduleOnce(() => {
if (this._info.state !== ROLLER_STATE.ACCELERATE) return; if (this._info.state !== ROLLER_STATE.ACCELERATE) return;
this._info.state = ROLLER_STATE.UNIFORM; this._info.state = ROLLER_STATE.UNIFORM;

View File

@ -394,12 +394,12 @@ export class RollerManager extends Component {
startScroll() { startScroll() {
this._isManualStop = false; this._isManualStop = false;
this.unscheduleAllCallbacks(); this.unscheduleAllCallbacks();
if (this._isFastSpin) { if (this._isFastSpin && !this._isFreeSpin) {
for (let i = 0; i < this.allRollers.length; i++) { for (let i = 0; i < this.allRollers.length; i++) {
let roller = this.allRollers[i]; let roller = this.allRollers[i];
if (roller) { if (roller) {
if (this._isManualStop) return; if (this._isManualStop) return;
roller.startScroll(); roller.startScroll(true);
} }
} }
} else { } else {
@ -409,7 +409,7 @@ export class RollerManager extends Component {
if (roller) { if (roller) {
this.scheduleOnce(() => { this.scheduleOnce(() => {
if (this._isManualStop) return; if (this._isManualStop) return;
roller.startScroll(); roller.startScroll(false);
}, delay); }, delay);
} }
} }

View File

@ -308,6 +308,7 @@ export class SlotGame extends Component {
// this.setWaysCount('...'); // this.setWaysCount('...');
this.rollerManager.resetInfo(); this.rollerManager.resetInfo();
this.rollerManager.setIsFreeSpin(isFreeSpin)
this.rollerManager.startScroll(); this.rollerManager.startScroll();
this._lastRemoveData = []; // ← 清除 this._lastRemoveData = []; // ← 清除
} }