Compare commits

...

3 Commits

Author SHA1 Message Date
TJH
9396a7d884 spinBtn在消除时显示为灰色
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 44s
2025-10-13 16:12:28 +08:00
TJH
976da48cc7 消除掉落时从右往左依次掉落 2025-10-13 15:53:48 +08:00
TJH
2c359d799a 自动旋转次数字体间距调整 2025-10-13 15:27:13 +08:00
9 changed files with 1909 additions and 1619 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "3bc48473-a47d-4954-a541-199b92e1922a",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "3bc48473-a47d-4954-a541-199b92e1922a@6c48a",
"displayName": "graySpinBtn",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "3bc48473-a47d-4954-a541-199b92e1922a",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "3bc48473-a47d-4954-a541-199b92e1922a@f9941",
"displayName": "graySpinBtn",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 223,
"height": 223,
"rawWidth": 223,
"rawHeight": 223,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-111.5,
-111.5,
0,
111.5,
-111.5,
0,
-111.5,
111.5,
0,
111.5,
111.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
223,
223,
223,
0,
0,
223,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-111.5,
-111.5,
0
],
"maxPos": [
111.5,
111.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "3bc48473-a47d-4954-a541-199b92e1922a@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "3bc48473-a47d-4954-a541-199b92e1922a@6c48a"
}
}

View File

@ -2,16 +2,16 @@ info face="Arial" size=10 bold=0 italic=0 charset="" unicode=0 stretchH=100 smoo
common lineHeight=104 base=10 scaleW=1352 scaleH=104 pages=1 packed=0
page id=0 file="xz_nb.png"
chars count=13
char id=57 x=0 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="9"
char id=44 x=104 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter=","
char id=46 x=208 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="."
char id=48 x=312 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="0"
char id=49 x=416 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="1"
char id=50 x=520 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="2"
char id=51 x=624 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="3"
char id=52 x=728 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="4"
char id=53 x=832 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="5"
char id=54 x=936 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="6"
char id=55 x=1040 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="7"
char id=56 x=1144 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="8"
char id=32 x=1248 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=80 page=0 chnl=0 page=0 letter="space"
char id=57 x=0 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="9"
char id=44 x=104 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter=","
char id=46 x=208 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="."
char id=48 x=312 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="0"
char id=49 x=416 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="1"
char id=50 x=520 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="2"
char id=51 x=624 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="3"
char id=52 x=728 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="4"
char id=53 x=832 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="5"
char id=54 x=936 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="6"
char id=55 x=1040 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="7"
char id=56 x=1144 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="8"
char id=32 x=1248 y=0 width=104 height=104 xoffset=0 yoffset=0 xadvance=68 page=0 chnl=0 page=0 letter="space"

View File

