小游戏触发时和小游戏中信息栏的显示

This commit is contained in:
TJH 2025-09-23 11:24:47 +08:00
parent eb5c934b1d
commit 8ae2a2d093
5 changed files with 4800 additions and 2851 deletions

View File

@ -763,6 +763,8 @@
"__id__": 0
},
"fileId": "8asFqcpAxH+pqltTBwU0gA",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@ -1052,7 +1054,7 @@
"__prefab": {
"__id__": 42
},
"spriteName": "STRAT",
"spriteName": "START",
"_id": ""
},
{

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,8 @@ export class SlotGame extends Component {
private totalWinLayout: Layout = null;
private totalWinLabel: Label = null;
private oneScrtter: Node = null;
private baseBg: Node = null;
private freeBg: Node = null;
@ -73,6 +75,7 @@ export class SlotGame extends Component {
private spinData: any = null;
private isEliminating: boolean = false;
private isInfreeSpin: boolean = false;
// 设置是否正在消除中
setIsEliminating(isEliminating: boolean) {
this.isEliminating = isEliminating;
@ -100,6 +103,7 @@ export class SlotGame extends Component {
let frameNode = this.winType.getChildByName('FrameNode');
this.normalWin = frameNode.getChildByName('marqueeFrame_02');
this.totalWin = frameNode.getChildByName('marqueeFrame_03');
this.oneScrtter = frameNode.getChildByName('marqueeFrame_04');
this.normalWinLayout = this.normalWin.getChildByName('layout').getComponent(Layout);
// this.normalWinSprite = this.normalWinLayout.node.getChildByName('winSprite');
@ -147,6 +151,13 @@ export class SlotGame extends Component {
}
playNextSprite() {
//小游戏中只显示一个文本并且不移动
if (this.isInfreeSpin) {
let sprite = this.moveSprite[0];
sprite.node.setPosition(-250, 0, 0);
return
}
// 如果所有精灵都播放完了,重置索引
if (this.moveIndex >= this.moveSprite.length) {
this.moveIndex = 0;
@ -205,6 +216,8 @@ export class SlotGame extends Component {
this.base.active = !isFree;
this.free.active = isFree;
this.isInfreeSpin = isFree
}
}
@ -580,9 +593,20 @@ export class SlotGame extends Component {
this.freeMultiAni.play('FS_multiVFX_win_animation');
}
showOneScatterAndCollectx2(needShow: boolean) {
this.oneScrtter.active = needShow
if (needShow && !this.winTypeAni.getState('oneScatter').isPlaying) {
this.winTypeAni.play('oneScatter')
}
else if (!needShow) { this.winTypeAni.stop() }
}
showReadyHand(rollerId?: number) {
if (this.rollerManager.getIsManualStop() || this.rollerManager.getIsFastSpin()) return;
this.readyHand.active = true;
this.showOneScatterAndCollectx2(true)
this.readyHand.getChildByName('readyHand').active = true;
let spine = this.readyHand.getChildByName('readyHand').getComponent(sp.Skeleton);
spine.setAnimation(0, 'readyHand_01', true);
@ -606,6 +630,7 @@ export class SlotGame extends Component {
hideReadyHand() {
this.readyHand.active = false;
this.showOneScatterAndCollectx2(false)
let spine = this.readyHand.getChildByName('readyHand').getComponent(sp.Skeleton);
spine.clearTracks();

247
assets/oneScatter.anim Normal file
View File

@ -0,0 +1,247 @@
[
{
"__type__": "cc.AnimationClip",
"_name": "oneScatter",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 60,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 1,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 12
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.VectorTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channels": [
{
"__id__": 4
},
{
"__id__": 6
},
{
"__id__": 8
},
{
"__id__": 10
}
],
"_nComponents": 3
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
{
"__id__": 3
},
"scale"
]
},
{
"__type__": "cc.animation.HierarchyPath",
"path": "FrameNode/marqueeFrame_04/Mask/oneScatter"
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 5
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.5,
1
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1.100000023841858,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 7
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.5,
1
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1.100000023841858,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 9
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.5,
1
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 1,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 11
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "d4b8d6cb-18aa-40e8-8381-183b94e2639b",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "oneScatter"
}
}