@ -22,7 +22,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"44": {
"rect": {
@ -33,7 +33,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"46": {
"rect": {
@ -44,7 +44,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"48": {
"rect": {
@ -55,7 +55,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"49": {
"rect": {
@ -66,7 +66,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"50": {
"rect": {
@ -77,7 +77,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"51": {
"rect": {
@ -88,7 +88,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"52": {
"rect": {
@ -99,7 +99,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"53": {
"rect": {
@ -110,7 +110,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"54": {
"rect": {
@ -121,7 +121,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"55": {
"rect": {
@ -132,7 +132,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"56": {
"rect": {
@ -143,7 +143,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
},
"57": {
"rect": {
@ -154,7 +154,7 @@
},
"xOffset": 0,
"yOffset": 0,
"xAdvance": 80
"xAdvance": 68
}
},
"kerningDict": {}

File diff suppressed because it is too large Load Diff

View File

@ -44,6 +44,7 @@ export class SlotBar extends Component {
private menuBtn: Button = null;
spinNode: Node = null;
grayBtn: Node = null;
spinBtn: Button = null;
spinAni: SpinAni = null;
stopAutoBtn: Button = null;
@ -87,6 +88,7 @@ export class SlotBar extends Component {
this.winLabel = Labels.getChildByName('win').getComponent(Label);
this.spinNode = this.node.getChildByName('SpinNode');
this.grayBtn = this.spinNode.getChildByName('grayBtn');
this.spinAni = this.spinNode.getComponent(SpinAni);
this.spinBtn = this.spinNode.getChildByName('spinBtn').getComponent(Button);
this.stopAutoBtn = this.spinNode.getChildByName('BtnStopAuto').getComponent(Button);
@ -222,7 +224,7 @@ export class SlotBar extends Component {
this.hasClickSpin = true;
this.manualStopNode.active = true
this.node.emit(SLOT_BAR_EVENT.ON_SPIN_CLICK);
this.spinAni.startSpin();
this.spinAni.startSpin(this.isFastSpin);
this.setBtnEnable(this.subBtn, false);
this.setBtnEnable(this.addBtn, false);
@ -669,6 +671,11 @@ export class SlotBar extends Component {
}
}
setGraySpinBtn(show: boolean) {
this.spinBtn.node.active = !show
this.grayBtn.active = show
}
setNodeOpacity(node: Node, opacity: number) {
node.getComponent(UIOpacity).opacity = opacity;
}

View File

@ -466,6 +466,7 @@ export class SlotScene extends Component {
if (this.checkHasEliminate()) {
this.slotGame.deleteIconNode();
this.playElemWinAnimation(true);
this.slotBar.setGraySpinBtn(true)
} else {
if (this.gameState.isInFreeSpin) {
if (this.gameState.isFirstFreeSpin) {
@ -789,6 +790,8 @@ export class SlotScene extends Component {
this.slotBar.setWin(this.spinData.AllScore);
callback?.();
}
this.slotBar.setGraySpinBtn(false)
}, delay)

View File

@ -791,22 +791,22 @@ export class RollerManager extends Component {
}
// changeIconAndFrameType(panChanges: any[]) {
// let rollerChangePositions: Map<number, any[]> = new Map();
// panChanges.forEach(change => {
// let lx = this.getLx(change.oldStartPos);
// let ly = this.getLy(change.oldStartPos);
// // 获取或创建该列的变化位置数组
// if (!rollerChangePositions.has(lx)) {
// rollerChangePositions.set(lx, []);
// }
// // 将oldStartPos改为ly并添加到对应列的数组中
// change.oldStartPos = ly;
// rollerChangePositions.get(lx).push(change);
// })
// let rollerChangePositions: Map<number, any[]> = new Map();
// panChanges.forEach(change => {
// let lx = this.getLx(change.oldStartPos);
// let ly = this.getLy(change.oldStartPos);
// // 获取或创建该列的变化位置数组
// if (!rollerChangePositions.has(lx)) {
// rollerChangePositions.set(lx, []);
// }
// // 将oldStartPos改为ly并添加到对应列的数组中
// change.oldStartPos = ly;
// rollerChangePositions.get(lx).push(change);
// })
// rollerChangePositions.forEach((changes, lx) => {
// this.allRollers[lx].chanegeIconAndFrameType(changes);
// })
// rollerChangePositions.forEach((changes, lx) => {
// this.allRollers[lx].chanegeIconAndFrameType(changes);
// })
// }
@ -829,13 +829,19 @@ export class RollerManager extends Component {
this._crossSymbols = data.CrossSymbols;
let processedCrossSymbols = this.processCrossSymbolsForRollers();
//从右到左掉落
this.allRollers.forEach((roller, index) => {
let stopData = this._resultStopData[index];
let rollerCrossSymbols = processedCrossSymbols[index];
roller.setCrossSymbols(rollerCrossSymbols);
let idx = this.allRollers.length - index - 1
let roll = this.allRollers[idx]
this.scheduleOnce(() => {
roller.iconFallDown(stopData, rollerCrossSymbols)
}, 0.03 * index)
let stopData = this._resultStopData[idx];
let rollerCrossSymbols = processedCrossSymbols[idx];
roll.setCrossSymbols(rollerCrossSymbols);
this.scheduleOnce(() => {
roll.iconFallDown(stopData, rollerCrossSymbols)
}, 0.01 * index)
}, 0.06 * index)
})
// 在第一个图标开始掉落时播放音效

View File

@ -16,9 +16,10 @@ export class SpinAni extends Component {
this.rotateSpine.setAnimation(0, 'idle', true)
}
public startSpin() {
public startSpin(isFastSpin: boolean) {
// this.rotateSpine.timeScale = isFastSpin ? 2 : 1
this.rotateSpine.setAnimation(0, 'Click', true)
// this.rotateSpine.addAnimation(0, 'Unclicked', true)
}