代码修改
This commit is contained in:
parent
4f2ca61ec1
commit
954f1be8b6
@ -38,10 +38,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 82
|
"__id__": 82
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 84
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 84
|
"__id__": 86
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@ -1851,6 +1854,25 @@
|
|||||||
"__type__": "cc.CompPrefabInfo",
|
"__type__": "cc.CompPrefabInfo",
|
||||||
"fileId": "26ofgGv3dOm7dkVHmvdhjB"
|
"fileId": "26ofgGv3dOm7dkVHmvdhjB"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UIOpacity",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 85
|
||||||
|
},
|
||||||
|
"_opacity": 255,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "f0oJF5RjlPfa5PwL79vD8J"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.PrefabInfo",
|
"__type__": "cc.PrefabInfo",
|
||||||
"root": {
|
"root": {
|
||||||
|
|||||||
@ -898,6 +898,7 @@
|
|||||||
"spineNode": {
|
"spineNode": {
|
||||||
"__id__": 26
|
"__id__": 26
|
||||||
},
|
},
|
||||||
|
"multiNode": null,
|
||||||
"multiSpriteFrames": [],
|
"multiSpriteFrames": [],
|
||||||
"blurMultiSpriteFrames": [],
|
"blurMultiSpriteFrames": [],
|
||||||
"_id": ""
|
"_id": ""
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import { _decorator, Component, Node, sp, tween, Vec3 } from 'cc';
|
import { _decorator, Component, Node, sp, tween, Vec3 } from 'cc';
|
||||||
import { GameDataManager } from '../../Main/Scripts/managers/GameDataManager';
|
import { GameDataManager } from '../../Main/Scripts/managers/GameDataManager';
|
||||||
import { NodePoolManager } from '../../Main/Scripts/managers/NodePoolManager';
|
import { NodePoolManager } from '../../Main/Scripts/managers/NodePoolManager';
|
||||||
import { getGameId } from '../../Main/Scripts/main/comm';
|
import { callGameApi, getGameId } from '../../Main/Scripts/main/comm';
|
||||||
|
import { AudioManager } from '../../Main/Scripts/managers/AudioManager';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('ChooseDiff')
|
@ccclass('ChooseDiff')
|
||||||
@ -22,11 +23,13 @@ export class ChooseDiff extends Component {
|
|||||||
highBgPos: Vec3 = new Vec3(330, 16, 0);
|
highBgPos: Vec3 = new Vec3(330, 16, 0);
|
||||||
|
|
||||||
canClickBtn: boolean = true;
|
canClickBtn: boolean = true;
|
||||||
|
animationCb: Function = null;
|
||||||
confirmCb: Function = null;
|
confirmCb: Function = null;
|
||||||
|
|
||||||
open(diff: number, confirmCb: () => void) {
|
open(diff: number, animationCb?: () => void, confirmCb?: () => void) {
|
||||||
this.chooseDiffSkeleton.setAnimation(0, null, false);
|
this.chooseDiffSkeleton.setAnimation(0, null, false);
|
||||||
this.currentDiff = diff;
|
this.currentDiff = diff;
|
||||||
|
this.animationCb = animationCb;
|
||||||
this.confirmCb = confirmCb;
|
this.confirmCb = confirmCb;
|
||||||
this.node.getChildByName('grayBg').active = true;
|
this.node.getChildByName('grayBg').active = true;
|
||||||
this.canClickBtn = false;
|
this.canClickBtn = false;
|
||||||
@ -42,7 +45,7 @@ export class ChooseDiff extends Component {
|
|||||||
onBtnClose() {
|
onBtnClose() {
|
||||||
if (!this.canClickBtn) return;
|
if (!this.canClickBtn) return;
|
||||||
this.canClickBtn = false;
|
this.canClickBtn = false;
|
||||||
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
tween(this.mainNode)
|
tween(this.mainNode)
|
||||||
.to(0.2, { scale: new Vec3(0.1, 0.1, 0.1) }, { easing: 'quadOut' })
|
.to(0.2, { scale: new Vec3(0.1, 0.1, 0.1) }, { easing: 'quadOut' })
|
||||||
.call(() => {
|
.call(() => {
|
||||||
@ -60,6 +63,11 @@ export class ChooseDiff extends Component {
|
|||||||
|
|
||||||
onBtnConfirm() {
|
onBtnConfirm() {
|
||||||
if (!this.canClickBtn) return;
|
if (!this.canClickBtn) return;
|
||||||
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
|
if (this.currentDiff === GameDataManager.instance.chooseDiff) {
|
||||||
|
this.onBtnClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.canClickBtn = false;
|
this.canClickBtn = false;
|
||||||
GameDataManager.instance.chooseDiff = this.currentDiff;
|
GameDataManager.instance.chooseDiff = this.currentDiff;
|
||||||
GameDataManager.instance.gamePending = String(getGameId()) + '_' + this.currentDiff;
|
GameDataManager.instance.gamePending = String(getGameId()) + '_' + this.currentDiff;
|
||||||
@ -67,6 +75,7 @@ export class ChooseDiff extends Component {
|
|||||||
tween(this.mainNode)
|
tween(this.mainNode)
|
||||||
.to(0.2, { scale: new Vec3(0.1, 0.1, 0.1) }, { easing: 'quadOut' })
|
.to(0.2, { scale: new Vec3(0.1, 0.1, 0.1) }, { easing: 'quadOut' })
|
||||||
.call(() => {
|
.call(() => {
|
||||||
|
if (this.animationCb) this.animationCb();
|
||||||
this.mainNode.active = false;
|
this.mainNode.active = false;
|
||||||
this.node.getChildByName('grayBg').active = false;
|
this.node.getChildByName('grayBg').active = false;
|
||||||
this.chooseDiffSkeleton.setAnimation(0, 'animation', false);
|
this.chooseDiffSkeleton.setAnimation(0, 'animation', false);
|
||||||
@ -81,6 +90,7 @@ export class ChooseDiff extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBtnLow() {
|
onBtnLow() {
|
||||||
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
if (this.currentDiff == 1 || !this.canClickBtn) return;
|
if (this.currentDiff == 1 || !this.canClickBtn) return;
|
||||||
this.currentDiff = 1;
|
this.currentDiff = 1;
|
||||||
this.canClickBtn = false;
|
this.canClickBtn = false;
|
||||||
@ -92,6 +102,7 @@ export class ChooseDiff extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBtnMedium() {
|
onBtnMedium() {
|
||||||
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
if (this.currentDiff == 2 || !this.canClickBtn) return;
|
if (this.currentDiff == 2 || !this.canClickBtn) return;
|
||||||
this.currentDiff = 2;
|
this.currentDiff = 2;
|
||||||
this.canClickBtn = false;
|
this.canClickBtn = false;
|
||||||
@ -103,6 +114,7 @@ export class ChooseDiff extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBtnHigh() {
|
onBtnHigh() {
|
||||||
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
if (this.currentDiff == 3 || !this.canClickBtn) return;
|
if (this.currentDiff == 3 || !this.canClickBtn) return;
|
||||||
this.currentDiff = 3;
|
this.currentDiff = 3;
|
||||||
this.canClickBtn = false;
|
this.canClickBtn = false;
|
||||||
|
|||||||
@ -30,7 +30,7 @@ export let GAME_STATE = {
|
|||||||
|
|
||||||
export let ICON_WIDTH = 132;
|
export let ICON_WIDTH = 132;
|
||||||
export let ICON_HEIGHT = 160;
|
export let ICON_HEIGHT = 160;
|
||||||
export let DELETE_TIME = 2.1;
|
export let DELETE_TIME = 1.5;
|
||||||
|
|
||||||
export interface ISpecialIcon {
|
export interface ISpecialIcon {
|
||||||
startPos: number;
|
startPos: number;
|
||||||
@ -44,7 +44,7 @@ export interface IParsedGameData {
|
|||||||
RemoveData: number[];
|
RemoveData: number[];
|
||||||
NewIconTop: number[][];
|
NewIconTop: number[][];
|
||||||
ScatterPos: number[];
|
ScatterPos: number[];
|
||||||
BombPos: number[];
|
MultiPos: number[];
|
||||||
hasSmallGame: boolean;
|
hasSmallGame: boolean;
|
||||||
hasFreeSpinAgain: boolean;
|
hasFreeSpinAgain: boolean;
|
||||||
FreeMulMap: { [pos: number]: number };
|
FreeMulMap: { [pos: number]: number };
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { _decorator, Component, Label, Node, sp, Tween, tween, Vec3 } from 'cc';
|
import { _decorator, Component, Label, Node, sp, Tween, tween, UIOpacity, Vec3 } from 'cc';
|
||||||
import { UIManager } from '../../Main/Scripts/managers/UIManager';
|
import { UIManager } from '../../Main/Scripts/managers/UIManager';
|
||||||
import { AudioManager } from '../../Main/Scripts/managers/AudioManager';
|
import { AudioManager } from '../../Main/Scripts/managers/AudioManager';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
@ -43,6 +43,14 @@ export class FreeSpinEnterSpine extends Component {
|
|||||||
|
|
||||||
this.mainNode.active = true;
|
this.mainNode.active = true;
|
||||||
this.envEnterSpineNode.active = true;
|
this.envEnterSpineNode.active = true;
|
||||||
|
AudioManager.instance.playBGM('Change_Free_Bgm');
|
||||||
|
// 透明度
|
||||||
|
let opacity = this.node.getComponent(UIOpacity);
|
||||||
|
opacity.opacity = 0;
|
||||||
|
tween(opacity)
|
||||||
|
.to(0.5, { opacity: 255 }, { easing: 'quadIn' })
|
||||||
|
.start();
|
||||||
|
|
||||||
tween(this.mainNode)
|
tween(this.mainNode)
|
||||||
.set({ scale: new Vec3(1.1, 1.1, 1.1) })
|
.set({ scale: new Vec3(1.1, 1.1, 1.1) })
|
||||||
.to(2, { scale: new Vec3(1, 1, 1) })
|
.to(2, { scale: new Vec3(1, 1, 1) })
|
||||||
@ -86,7 +94,6 @@ export class FreeSpinEnterSpine extends Component {
|
|||||||
this.unscheduleAllCallbacks();
|
this.unscheduleAllCallbacks();
|
||||||
if (this.hasClickBtn) return;
|
if (this.hasClickBtn) return;
|
||||||
this.hasClickBtn = true;
|
this.hasClickBtn = true;
|
||||||
AudioManager.instance.playSFX('Click_Small_Game_Start');
|
|
||||||
// 插入一个放大缩小的动画
|
// 插入一个放大缩小的动画
|
||||||
tween(this.startBtn)
|
tween(this.startBtn)
|
||||||
.to(0.1, { scale: new Vec3(1.1, 1.1, 1.1) })
|
.to(0.1, { scale: new Vec3(1.1, 1.1, 1.1) })
|
||||||
|
|||||||
@ -41,15 +41,15 @@ export class Icon extends Component {
|
|||||||
private rollerId: number = 0;
|
private rollerId: number = 0;
|
||||||
private state: ICON_STATE = ICON_STATE.IDLE;
|
private state: ICON_STATE = ICON_STATE.IDLE;
|
||||||
private isFastMode: boolean = false;
|
private isFastMode: boolean = false;
|
||||||
private isWild: boolean = false;
|
private isMulti: boolean = false;
|
||||||
private isScatter: boolean = false;
|
private isScatter: boolean = false;
|
||||||
|
|
||||||
set index(id: number) { this.iconId = id; this.isWild = false; this.isScatter = id === 0; }
|
set index(id: number) { this.iconId = id; this.isMulti = id === 10; this.isScatter = id === 0; }
|
||||||
get index(): number { return this.iconId }
|
get index(): number { return this.iconId }
|
||||||
|
|
||||||
get isWildOrScatter(): boolean {
|
// get isWildOrScatter(): boolean {
|
||||||
return this.isWild || this.isScatter;
|
// return this.isWild || this.isScatter;
|
||||||
}
|
// }
|
||||||
|
|
||||||
resetState() {
|
resetState() {
|
||||||
this.unscheduleAllCallbacks();
|
this.unscheduleAllCallbacks();
|
||||||
@ -73,6 +73,7 @@ export class Icon extends Component {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
||||||
|
spine.timeScale = 1;
|
||||||
if (spine) {
|
if (spine) {
|
||||||
spine.setCompleteListener(null);
|
spine.setCompleteListener(null);
|
||||||
}
|
}
|
||||||
@ -112,14 +113,43 @@ export class Icon extends Component {
|
|||||||
playIdleSpine(bol: boolean) {
|
playIdleSpine(bol: boolean) {
|
||||||
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
||||||
// if (spine && this.checkHasAnimation(spine, 'chixu')) {
|
// if (spine && this.checkHasAnimation(spine, 'chixu')) {
|
||||||
// if (bol) {
|
// if (bol) {
|
||||||
// this.normalNode.active = false;
|
// this.normalNode.active = false;
|
||||||
// this.spineNode.active = true;
|
// this.spineNode.active = true;
|
||||||
// spine.setAnimation(0, 'chixu', true);
|
// spine.setAnimation(0, 'chixu', true);
|
||||||
// } else {
|
// } else {
|
||||||
this.normalNode.active = true;
|
this.normalNode.active = true;
|
||||||
this.spineNode.active = false;
|
this.spineNode.active = false;
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
playTanSpine(bol: boolean) {
|
||||||
|
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
||||||
|
// if (spine && this.checkHasAnimation(spine, 'tan')) {
|
||||||
|
// if (bol) {
|
||||||
|
// this.normalNode.active = false;
|
||||||
|
// this.spineNode.active = true;
|
||||||
|
// spine.setAnimation(0, 'tan', true);
|
||||||
|
// } else {
|
||||||
|
// this.normalNode.active = true;
|
||||||
|
// this.spineNode.active = false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
playTanSpineForMsg(bol: boolean) {
|
||||||
|
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
||||||
|
// if (spine && this.checkHasAnimation(spine, 'tan')) {
|
||||||
|
// if (bol) {
|
||||||
|
// this.normalNode.active = false;
|
||||||
|
// this.spineNode.active = true;
|
||||||
|
// spine.timeScale = 0.3;
|
||||||
|
// spine.setAnimation(0, 'tan', true);
|
||||||
|
// } else {
|
||||||
|
// this.normalNode.active = true;
|
||||||
|
// this.spineNode.active = false;
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,27 +159,27 @@ export class Icon extends Component {
|
|||||||
if (spine && this.checkHasAnimation(spine, 'tan')) {
|
if (spine && this.checkHasAnimation(spine, 'tan')) {
|
||||||
// this.normalNode.active = false
|
// this.normalNode.active = false
|
||||||
this.spineNode.active = true;
|
this.spineNode.active = true;
|
||||||
spine.setAnimation(0, 'tan', isLoop);
|
// spine.setAnimation(0, 'tan', isLoop);
|
||||||
|
|
||||||
if (!isLoop) {
|
if (!isLoop) {
|
||||||
spine.setCompleteListener(() => {
|
// spine.setCompleteListener(() => {
|
||||||
spine.setCompleteListener(null);
|
// spine.setCompleteListener(null);
|
||||||
if (this.checkHasAnimation(spine, 'chixu')) {
|
// if (this.checkHasAnimation(spine, 'chixu')) {
|
||||||
this.playIdleSpine(true);
|
// this.playIdleSpine(true);
|
||||||
} else {
|
// } else {
|
||||||
this.normalNode.active = true;
|
// this.normalNode.active = true;
|
||||||
this.spineNode.active = false;
|
// this.spineNode.active = false;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
spine.setCompleteListener(null);
|
spine.setCompleteListener(null);
|
||||||
if (this.checkHasAnimation(spine, 'chixu')) {
|
// if (this.checkHasAnimation(spine, 'chixu')) {
|
||||||
this.playIdleSpine(true);
|
// this.playIdleSpine(true);
|
||||||
} else {
|
// } else {
|
||||||
this.normalNode.active = true;
|
// this.normalNode.active = true;
|
||||||
this.spineNode.active = false;
|
// this.spineNode.active = false;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,14 +196,15 @@ export class Icon extends Component {
|
|||||||
playScatterWaitSpine(bol: boolean) {
|
playScatterWaitSpine(bol: boolean) {
|
||||||
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
||||||
if (this.iconId == 0) {
|
if (this.iconId == 0) {
|
||||||
|
console.log('播放scatter等待动画');
|
||||||
if (spine && this.checkHasAnimation(spine, 'dengdai')) {
|
if (spine && this.checkHasAnimation(spine, 'dengdai')) {
|
||||||
if (bol) {
|
// if (bol) {
|
||||||
// this.normalNode.active = false;
|
// // this.normalNode.active = false;
|
||||||
this.spineNode.active = true;
|
// this.spineNode.active = true;
|
||||||
spine.setAnimation(0, 'dengdai', true);
|
// spine.setAnimation(0, 'dengdai', true);
|
||||||
} else {
|
// } else {
|
||||||
this.playIdleSpine(true);
|
// this.playIdleSpine(true);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,14 +212,16 @@ export class Icon extends Component {
|
|||||||
playMultiSpine() {
|
playMultiSpine() {
|
||||||
// this.spineNode.active = true;
|
// this.spineNode.active = true;
|
||||||
// this.normalNode.active = false;
|
// this.normalNode.active = false;
|
||||||
|
|
||||||
// let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
// let spine = this.spineNode.getChildByName('spine').getComponent(sp.Skeleton);
|
||||||
// if (spine) {
|
// if (spine) {
|
||||||
// spine.setAnimation(0, 'xiaoshi', false);
|
// console.log('播放scatter消失动画');
|
||||||
// spine.setCompleteListener(() => {
|
// spine.setAnimation(0, 'xiaoshi', false);
|
||||||
// spine.setCompleteListener(null);
|
// spine.setCompleteListener(() => {
|
||||||
// this.spineNode.active = false;
|
// spine.setCompleteListener(null);
|
||||||
// this.bombNode.active = true;
|
// this.spineNode.active = false;
|
||||||
// })
|
// this.bombNode.active = true;
|
||||||
|
// })
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +284,9 @@ export class Icon extends Component {
|
|||||||
|
|
||||||
async onClickIconNode() {
|
async onClickIconNode() {
|
||||||
if (GameDataManager.instance.canClickIconMsg) {
|
if (GameDataManager.instance.canClickIconMsg) {
|
||||||
AudioManager.instance.playSFX('Click_Icon');
|
if (this.isMulti) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let iconMsg = await NodePoolManager.instance.getNodeFromPoolDynamic('IconMsg', 'Prefab/Others/IconMsg', 'Game');
|
let iconMsg = await NodePoolManager.instance.getNodeFromPoolDynamic('IconMsg', 'Prefab/Others/IconMsg', 'Game');
|
||||||
let gameNode = find('Canvas/main/game');
|
let gameNode = find('Canvas/main/game');
|
||||||
if (!gameNode) return;
|
if (!gameNode) return;
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export class IconMsg extends Component {
|
|||||||
rightNode: Node = null;
|
rightNode: Node = null;
|
||||||
|
|
||||||
showIconMsg(iconComp: Icon, isLeft: boolean) {
|
showIconMsg(iconComp: Icon, isLeft: boolean) {
|
||||||
|
let isScatter = iconComp.index === 0;
|
||||||
this.leftNode.active = isLeft;
|
this.leftNode.active = isLeft;
|
||||||
this.rightNode.active = !isLeft;
|
this.rightNode.active = !isLeft;
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ export class IconMsg extends Component {
|
|||||||
this.onHideSelf();
|
this.onHideSelf();
|
||||||
})
|
})
|
||||||
|
|
||||||
let isScatter = iconComp.index === 0;
|
|
||||||
let node = isLeft ? this.leftNode : this.rightNode;
|
let node = isLeft ? this.leftNode : this.rightNode;
|
||||||
|
|
||||||
let iconParent = node.getChildByName('icon');
|
let iconParent = node.getChildByName('icon');
|
||||||
@ -40,7 +41,7 @@ export class IconMsg extends Component {
|
|||||||
// insIconNode.getComponent(Icon).index = iconComp.index;
|
// insIconNode.getComponent(Icon).index = iconComp.index;
|
||||||
iconParent.addChild(insIconNode);
|
iconParent.addChild(insIconNode);
|
||||||
insIconNode.setPosition(0, 0, 0);
|
insIconNode.setPosition(0, 0, 0);
|
||||||
insIconNode.getComponent(Icon).playIdleSpine(true);
|
insIconNode.getComponent(Icon).playTanSpineForMsg(true);
|
||||||
|
|
||||||
let msg = node.getChildByName('msg');
|
let msg = node.getChildByName('msg');
|
||||||
msg.active = isScatter ? false : true;
|
msg.active = isScatter ? false : true;
|
||||||
|
|||||||
@ -24,6 +24,7 @@ export let Btn_Key = {
|
|||||||
HistoryBtn: "HistoryBtn",
|
HistoryBtn: "HistoryBtn",
|
||||||
CloseL2Btn: "CloseL2Btn",
|
CloseL2Btn: "CloseL2Btn",
|
||||||
StopAutoSpinBtn: "StopAutoSpinBtn",
|
StopAutoSpinBtn: "StopAutoSpinBtn",
|
||||||
|
ChooseDiffBtn: "ChooseDiffBtn",
|
||||||
};
|
};
|
||||||
|
|
||||||
// 使用 @ccclass 装饰器
|
// 使用 @ccclass 装饰器
|
||||||
@ -103,9 +104,7 @@ export class SlotBar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getBtnButton(key: string): Button {
|
getBtnButton(key: string): Button {
|
||||||
return this.btnTable
|
return this.btnTable.find((btn) => btn.key === key)?.btnNode.getComponent(Button);
|
||||||
.find((btn) => btn.key === key)
|
|
||||||
?.btnNode.getComponent(Button);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setGameInfo(gameInfo: any) {
|
setGameInfo(gameInfo: any) {
|
||||||
@ -122,10 +121,22 @@ export class SlotBar extends Component {
|
|||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.SubBetBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.SubBetBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
||||||
|
this.updateChooseDiff();
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePlayerMsg(spinData: any, callBack: () => void) {
|
updateChooseDiff() {
|
||||||
|
let diff = GameDataManager.instance.chooseDiff;
|
||||||
|
this.node.getChildByName('Btn_L1').getChildByName('Choose').children.forEach((child: Node, index: number) => {
|
||||||
|
child.active = index == diff - 1;
|
||||||
|
})
|
||||||
|
|
||||||
|
this.getBtnNode(Btn_Key.SpinBtn).children.forEach((child: Node, index: number) => {
|
||||||
|
// child.active = index == diff - 1;
|
||||||
|
// child.getComponent(sp.Skeleton).setAnimation(0, '1', true);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePlayerMsg(spinData: any, isReconnect: boolean, callBack: () => void) {
|
||||||
if (spinData.AllScore == 0) {
|
if (spinData.AllScore == 0) {
|
||||||
this.setWin(spinData.AllScore);
|
this.setWin(spinData.AllScore);
|
||||||
this.setBalance(spinData.Balance);
|
this.setBalance(spinData.Balance);
|
||||||
@ -133,13 +144,14 @@ export class SlotBar extends Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateWinMsg(spinData.AllScore);
|
this.updateWinMsg(spinData.AllScore, isReconnect);
|
||||||
this.updateBalanceMsg(spinData.Balance, callBack);
|
this.updateBalanceMsg(spinData.Balance, isReconnect, callBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWinMsg(winCount: number) {
|
updateWinMsg(winCount: number, isReconnect: boolean) {
|
||||||
|
let time = isReconnect ? 0 : 1;
|
||||||
let startScore = this.curWin;
|
let startScore = this.curWin;
|
||||||
let tw = UIManager.instance.tweenScorelinear(startScore, winCount, 1);
|
let tw = UIManager.instance.tweenScorelinear(startScore, winCount, time);
|
||||||
if (tw !== null) {
|
if (tw !== null) {
|
||||||
tw.onUpdate((v) => this.setWin(v))
|
tw.onUpdate((v) => this.setWin(v))
|
||||||
.onComplete(() => this.setWin(winCount))
|
.onComplete(() => this.setWin(winCount))
|
||||||
@ -147,8 +159,9 @@ export class SlotBar extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateBalanceMsg(balance: number, callBack: () => void) {
|
updateBalanceMsg(balance: number, isReconnect: boolean, callBack: () => void) {
|
||||||
let tw = UIManager.instance.tweenScorelinear(this.getBalance(), balance, 1);
|
let time = isReconnect ? 0 : 1;
|
||||||
|
let tw = UIManager.instance.tweenScorelinear(this.getBalance(), balance, time);
|
||||||
if (tw !== null) {
|
if (tw !== null) {
|
||||||
tw.onUpdate((v) => this.setBalance(v))
|
tw.onUpdate((v) => this.setBalance(v))
|
||||||
.onComplete(() => {
|
.onComplete(() => {
|
||||||
@ -386,20 +399,25 @@ export class SlotBar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
firstClickSpinState() {
|
firstClickSpinState() {
|
||||||
let spinBtnSpine = this.getBtnNode(Btn_Key.SpinBtn).getChildByName("SPIN").getComponent(sp.Skeleton);
|
this.getBtnNode(Btn_Key.SpinBtn).children.forEach(child => {
|
||||||
|
// child.getComponent(sp.Skeleton).setAnimation(0, "2", true);
|
||||||
|
})
|
||||||
|
|
||||||
this.hasClickSpin = true;
|
this.hasClickSpin = true;
|
||||||
spinBtnSpine.setAnimation(0, "2", true);
|
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.SubBetBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.SubBetBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
||||||
|
this.setBtnEnable(this.getBtnButton(Btn_Key.ChooseDiffBtn), false);
|
||||||
|
|
||||||
this.node.getChildByName("stopBtn").active = true;
|
this.node.getChildByName("stopBtn").active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickSpin() {
|
onClickSpin(event, buyType: number = 0, changeDiff: boolean = false) {
|
||||||
if (!this.hasClickSpin && !this.hasClickManualStop) {
|
if (!this.hasClickSpin && !this.hasClickManualStop) {
|
||||||
AudioManager.instance.playSFX("Click_Spin");
|
AudioManager.instance.playSFX("Click_Spin");
|
||||||
this.node.emit(SLOT_BAR_EVENT.ON_SPIN_CLICK);
|
this.node.emit(SLOT_BAR_EVENT.ON_SPIN_CLICK, buyType, changeDiff);
|
||||||
this.firstClickSpinState();
|
this.firstClickSpinState();
|
||||||
}
|
}
|
||||||
// 第二次手动停止
|
// 第二次手动停止
|
||||||
@ -422,17 +440,18 @@ export class SlotBar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
manualStop(hasWin: boolean) {
|
manualStop(hasWin: boolean) {
|
||||||
let spineBtnSpine = this.getBtnNode(Btn_Key.SpinBtn).getChildByName("SPIN").getComponent(sp.Skeleton);
|
this.getBtnNode(Btn_Key.SpinBtn).children.forEach(child => {
|
||||||
if (hasWin) {
|
// child.getComponent(sp.Skeleton).setAnimation(0, '1', true);
|
||||||
spineBtnSpine.setAnimation(0, "1", true);
|
})
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.SpinBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.SpinBtn), false);
|
||||||
}
|
|
||||||
this.hasClickManualStop = true;
|
this.hasClickManualStop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
spinBtnSpineEliminate() {
|
spinBtnSpineEliminate() {
|
||||||
let spineBtnSpine = this.getBtnNode(Btn_Key.SpinBtn).getChildByName("SPIN").getComponent(sp.Skeleton);
|
this.getBtnNode(Btn_Key.SpinBtn).children.forEach(child => {
|
||||||
spineBtnSpine.setAnimation(0, "1", true);
|
// child.getComponent(sp.Skeleton).setAnimation(0, '1', true);
|
||||||
|
})
|
||||||
|
this.setBtnEnable(this.getBtnButton(Btn_Key.SpinBtn), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickFastSpin() {
|
onClickFastSpin() {
|
||||||
@ -458,37 +477,17 @@ export class SlotBar extends Component {
|
|||||||
|
|
||||||
onClickRules() {
|
onClickRules() {
|
||||||
AudioManager.instance.playSFX("Click_Menu");
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
let param = "rule";
|
UIManager.instance.showPopup("WebView", "history/prefabs/rules", "Game", null);
|
||||||
UIManager.instance.showPopup("WebView", "Prefab/WebView", "Game", (prefab) => {
|
|
||||||
prefab.getComponent(webView).open(param);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickPaytable() {
|
onClickPaytable() {
|
||||||
AudioManager.instance.playSFX("Click_Menu");
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
let param = "paytable";
|
UIManager.instance.showPopup("WebView", "history/prefabs/paytable", "Game", null);
|
||||||
UIManager.instance.showPopup(
|
|
||||||
"WebView",
|
|
||||||
"Prefab/WebView",
|
|
||||||
"Game",
|
|
||||||
(prefab) => {
|
|
||||||
prefab.getComponent(webView).open(param);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickHistory() {
|
onClickHistory() {
|
||||||
AudioManager.instance.playSFX("Click_Menu");
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
let param = "history";
|
UIManager.instance.showPopup("WebView", "history/prefabs/history", "Game", null);
|
||||||
UIManager.instance.showPopup(
|
|
||||||
"WebView",
|
|
||||||
"Prefab/WebView",
|
|
||||||
"Game",
|
|
||||||
(prefab) => {
|
|
||||||
prefab.getComponent(webView).open(param);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isON = true;
|
isON = true;
|
||||||
@ -573,6 +572,7 @@ export class SlotBar extends Component {
|
|||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
||||||
|
this.setBtnEnable(this.getBtnButton(Btn_Key.ChooseDiffBtn), false);
|
||||||
|
|
||||||
this.getBtnButton(Btn_Key.SpinBtn).node.active = false;
|
this.getBtnButton(Btn_Key.SpinBtn).node.active = false;
|
||||||
this.getBtnButton(Btn_Key.StopAutoSpinBtn).node.active = true;
|
this.getBtnButton(Btn_Key.StopAutoSpinBtn).node.active = true;
|
||||||
@ -622,6 +622,7 @@ export class SlotBar extends Component {
|
|||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.SubBetBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.SubBetBtn), true);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), true);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), true);
|
||||||
|
this.setBtnEnable(this.getBtnButton(Btn_Key.ChooseDiffBtn), true);
|
||||||
|
|
||||||
this.setNodeOpacityForBol(
|
this.setNodeOpacityForBol(
|
||||||
this.getBtnButton(Btn_Key.AddBetBtn).node,
|
this.getBtnButton(Btn_Key.AddBetBtn).node,
|
||||||
@ -633,8 +634,9 @@ export class SlotBar extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.SpinBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.SpinBtn), true);
|
||||||
let spinBtnSpine = this.getBtnNode(Btn_Key.SpinBtn).getChildByName("SPIN").getComponent(sp.Skeleton);
|
this.getBtnNode(Btn_Key.SpinBtn).children.forEach((child: Node, index: number) => {
|
||||||
spinBtnSpine.setAnimation(0, "1", true);
|
// child.getComponent(sp.Skeleton).setAnimation(0, '1', true);
|
||||||
|
})
|
||||||
|
|
||||||
GameDataManager.instance.canClickIconMsg = true;
|
GameDataManager.instance.canClickIconMsg = true;
|
||||||
}
|
}
|
||||||
@ -678,27 +680,10 @@ export class SlotBar extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected onDestroy(): void {
|
protected onDestroy(): void {
|
||||||
this.getBtnButton(Btn_Key.AutoSpinBtn).node.off(
|
this.getBtnButton(Btn_Key.AutoSpinBtn).node.off(Node.EventType.TOUCH_START, this.autoAin, this);
|
||||||
Node.EventType.TOUCH_START,
|
this.getBtnButton(Btn_Key.AutoSpinBtn).node.off(Node.EventType.MOUSE_ENTER, this.autoAin, this);
|
||||||
this.autoAin,
|
this.getBtnButton(Btn_Key.FastSpinBtn).node.off(Node.EventType.TOUCH_START, this.fastAni, this);
|
||||||
this
|
this.getBtnButton(Btn_Key.FastSpinBtn).node.off(Node.EventType.MOUSE_ENTER, this.fastAni, this);
|
||||||
);
|
|
||||||
this.getBtnButton(Btn_Key.AutoSpinBtn).node.off(
|
|
||||||
Node.EventType.MOUSE_ENTER,
|
|
||||||
this.autoAin,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
|
|
||||||
this.getBtnButton(Btn_Key.FastSpinBtn).node.off(
|
|
||||||
Node.EventType.TOUCH_START,
|
|
||||||
this.fastAni,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
this.getBtnButton(Btn_Key.FastSpinBtn).node.off(
|
|
||||||
Node.EventType.MOUSE_ENTER,
|
|
||||||
this.fastAni,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =----------------------------------------=
|
// =----------------------------------------=
|
||||||
@ -706,7 +691,6 @@ export class SlotBar extends Component {
|
|||||||
let betIndex = this.betGrade.indexOf(bet);
|
let betIndex = this.betGrade.indexOf(bet);
|
||||||
if (betIndex == -1) {
|
if (betIndex == -1) {
|
||||||
betIndex = 0;
|
betIndex = 0;
|
||||||
// console.error('betIndex is -1,服务器发的信息不对,没有对应的betIndex-->SlotBar');
|
|
||||||
this.setBet(bet, true);
|
this.setBet(bet, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -718,6 +702,7 @@ export class SlotBar extends Component {
|
|||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), false);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), false);
|
||||||
|
this.setBtnEnable(this.getBtnButton(Btn_Key.ChooseDiffBtn), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
setSystemGiftConfirm() {
|
setSystemGiftConfirm() {
|
||||||
@ -725,6 +710,7 @@ export class SlotBar extends Component {
|
|||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AddBetBtn), true);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.AutoSpinBtn), true);
|
||||||
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), true);
|
this.setBtnEnable(this.getBtnButton(Btn_Key.MenuBtn), true);
|
||||||
|
this.setBtnEnable(this.getBtnButton(Btn_Key.ChooseDiffBtn), false);
|
||||||
this.betIndex = 0;
|
this.betIndex = 0;
|
||||||
this.setBet(this.betGrade[this.betIndex]);
|
this.setBet(this.betGrade[this.betIndex]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,7 +181,6 @@ export class SlotGame extends Component {
|
|||||||
this.spinData = spinData;
|
this.spinData = spinData;
|
||||||
this.upLayer.hideAllLayer();
|
this.upLayer.hideAllLayer();
|
||||||
this.rollerManager.setUpLayer(this.upLayer);
|
this.rollerManager.setUpLayer(this.upLayer);
|
||||||
this.updateGameBg(spinData.Mode == 1);
|
|
||||||
this.parsedData = this.parseGameData(spinData, []);
|
this.parsedData = this.parseGameData(spinData, []);
|
||||||
this._lastRemoveData = this.parsedData.RemoveData.slice(); // 保存本轮消除位置
|
this._lastRemoveData = this.parsedData.RemoveData.slice(); // 保存本轮消除位置
|
||||||
this.rollerManager.initRollerWithIcon(this.parsedData);
|
this.rollerManager.initRollerWithIcon(this.parsedData);
|
||||||
@ -239,9 +238,43 @@ export class SlotGame extends Component {
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
// flower.setAnimation(0, animationNames[index], false);
|
// flower.setAnimation(0, animationNames[index], false);
|
||||||
|
// } else {
|
||||||
|
// let maliao = this.node.getChildByName('FreeGameBg').getChildByName('maliao');
|
||||||
|
|
||||||
|
// let leftPos = new Vec3(-580, -310, 0);
|
||||||
|
// let rightPos = new Vec3(580, -310, 0);
|
||||||
|
// Tween.stopAllByTarget(maliao);
|
||||||
|
// maliao.setPosition(leftPos);
|
||||||
|
// maliao.getComponent(sp.Skeleton).timeScale = 0.5;
|
||||||
|
// maliao.setScale(1, 1, 0);
|
||||||
|
// tween(maliao)
|
||||||
|
// .to(10, { position: rightPos })
|
||||||
|
// .set({ position: leftPos })
|
||||||
|
// .union()
|
||||||
|
// .repeatForever()
|
||||||
|
// .start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateDiffBg(withAnimation: boolean = false) {
|
||||||
|
// let diff = GameDataManager.instance.chooseDiff;
|
||||||
|
|
||||||
|
// let normalBgDiff = this.node.getChildByName('NormalGameBg1');
|
||||||
|
// normalBgDiff.getChildByName('diff').children.forEach((child, index) => {
|
||||||
|
// child.active = index == diff - 1;
|
||||||
|
// })
|
||||||
|
|
||||||
|
// if (!withAnimation) return;
|
||||||
|
|
||||||
|
// let mianbanguang = normalBgDiff.getChildByName('mianbanguang');
|
||||||
|
// mianbanguang.active = true;
|
||||||
|
// mianbanguang.getComponent(sp.Skeleton).setAnimation(0, 'animation', false);
|
||||||
|
// mianbanguang.getComponent(sp.Skeleton).setCompleteListener(() => {
|
||||||
|
// mianbanguang.active = false;
|
||||||
|
// mianbanguang.getComponent(sp.Skeleton).setCompleteListener(null);
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
startScroll(isFreeSpin: boolean) {
|
startScroll(isFreeSpin: boolean) {
|
||||||
this.upLayer.giveBackAllSpecials(this.rollerManager);
|
this.upLayer.giveBackAllSpecials(this.rollerManager);
|
||||||
if (!isFreeSpin) {
|
if (!isFreeSpin) {
|
||||||
@ -272,19 +305,9 @@ export class SlotGame extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onAllRollerStopped() {
|
onAllRollerStopped() {
|
||||||
this.upLayer.setReadHandSkeletonActive(false);
|
if (this.rollerManager._isFastSpin) {
|
||||||
|
AudioManager.instance.playSFX('Stop_Roller_Fast');
|
||||||
let delay = this.parsedData.hasSmallGame ? 2 : 0;
|
|
||||||
if (this.parsedData.hasSmallGame) {
|
|
||||||
this.upLayer.playScatterSpine(true);
|
|
||||||
AudioManager.instance.playSFX('Before_Small_Game');
|
|
||||||
}
|
}
|
||||||
this.scheduleOnce(() => {
|
|
||||||
if (this.parsedData.hasSmallGame) {
|
|
||||||
this.upLayer.playScatterSpine(false);
|
|
||||||
}
|
|
||||||
}, delay);
|
|
||||||
|
|
||||||
this.node.emit(SLOT_GAME_EVENT.ALL_ROLLER_STOP);
|
this.node.emit(SLOT_GAME_EVENT.ALL_ROLLER_STOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +352,7 @@ export class SlotGame extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 0.6)
|
}, 0.4)
|
||||||
// 提前返回,不执行原本的for循环和删除逻辑
|
// 提前返回,不执行原本的for循环和删除逻辑
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -344,7 +367,7 @@ export class SlotGame extends Component {
|
|||||||
this.upLayer.playIconWinAni(iconNode);
|
this.upLayer.playIconWinAni(iconNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 0.1 * i)
|
}, 0.05 * i)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
@ -359,7 +382,7 @@ export class SlotGame extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1.2)
|
}, 0.6)
|
||||||
|
|
||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
this.upLayer.setWinGrayNode(false);
|
this.upLayer.setWinGrayNode(false);
|
||||||
@ -390,12 +413,12 @@ export class SlotGame extends Component {
|
|||||||
this.rollerManager.iconFallDown();
|
this.rollerManager.iconFallDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrentBombSettleInfos(): { pos: number, mul: number, iconNode: Node, multiNode: Node }[] {
|
getCurrentMultiSettleInfos(): { pos: number, mul: number, iconNode: Node, multiNode: Node }[] {
|
||||||
let result: { pos: number, mul: number, iconNode: Node, multiNode: Node }[] = [];
|
let result: { pos: number, mul: number, iconNode: Node, multiNode: Node }[] = [];
|
||||||
if (!this.parsedData || !this.parsedData.BombPos || !this.parsedData.FreeMulMap) return result;
|
if (!this.parsedData || !this.parsedData.MultiPos || !this.parsedData.FreeMulMap) return result;
|
||||||
|
|
||||||
for (let i = 0; i < this.parsedData.BombPos.length; i++) {
|
for (let i = 0; i < this.parsedData.MultiPos.length; i++) {
|
||||||
let absPos = this.parsedData.BombPos[i];
|
let absPos = this.parsedData.MultiPos[i];
|
||||||
let mul = this.parsedData.FreeMulMap[absPos];
|
let mul = this.parsedData.FreeMulMap[absPos];
|
||||||
if (mul == null) continue;
|
if (mul == null) continue;
|
||||||
let iconNode = this.rollerManager.getIconNode(absPos);
|
let iconNode = this.rollerManager.getIconNode(absPos);
|
||||||
@ -414,16 +437,6 @@ export class SlotGame extends Component {
|
|||||||
|
|
||||||
onAllRollerIconsFallen() {
|
onAllRollerIconsFallen() {
|
||||||
this.upLayer.resetAndSyncAllSpecials(this.rollerManager);
|
this.upLayer.resetAndSyncAllSpecials(this.rollerManager);
|
||||||
let delay = this.parsedData.hasSmallGame ? 2 : 0;
|
|
||||||
if (this.parsedData.hasSmallGame) {
|
|
||||||
this.upLayer.playScatterSpine(true);
|
|
||||||
AudioManager.instance.playSFX('Before_Small_Game');
|
|
||||||
}
|
|
||||||
this.scheduleOnce(() => {
|
|
||||||
if (this.parsedData.hasSmallGame) {
|
|
||||||
this.upLayer.playScatterSpine(false);
|
|
||||||
}
|
|
||||||
}, delay);
|
|
||||||
this.node.emit(SLOT_GAME_EVENT.ALL_ROLLER_ICONS_FALLEN);
|
this.node.emit(SLOT_GAME_EVENT.ALL_ROLLER_ICONS_FALLEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +517,7 @@ export class SlotGame extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let scatterPos: number[] = [];
|
let scatterPos: number[] = [];
|
||||||
let bombPos: number[] = [];
|
let multiPos: number[] = [];
|
||||||
let panData: number[] = [];
|
let panData: number[] = [];
|
||||||
|
|
||||||
for (let i = 0; i < serverPanData.length; i++) {
|
for (let i = 0; i < serverPanData.length; i++) {
|
||||||
@ -515,7 +528,7 @@ export class SlotGame extends Component {
|
|||||||
for (let i = 0; i < panData.length; i++) {
|
for (let i = 0; i < panData.length; i++) {
|
||||||
let iconId = panData[i];
|
let iconId = panData[i];
|
||||||
if (iconId == 0) scatterPos.push(i);
|
if (iconId == 0) scatterPos.push(i);
|
||||||
if (iconId == 10) bombPos.push(i);
|
if (iconId == 10) multiPos.push(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
let freeIsSame = Free == null ? false : Free.LeftCount !== Free.MaxCount;
|
let freeIsSame = Free == null ? false : Free.LeftCount !== Free.MaxCount;
|
||||||
@ -526,7 +539,7 @@ export class SlotGame extends Component {
|
|||||||
RemoveData: removeData,
|
RemoveData: removeData,
|
||||||
NewIconTop: newIconTop,
|
NewIconTop: newIconTop,
|
||||||
ScatterPos: scatterPos,
|
ScatterPos: scatterPos,
|
||||||
BombPos: bombPos,
|
MultiPos: multiPos,
|
||||||
hasSmallGame: scatterPos.length >= 4,
|
hasSmallGame: scatterPos.length >= 4,
|
||||||
hasFreeSpinAgain: scatterPos.length >= 3 && freeIsSame,
|
hasFreeSpinAgain: scatterPos.length >= 3 && freeIsSame,
|
||||||
FreeMulMap: freeMulMap,
|
FreeMulMap: freeMulMap,
|
||||||
@ -539,7 +552,7 @@ export class SlotGame extends Component {
|
|||||||
|
|
||||||
// -----------------------------购买相关-----------------------------
|
// -----------------------------购买相关-----------------------------
|
||||||
onClickFeatureBuy() {
|
onClickFeatureBuy() {
|
||||||
|
AudioManager.instance.playSFX('Click_FeatureBuy_Btn');
|
||||||
this.setBtnEnableForBol(this.featureBuyNode, false);
|
this.setBtnEnableForBol(this.featureBuyNode, false);
|
||||||
this.setBtnEnableForBol(this.doubleWinBtnNode.getChildByName('pt_11'), false);
|
this.setBtnEnableForBol(this.doubleWinBtnNode.getChildByName('pt_11'), false);
|
||||||
|
|
||||||
@ -576,8 +589,6 @@ export class SlotGame extends Component {
|
|||||||
});
|
});
|
||||||
// });
|
// });
|
||||||
|
|
||||||
let flower = this.featureBuyNode.getChildByName('3_2').getComponent(sp.Skeleton);
|
|
||||||
flower.setAnimation(0, 'animation', false);
|
|
||||||
}, 0.1)
|
}, 0.1)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -622,4 +633,8 @@ export class SlotGame extends Component {
|
|||||||
this.featureBuyBtnEnabled = bol;
|
this.featureBuyBtnEnabled = bol;
|
||||||
this.refreshBuyBtnState(false);
|
this.refreshBuyBtnState(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setDoubleWinBtnEnable(bol: boolean) {
|
||||||
|
this.setBtnEnable(this.doubleWinBtnNode, bol);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -6,6 +6,7 @@ import { AudioManager } from '../../Main/Scripts/managers/AudioManager';
|
|||||||
import { Icon } from './Icon';
|
import { Icon } from './Icon';
|
||||||
import { SlotGame } from './SlotGame';
|
import { SlotGame } from './SlotGame';
|
||||||
import { SlotBar } from './SlotBar';
|
import { SlotBar } from './SlotBar';
|
||||||
|
import { NET_MODE } from 'cc/env';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('SlotMsg')
|
@ccclass('SlotMsg')
|
||||||
@ -41,6 +42,9 @@ export class SlotMsg extends Component {
|
|||||||
@property(Node)
|
@property(Node)
|
||||||
grayMsgNode: Node = null;
|
grayMsgNode: Node = null;
|
||||||
|
|
||||||
|
@property(Node)
|
||||||
|
multiNode: Node = null;
|
||||||
|
|
||||||
protected onLoad(): void {
|
protected onLoad(): void {
|
||||||
this.grayMsgNode.active = false;
|
this.grayMsgNode.active = false;
|
||||||
}
|
}
|
||||||
@ -206,10 +210,10 @@ export class SlotMsg extends Component {
|
|||||||
let multiedScore = mulDesc?.Multied; // 最终得到的分数
|
let multiedScore = mulDesc?.Multied; // 最终得到的分数
|
||||||
// let mulValue = mulDesc?.Mul; // 总倍率
|
// let mulValue = mulDesc?.Mul; // 总倍率
|
||||||
let slotGame = director.getScene()?.getComponentInChildren(SlotGame);
|
let slotGame = director.getScene()?.getComponentInChildren(SlotGame);
|
||||||
let bombInfos = slotGame?.getCurrentBombSettleInfos?.() || []; // 炸弹节点信息
|
let multiInfos = slotGame?.getCurrentMultiSettleInfos?.() || []; // 炸弹节点信息
|
||||||
|
|
||||||
if (!bombInfos.length) {
|
if (!multiInfos.length) {
|
||||||
console.error('SlotGame not find bombInfos msg');
|
console.error('SlotGame not find multiInfos msg');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,7 +237,7 @@ export class SlotMsg extends Component {
|
|||||||
let tweenToAsync = (node: Node, toPos: Vec3, duration: number) => {
|
let tweenToAsync = (node: Node, toPos: Vec3, duration: number) => {
|
||||||
return new Promise<void>((resolve) => {
|
return new Promise<void>((resolve) => {
|
||||||
tween(node)
|
tween(node)
|
||||||
.to(duration, { position: toPos }, { easing: 'quadInOut' })
|
.to(duration, { position: toPos }, { easing: 'quadIn' })
|
||||||
.call(() => resolve())
|
.call(() => resolve())
|
||||||
.start();
|
.start();
|
||||||
});
|
});
|
||||||
@ -261,7 +265,6 @@ export class SlotMsg extends Component {
|
|||||||
// 这部分run内部就是完整的队列模式,所有动画/节点操作都是await同步执行
|
// 这部分run内部就是完整的队列模式,所有动画/节点操作都是await同步执行
|
||||||
let run = async () => {
|
let run = async () => {
|
||||||
// 1. 确认总倍率节点,并首先飞入信息栏
|
// 1. 确认总倍率节点,并首先飞入信息栏
|
||||||
// let seedNode = bombInfos[0]?.multiNode;
|
|
||||||
let centerMulNode = this.node.getChildByName('totalMulti');
|
let centerMulNode = this.node.getChildByName('totalMulti');
|
||||||
this.node.addChild(centerMulNode);
|
this.node.addChild(centerMulNode);
|
||||||
// centerMulNode.setPosition(centerLocalPos);
|
// centerMulNode.setPosition(centerLocalPos);
|
||||||
@ -279,9 +282,9 @@ export class SlotMsg extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let sumMul = this.currTotaleMulti;
|
let sumMul = this.currTotaleMulti;
|
||||||
// 2. 遍历每一个待结算的bomb多倍icon,按顺序“飞入信息栏”, 逐步累加
|
// 2. 遍历每一个待结算的Multi多倍icon,按顺序“飞入信息栏”, 逐步累加
|
||||||
for (let i = 0; i < bombInfos.length; i++) {
|
for (let i = 0; i < multiInfos.length; i++) {
|
||||||
let info = bombInfos[i];
|
let info = multiInfos[i];
|
||||||
if (!info?.multiNode?.isValid) continue;
|
if (!info?.multiNode?.isValid) continue;
|
||||||
|
|
||||||
let iconComp = info.iconNode?.getComponent(Icon);
|
let iconComp = info.iconNode?.getComponent(Icon);
|
||||||
@ -333,7 +336,7 @@ export class SlotMsg extends Component {
|
|||||||
// 直接调用回调(如果业务上需要动画结束后再回调可考虑调整)
|
// 直接调用回调(如果业务上需要动画结束后再回调可考虑调整)
|
||||||
if (callBack) callBack();
|
if (callBack) callBack();
|
||||||
let slotBar = director.getScene()?.getComponentInChildren(SlotBar);
|
let slotBar = director.getScene()?.getComponentInChildren(SlotBar);
|
||||||
if (slotBar) slotBar.updateWinMsg(spinData.AllScore);
|
if (slotBar) slotBar.updateWinMsg(spinData.AllScore, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 直接触发队列执行,不等待run()结束,动画流程内部用await限定顺序,外部流程不依赖
|
// 直接触发队列执行,不等待run()结束,动画流程内部用await限定顺序,外部流程不依赖
|
||||||
|
|||||||
@ -45,6 +45,7 @@ export class SlotScene extends Component {
|
|||||||
isAutoSpin: boolean = false;
|
isAutoSpin: boolean = false;
|
||||||
isReceiveMsg: boolean = false;
|
isReceiveMsg: boolean = false;
|
||||||
isOneRoundEnd: boolean = false;
|
isOneRoundEnd: boolean = false;
|
||||||
|
isPreviewSpin: boolean = false;
|
||||||
|
|
||||||
hasEliminate: boolean = false;
|
hasEliminate: boolean = false;
|
||||||
isErr = false;
|
isErr = false;
|
||||||
@ -111,10 +112,9 @@ export class SlotScene extends Component {
|
|||||||
}
|
}
|
||||||
GameDataManager.instance.canClickIconMsg = false;
|
GameDataManager.instance.canClickIconMsg = false;
|
||||||
this.slotBar.setGameInfo(this.gameInfo);
|
this.slotBar.setGameInfo(this.gameInfo);
|
||||||
|
this.slotGame.updateDiffBg();
|
||||||
this.slotMsg.showLabelMsgForTween();
|
this.slotMsg.showLabelMsgForTween();
|
||||||
this.node.getChildByName('Choose').children.forEach((child: Node, index: number) => {
|
|
||||||
child.active = index == GameDataManager.instance.chooseDiff - 1;
|
|
||||||
})
|
|
||||||
this.updateGameState();
|
this.updateGameState();
|
||||||
this.isFreeSpin = this.spinData.Free != null && this.spinData && this.spinData.Free && this.spinData.Free.LeftCount > 0;
|
this.isFreeSpin = this.spinData.Free != null && this.spinData && this.spinData.Free && this.spinData.Free.LeftCount > 0;
|
||||||
if (this.isFreeSpin) {
|
if (this.isFreeSpin) {
|
||||||
@ -124,7 +124,7 @@ export class SlotScene extends Component {
|
|||||||
if (!this.gameInfo.CloseBuyGame) {
|
if (!this.gameInfo.CloseBuyGame) {
|
||||||
this.slotGame.setFeatureBuyActive(!(this.slotBar.getBet() * this.gameInfo.BuyMul > this.gameInfo.MaxBuyBet));
|
this.slotGame.setFeatureBuyActive(!(this.slotBar.getBet() * this.gameInfo.BuyMul > this.gameInfo.MaxBuyBet));
|
||||||
}
|
}
|
||||||
this.updateBg(this.isFreeSpin);
|
this.updateBg(this.isFreeSpin, true);
|
||||||
|
|
||||||
let frb = GameDataManager.instance.frb;
|
let frb = GameDataManager.instance.frb;
|
||||||
if (frb && frb.Ongoing?.Popup) {
|
if (frb && frb.Ongoing?.Popup) {
|
||||||
@ -140,8 +140,14 @@ export class SlotScene extends Component {
|
|||||||
this.isFreeSpin ? AudioManager.instance.playBGM("Free_Bg_Bgm") : AudioManager.instance.playBGM("Normal_Bg_Bgm");
|
this.isFreeSpin ? AudioManager.instance.playBGM("Free_Bg_Bgm") : AudioManager.instance.playBGM("Normal_Bg_Bgm");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateBg(isFreeSpin: boolean) {
|
updateBg(isFreeSpin: boolean, isReconnect: boolean) {
|
||||||
this.slotGame.updateGameBg(isFreeSpin);
|
if (isReconnect) {
|
||||||
|
if (this.isFirstFreeSpin) return;
|
||||||
|
this.slotGame.updateGameBg(isFreeSpin);
|
||||||
|
} else {
|
||||||
|
this.slotGame.updateGameBg(isFreeSpin);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleReconnect() {
|
async handleReconnect() {
|
||||||
@ -149,7 +155,7 @@ export class SlotScene extends Component {
|
|||||||
this.slotBar.manualStop(this.hasEliminate);
|
this.slotBar.manualStop(this.hasEliminate);
|
||||||
this.slotGame.playIconWinAni(this.spinData);
|
this.slotGame.playIconWinAni(this.spinData);
|
||||||
this.slotMsg.showRoundWinMsg(this.spinData.WinInfo.Score);
|
this.slotMsg.showRoundWinMsg(this.spinData.WinInfo.Score);
|
||||||
this.slotBar.updateWinMsg(this.spinData.AllScore);
|
this.slotBar.updateWinMsg(this.spinData.AllScore, true);
|
||||||
if (this.isDebug) {
|
if (this.isDebug) {
|
||||||
this.nextSpinInfo = GAME_DATA;
|
this.nextSpinInfo = GAME_DATA;
|
||||||
} else {
|
} else {
|
||||||
@ -168,7 +174,7 @@ export class SlotScene extends Component {
|
|||||||
this.slotBar.setDisplayBet(displayBet);
|
this.slotBar.setDisplayBet(displayBet);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickSpin(buyType: number = 0) {
|
async onClickSpin(buyType: number = 0, changeDiff: boolean = false) {
|
||||||
GameDataManager.instance.canClickIconMsg = false;
|
GameDataManager.instance.canClickIconMsg = false;
|
||||||
this.nextSpinInfo = null;
|
this.nextSpinInfo = null;
|
||||||
this.nextSpinInfoPromise = null;
|
this.nextSpinInfoPromise = null;
|
||||||
@ -184,8 +190,16 @@ export class SlotScene extends Component {
|
|||||||
{ Bet: this.slotBar.getBet(), IsDouble: this.isDoubleWin, }
|
{ Bet: this.slotBar.getBet(), IsDouble: this.isDoubleWin, }
|
||||||
: { Bet: this.slotBar.getBet(), IsBuy: true, BuyType: buyType, IsDouble: this.isDoubleWin, };
|
: { Bet: this.slotBar.getBet(), IsBuy: true, BuyType: buyType, IsDouble: this.isDoubleWin, };
|
||||||
try {
|
try {
|
||||||
this.spinInfo = !this.isDebug ? await this.spinWithRetryMsg(msg) : GAME_DATA;
|
if (changeDiff) {
|
||||||
this.subBalacne();
|
let gameinfo = await callGameApi("gameinfo", {});
|
||||||
|
GameDataManager.instance.gameInfo = gameinfo;
|
||||||
|
this.spinInfo = gameinfo;
|
||||||
|
} else {
|
||||||
|
this.spinInfo = !this.isDebug ? await this.spinWithRetryMsg(msg) : GAME_DATA;
|
||||||
|
this.subBalacne(buyType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.handleSpinResult();
|
this.handleSpinResult();
|
||||||
this.slotGame.stopScroll(this.spinData);
|
this.slotGame.stopScroll(this.spinData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -242,9 +256,11 @@ export class SlotScene extends Component {
|
|||||||
|
|
||||||
onOpenMenu() {
|
onOpenMenu() {
|
||||||
// this.slotGame.hideFeatureBuy();
|
// this.slotGame.hideFeatureBuy();
|
||||||
|
this.slotGame.setDoubleWinBtnEnable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
onCloseMenu() {
|
onCloseMenu() {
|
||||||
|
this.slotGame.setDoubleWinBtnEnable(true);
|
||||||
if (this.gameInfo.CloseBuyGame) return;
|
if (this.gameInfo.CloseBuyGame) return;
|
||||||
// this.slotGame.showFeatureBuy(false);
|
// this.slotGame.showFeatureBuy(false);
|
||||||
}
|
}
|
||||||
@ -290,7 +306,7 @@ export class SlotScene extends Component {
|
|||||||
this.slotBar.setLeftAutoCount(this.autoSpinConfig.count);
|
this.slotBar.setLeftAutoCount(this.autoSpinConfig.count);
|
||||||
this.slotBar.hasClickSpin = false;
|
this.slotBar.hasClickSpin = false;
|
||||||
this.slotBar.hasClickManualStop = false;
|
this.slotBar.hasClickManualStop = false;
|
||||||
this.slotBar.onClickSpin();
|
this.onClickSpin(0, false);
|
||||||
if (this.autoSpinConfig.count === 0) {
|
if (this.autoSpinConfig.count === 0) {
|
||||||
this.slotBar.closeAutoSpin();
|
this.slotBar.closeAutoSpin();
|
||||||
}
|
}
|
||||||
@ -343,10 +359,24 @@ export class SlotScene extends Component {
|
|||||||
onFeatureBuy(buyType: number) {
|
onFeatureBuy(buyType: number) {
|
||||||
this.isFeatureBuySpin = true;
|
this.isFeatureBuySpin = true;
|
||||||
this.slotBar.featureBuySpin();
|
this.slotBar.featureBuySpin();
|
||||||
this.onClickSpin(buyType);
|
this.onClickSpin(buyType, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
async allRollerStop() {
|
async allRollerStop() {
|
||||||
|
if (this.isPreviewSpin) {
|
||||||
|
this.isPreviewSpin = false;
|
||||||
|
|
||||||
|
// 停止按钮状态
|
||||||
|
this.slotBar.manualStop(false);
|
||||||
|
|
||||||
|
// 清理表现
|
||||||
|
this.slotMsg.hideWinSpine();
|
||||||
|
this.slotBar.setWin(0);
|
||||||
|
this.slotBar.updateWinMsg(0, true);
|
||||||
|
|
||||||
|
this.handlePreviewUIEnd();
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.updateGameState();
|
this.updateGameState();
|
||||||
|
|
||||||
this.slotBar.manualStop(this.hasEliminate);
|
this.slotBar.manualStop(this.hasEliminate);
|
||||||
@ -355,7 +385,7 @@ export class SlotScene extends Component {
|
|||||||
if (this.hasEliminate) {
|
if (this.hasEliminate) {
|
||||||
this.slotGame.playIconWinAni(this.spinData);
|
this.slotGame.playIconWinAni(this.spinData);
|
||||||
this.slotMsg.showRoundWinMsg(this.spinData.WinInfo.Score);
|
this.slotMsg.showRoundWinMsg(this.spinData.WinInfo.Score);
|
||||||
this.slotBar.updateWinMsg(this.spinData.AllScore);
|
this.slotBar.updateWinMsg(this.spinData.AllScore, false);
|
||||||
if (this.isDebug) {
|
if (this.isDebug) {
|
||||||
this.nextSpinInfo = GAME_DATA;
|
this.nextSpinInfo = GAME_DATA;
|
||||||
} else {
|
} else {
|
||||||
@ -410,7 +440,7 @@ export class SlotScene extends Component {
|
|||||||
if (this.hasEliminate) {
|
if (this.hasEliminate) {
|
||||||
this.slotGame.playIconWinAni(this.spinData);
|
this.slotGame.playIconWinAni(this.spinData);
|
||||||
this.slotMsg.showRoundWinMsg(this.spinData.WinInfo.Score);
|
this.slotMsg.showRoundWinMsg(this.spinData.WinInfo.Score);
|
||||||
this.slotBar.updateWinMsg(this.spinData.AllScore);
|
this.slotBar.updateWinMsg(this.spinData.AllScore, false);
|
||||||
if (this.isDebug) {
|
if (this.isDebug) {
|
||||||
this.nextSpinInfo = GAME_DATA;
|
this.nextSpinInfo = GAME_DATA;
|
||||||
} else {
|
} else {
|
||||||
@ -450,11 +480,11 @@ export class SlotScene extends Component {
|
|||||||
if (this.isFreeSpin) {
|
if (this.isFreeSpin) {
|
||||||
if (this.isFirstFreeSpin) {
|
if (this.isFirstFreeSpin) {
|
||||||
// 进入免费前,先给 2 秒展示 scatter 动画并更新信息栏
|
// 进入免费前,先给 2 秒展示 scatter 动画并更新信息栏
|
||||||
this.slotBar.updatePlayerMsg(this.spinData, null);
|
this.slotBar.updatePlayerMsg(this.spinData, false, null);
|
||||||
this.slotGame.upLayer.playScatterWaitSpine(true);
|
this.slotGame.upLayer.playScatterWaitSpine(true);
|
||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
this.slotGame.upLayer.playScatterSpine(false);
|
this.slotGame.upLayer.playScatterWaitSpine(false);
|
||||||
this.scheduleOnce(() => { this.updateBg(true); this.slotBar.updateIsFreeSpin(true); this.slotBar.setLeftCount(this.spinData.Free.MaxCount); }, 1)
|
this.scheduleOnce(() => { this.updateBg(true, false); this.slotBar.updateIsFreeSpin(true); this.slotBar.setLeftCount(this.spinData.Free.MaxCount); }, 1)
|
||||||
NodePoolManager.instance.getNodeFromPoolDynamic("FreeSpinEnter", "Prefab/FreeSpinEnter", "Game").then((prefab: Node) => {
|
NodePoolManager.instance.getNodeFromPoolDynamic("FreeSpinEnter", "Prefab/FreeSpinEnter", "Game").then((prefab: Node) => {
|
||||||
this.node.addChild(prefab);
|
this.node.addChild(prefab);
|
||||||
let freeCount = this.spinData.Free.MaxCount;
|
let freeCount = this.spinData.Free.MaxCount;
|
||||||
@ -474,7 +504,7 @@ export class SlotScene extends Component {
|
|||||||
this.handleFreeSpinAgain(() => {
|
this.handleFreeSpinAgain(() => {
|
||||||
this.slotBar.setLeftCount(this.spinData.Free.LeftCount);
|
this.slotBar.setLeftCount(this.spinData.Free.LeftCount);
|
||||||
if (this.isErr) {
|
if (this.isErr) {
|
||||||
this.updateBg(false);
|
this.updateBg(false, false);
|
||||||
if (
|
if (
|
||||||
!this.isAutoSpin &&
|
!this.isAutoSpin &&
|
||||||
GameDataManager.instance.frb.Finished == null &&
|
GameDataManager.instance.frb.Finished == null &&
|
||||||
@ -494,10 +524,11 @@ export class SlotScene extends Component {
|
|||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
this.slotMsg.showTotalWinAnimaiton(startScore, this.spinData.AllScore, () => {
|
this.slotMsg.showTotalWinAnimaiton(startScore, this.spinData.AllScore, () => {
|
||||||
NodePoolManager.instance.getNodeFromPoolDynamic("TotalWinSpine", "Prefab/TotalWinSpine", "Game").then((prefab: Node) => {
|
NodePoolManager.instance.getNodeFromPoolDynamic("TotalWinSpine", "Prefab/TotalWinSpine", "Game").then((prefab: Node) => {
|
||||||
AudioManager.instance.playBGM("Total_Win_Bgm");
|
|
||||||
this.node.addChild(prefab);
|
this.node.addChild(prefab);
|
||||||
prefab.getComponent(TotalWinSpine).showTotalWinSpine(this.spinData.AllScore, () => {
|
prefab.getComponent(TotalWinSpine).showTotalWinSpine(this.spinData.AllScore, () => {
|
||||||
this.updateBg(false);
|
this.slotBar.updatePlayerMsg(this.spinData, false, null);
|
||||||
|
this.updateBg(false, false);
|
||||||
if (!this.isAutoSpin && GameDataManager.instance.frb.Finished == null && GameDataManager.instance.frb.Ongoing == null) {
|
if (!this.isAutoSpin && GameDataManager.instance.frb.Finished == null && GameDataManager.instance.frb.Ongoing == null) {
|
||||||
this.slotGame.setFeatureBuyBtnEnable(true);
|
this.slotGame.setFeatureBuyBtnEnable(true);
|
||||||
}
|
}
|
||||||
@ -523,8 +554,8 @@ export class SlotScene extends Component {
|
|||||||
if (this.spinData.Free.LeftCount == 0 && this.spinData.RoundInfo.Current == this.spinData.RoundInfo.Total) {
|
if (this.spinData.Free.LeftCount == 0 && this.spinData.RoundInfo.Current == this.spinData.RoundInfo.Total) {
|
||||||
this.isFreeSpin = false;
|
this.isFreeSpin = false;
|
||||||
this.slotMsg.showTotalWinMsg(this.spinData.AllScore);
|
this.slotMsg.showTotalWinMsg(this.spinData.AllScore);
|
||||||
this.slotBar.updatePlayerMsg(this.spinData, () => {
|
this.slotBar.updatePlayerMsg(this.spinData, isReconnect, () => {
|
||||||
this.updateBg(false);
|
this.updateBg(false, false);
|
||||||
this.slotBar.updateIsFreeSpin(false);
|
this.slotBar.updateIsFreeSpin(false);
|
||||||
this.slotBar.resetAllBtn();
|
this.slotBar.resetAllBtn();
|
||||||
if (
|
if (
|
||||||
@ -538,7 +569,7 @@ export class SlotScene extends Component {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.slotBar.updateWinMsg(this.spinData.AllScore);
|
this.slotBar.updateWinMsg(this.spinData.AllScore, isReconnect);
|
||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
this.handleNextFreeSpin(this.spinData.Free.LeftCount - 1);
|
this.handleNextFreeSpin(this.spinData.Free.LeftCount - 1);
|
||||||
}, 1);
|
}, 1);
|
||||||
@ -547,8 +578,8 @@ export class SlotScene extends Component {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isReconnect) {
|
if (isReconnect) {
|
||||||
this.slotBar.updatePlayerMsg(this.spinData, () => {
|
this.slotBar.updatePlayerMsg(this.spinData, isReconnect, () => {
|
||||||
this.updateBg(false);
|
this.updateBg(false, true);
|
||||||
this.slotBar.updateIsFreeSpin(false);
|
this.slotBar.updateIsFreeSpin(false);
|
||||||
this.slotBar.resetAllBtn();
|
this.slotBar.resetAllBtn();
|
||||||
if (GameDataManager.instance.frb.Finished != null || GameDataManager.instance.frb.Ongoing != null) {
|
if (GameDataManager.instance.frb.Finished != null || GameDataManager.instance.frb.Ongoing != null) {
|
||||||
@ -563,8 +594,8 @@ export class SlotScene extends Component {
|
|||||||
} else {
|
} else {
|
||||||
this.slotMsg.showTotalWinMsg(this.spinData.AllScore);
|
this.slotMsg.showTotalWinMsg(this.spinData.AllScore);
|
||||||
this.handleBigWin(() => {
|
this.handleBigWin(() => {
|
||||||
this.slotBar.updatePlayerMsg(this.spinData, () => {
|
this.slotBar.updatePlayerMsg(this.spinData, false, () => {
|
||||||
this.updateBg(false);
|
this.updateBg(false, false);
|
||||||
if (
|
if (
|
||||||
!this.isAutoSpin &&
|
!this.isAutoSpin &&
|
||||||
GameDataManager.instance.frb.Finished == null &&
|
GameDataManager.instance.frb.Finished == null &&
|
||||||
@ -588,7 +619,7 @@ export class SlotScene extends Component {
|
|||||||
|
|
||||||
if (this.spinData.WinInfo.MulDesc == null) {
|
if (this.spinData.WinInfo.MulDesc == null) {
|
||||||
this.slotMsg.showTotalWinMsg(this.spinData.RoundInfo.Score);
|
this.slotMsg.showTotalWinMsg(this.spinData.RoundInfo.Score);
|
||||||
this.slotBar.updateWinMsg(this.spinData.RoundInfo.Score);
|
this.slotBar.updateWinMsg(this.spinData.RoundInfo.Score, false);
|
||||||
callBack();
|
callBack();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -601,7 +632,7 @@ export class SlotScene extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleBigWin(callBack: () => void) {
|
handleBigWin(callBack: () => void) {
|
||||||
let score = this.isFreeSpin ? this.spinData.SpinScore : this.spinData.AllScore;
|
let score = this.isFreeSpin ? this.spinData.RoundInfo.Score : this.spinData.AllScore;
|
||||||
let winType = score ? this.checkWinType(score) : WIN_TYPE.NONE;
|
let winType = score ? this.checkWinType(score) : WIN_TYPE.NONE;
|
||||||
if (winType >= WIN_TYPE.BIG_WIN) {
|
if (winType >= WIN_TYPE.BIG_WIN) {
|
||||||
NodePoolManager.instance.getNodeFromPoolDynamic("BigWin", "Prefab/BigWin", "Game").then((prefab: Node) => {
|
NodePoolManager.instance.getNodeFromPoolDynamic("BigWin", "Prefab/BigWin", "Game").then((prefab: Node) => {
|
||||||
@ -647,7 +678,7 @@ export class SlotScene extends Component {
|
|||||||
this.isFreeSpin = true;
|
this.isFreeSpin = true;
|
||||||
this.slotBar.setLeftCount(leftCount);
|
this.slotBar.setLeftCount(leftCount);
|
||||||
|
|
||||||
this.onClickSpin();
|
this.onClickSpin(0, false);
|
||||||
this.slotBar.node.getChildByName("stopBtn").active = true;
|
this.slotBar.node.getChildByName("stopBtn").active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -679,7 +710,7 @@ export class SlotScene extends Component {
|
|||||||
|
|
||||||
this.slotBar.setBalance(this.slotBar.getBalance() - spinCost);
|
this.slotBar.setBalance(this.slotBar.getBalance() - spinCost);
|
||||||
} else {
|
} else {
|
||||||
if (buyType === 1) {
|
if (buyType == 1) {
|
||||||
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * this.gameInfo.BuyMul)
|
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * this.gameInfo.BuyMul)
|
||||||
} else {
|
} else {
|
||||||
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * 500)
|
this.slotBar.setBalance(this.slotBar.getBalance() - this.slotBar.getBet() * 500)
|
||||||
@ -690,16 +721,69 @@ export class SlotScene extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBtnChooseDiff() {
|
onBtnChooseDiff() {
|
||||||
|
AudioManager.instance.playSFX("Click_Menu");
|
||||||
NodePoolManager.instance.getNodeFromPoolDynamic("ChooseDiff", "Prefab/ChooseDiff", "Game").then((prefab: Node) => {
|
NodePoolManager.instance.getNodeFromPoolDynamic("ChooseDiff", "Prefab/ChooseDiff", "Game").then((prefab: Node) => {
|
||||||
this.node.addChild(prefab);
|
this.node.addChild(prefab);
|
||||||
prefab.getComponent(ChooseDiff).open(GameDataManager.instance.chooseDiff, () => {
|
|
||||||
this.node.getChildByName("Choose").children.forEach((child: Node, index: number) => {
|
prefab.getComponent(ChooseDiff).open(GameDataManager.instance.chooseDiff, async () => {
|
||||||
child.active = index == GameDataManager.instance.chooseDiff - 1;
|
let gameinfo = await callGameApi('gameinfo', {});
|
||||||
})
|
GameDataManager.instance.gameInfo = gameinfo;
|
||||||
});
|
|
||||||
|
this.spinInfo = gameinfo;
|
||||||
|
this.spinData = gameinfo.Data;
|
||||||
|
|
||||||
|
this.resetStateForPreview();
|
||||||
|
|
||||||
|
this.isPreviewSpin = true;
|
||||||
|
|
||||||
|
this.slotGame.startScroll(false);
|
||||||
|
|
||||||
|
this.handleSpinResult();
|
||||||
|
|
||||||
|
this.slotGame.stopScroll(this.spinData);
|
||||||
|
|
||||||
|
this.slotBar.setGameInfo(gameinfo);
|
||||||
|
this.slotGame.updateDiffBg(true);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.slotBar.updateChooseDiff();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetStateForPreview() {
|
||||||
|
this.isFreeSpin = false;
|
||||||
|
this.isFirstFreeSpin = false;
|
||||||
|
this.isFeatureBuySpin = false;
|
||||||
|
this.isDoubleWin = false;
|
||||||
|
this.isAutoSpin = false;
|
||||||
|
this.isReceiveMsg = false;
|
||||||
|
this.isOneRoundEnd = false;
|
||||||
|
this.hasEliminate = false;
|
||||||
|
this.isErr = false;
|
||||||
|
|
||||||
|
this.nextSpinInfo = null;
|
||||||
|
this.nextSpinInfoPromise = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
handlePreviewUIEnd() {
|
||||||
|
this.checkAutoSpin(false);
|
||||||
|
this.slotBar.resetAllBtn();
|
||||||
|
|
||||||
|
if (this.gameInfo.CloseBuyGame) {
|
||||||
|
this.slotGame.setFeatureBuyBtnEnable(false);
|
||||||
|
} else {
|
||||||
|
this.slotGame.setFeatureBuyBtnEnable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.isAutoSpin = false;
|
||||||
|
|
||||||
|
|
||||||
|
this.slotBar.setLeftAutoCount(0);
|
||||||
|
this.slotBar.updateIsFreeSpin(false);
|
||||||
|
}
|
||||||
|
|
||||||
showErrorTip(errcode: number, errMsg: string, callBack?) {
|
showErrorTip(errcode: number, errMsg: string, callBack?) {
|
||||||
let title = I18nManager.instance.t("AID_ERROR_TITLE");
|
let title = I18nManager.instance.t("AID_ERROR_TITLE");
|
||||||
let msg = "";
|
let msg = "";
|
||||||
|
|||||||
@ -30,7 +30,7 @@ export class TotalWinSpine extends Component {
|
|||||||
this.collectBtn.active = false;
|
this.collectBtn.active = false;
|
||||||
this.hasClickBtn = false;
|
this.hasClickBtn = false;
|
||||||
this.node.getChildByName('grayBg').once(Node.EventType.TOUCH_START, this.onClickGrayBg, this);
|
this.node.getChildByName('grayBg').once(Node.EventType.TOUCH_START, this.onClickGrayBg, this);
|
||||||
|
AudioManager.instance.playBGM("Total_Win_Bgm", false);
|
||||||
tween(this.fsTotalWinSpineNode)
|
tween(this.fsTotalWinSpineNode)
|
||||||
.set({ scale: new Vec3(1.1, 1.1, 1.1) })
|
.set({ scale: new Vec3(1.1, 1.1, 1.1) })
|
||||||
.to(5, { scale: new Vec3(1, 1, 1) })
|
.to(5, { scale: new Vec3(1, 1, 1) })
|
||||||
@ -45,13 +45,11 @@ export class TotalWinSpine extends Component {
|
|||||||
.to(0.5, { scale: new Vec3(1, 1, 1) }, { easing: 'bounceOut' })
|
.to(0.5, { scale: new Vec3(1, 1, 1) }, { easing: 'bounceOut' })
|
||||||
.start();
|
.start();
|
||||||
|
|
||||||
AudioManager.instance.playSFX('Gold_Up');
|
|
||||||
this.labelController = UIManager.instance.tweenScorelinear(0, totalWinCount, 2)
|
this.labelController = UIManager.instance.tweenScorelinear(0, totalWinCount, 2)
|
||||||
.onUpdate((v: number) => {
|
.onUpdate((v: number) => {
|
||||||
this.totalWinCount.getComponent(Label).string = gold2cash(v);
|
this.totalWinCount.getComponent(Label).string = gold2cash(v);
|
||||||
})
|
})
|
||||||
.onComplete(() => {
|
.onComplete(() => {
|
||||||
AudioManager.instance.playBGM('Total_Win_Last_Bgm');
|
|
||||||
this.collectBtn.active = true;
|
this.collectBtn.active = true;
|
||||||
this.totalWinCount.getComponent(Label).string = gold2cash(totalWinCount);
|
this.totalWinCount.getComponent(Label).string = gold2cash(totalWinCount);
|
||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
@ -62,10 +60,9 @@ export class TotalWinSpine extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClickGrayBg() {
|
onClickGrayBg() {
|
||||||
AudioManager.instance.playBGM('Total_Win_Last_Bgm');
|
AudioManager.instance.playBGM('Total_Win_Jump');
|
||||||
this.node.getChildByName('grayBg').off(Node.EventType.TOUCH_START, this.onClickGrayBg, this);
|
this.node.getChildByName('grayBg').off(Node.EventType.TOUCH_START, this.onClickGrayBg, this);
|
||||||
Tween.stopAllByTarget(this.labelController.holder);
|
Tween.stopAllByTarget(this.labelController.holder);
|
||||||
AudioManager.instance.stopSFX('Gold_Up');
|
|
||||||
this.collectBtn.active = true;
|
this.collectBtn.active = true;
|
||||||
this.totalWinCount.getComponent(Label).string = gold2cash(this.totalWinCountValue);
|
this.totalWinCount.getComponent(Label).string = gold2cash(this.totalWinCountValue);
|
||||||
}
|
}
|
||||||
@ -73,7 +70,6 @@ export class TotalWinSpine extends Component {
|
|||||||
onClickCollectBtn() {
|
onClickCollectBtn() {
|
||||||
if (this.hasClickBtn) return;
|
if (this.hasClickBtn) return;
|
||||||
this.hasClickBtn = true;
|
this.hasClickBtn = true;
|
||||||
AudioManager.instance.playSFX('Click_Small_Game_Start');
|
|
||||||
tween(this.collectBtn)
|
tween(this.collectBtn)
|
||||||
.to(0.1, { scale: new Vec3(1.1, 1.1, 1.1) })
|
.to(0.1, { scale: new Vec3(1.1, 1.1, 1.1) })
|
||||||
.to(0.1, { scale: new Vec3(1, 1, 1) })
|
.to(0.1, { scale: new Vec3(1, 1, 1) })
|
||||||
|
|||||||
@ -6,20 +6,12 @@ let { ccclass, property } = _decorator;
|
|||||||
|
|
||||||
@ccclass('UpLayer')
|
@ccclass('UpLayer')
|
||||||
export class UpLayer extends Component {
|
export class UpLayer extends Component {
|
||||||
@property(Node)
|
|
||||||
readHandLayer: Node = null;
|
|
||||||
|
|
||||||
@property(Node)
|
|
||||||
wildLayer: Node = null;
|
|
||||||
|
|
||||||
@property(Node)
|
|
||||||
readyHandGrayNode: Node = null;
|
|
||||||
|
|
||||||
@property(Node)
|
@property(Node)
|
||||||
scatterLayer: Node = null;
|
scatterLayer: Node = null;
|
||||||
|
|
||||||
@property(Node)
|
@property(Node)
|
||||||
readyHandNode: Node = null;
|
MultiLayer: Node = null;
|
||||||
|
|
||||||
@property(Node)
|
@property(Node)
|
||||||
winLayer: Node = null;
|
winLayer: Node = null;
|
||||||
@ -38,12 +30,8 @@ export class UpLayer extends Component {
|
|||||||
|
|
||||||
// 统一隐藏所有层
|
// 统一隐藏所有层
|
||||||
hideAllLayer() {
|
hideAllLayer() {
|
||||||
this.readHandLayer.active = false;
|
|
||||||
this.wildLayer.active = false;
|
|
||||||
this.readyHandGrayNode.active = false;
|
|
||||||
this.scatterLayer.active = false;
|
this.scatterLayer.active = false;
|
||||||
this.readyHandNode.active = false;
|
this.MultiLayer.active = false;
|
||||||
|
|
||||||
this.winLayer.active = false;
|
this.winLayer.active = false;
|
||||||
this.winGrayLayer.active = false;
|
this.winGrayLayer.active = false;
|
||||||
this.winSpineLayer.active = false;
|
this.winSpineLayer.active = false;
|
||||||
@ -67,12 +55,12 @@ export class UpLayer extends Component {
|
|||||||
this.winGrayLayer.active = bool;
|
this.winGrayLayer.active = bool;
|
||||||
uiOpacity.opacity = 0;
|
uiOpacity.opacity = 0;
|
||||||
tween(uiOpacity)
|
tween(uiOpacity)
|
||||||
.to(0.1, { opacity: 255 })
|
.to(0.2, { opacity: 255 }, { easing: 'quadOut' })
|
||||||
.start();
|
.start();
|
||||||
} else {
|
} else {
|
||||||
uiOpacity.opacity = 255;
|
uiOpacity.opacity = 255;
|
||||||
tween(uiOpacity)
|
tween(uiOpacity)
|
||||||
.to(0.1, { opacity: 0 })
|
.to(0.2, { opacity: 0 }, { easing: 'quadOut' })
|
||||||
.call(() => {
|
.call(() => {
|
||||||
this.winLayer.active = false;
|
this.winLayer.active = false;
|
||||||
this.winSpineLayer.active = false;
|
this.winSpineLayer.active = false;
|
||||||
@ -109,26 +97,21 @@ export class UpLayer extends Component {
|
|||||||
|
|
||||||
|
|
||||||
// ---------------------------------------readyHandNode、scatterLayer、wildLayer相关 ---------------------------------------
|
// ---------------------------------------readyHandNode、scatterLayer、wildLayer相关 ---------------------------------------
|
||||||
adopted = new Map<Node, { rollerId: number; startPos: number; height: number; type: 'wild' | 'scatter' }>();
|
adopted = new Map<Node, { rollerId: number; startPos: number; height: number; type: 'Multi' | 'scatter' }>();
|
||||||
|
|
||||||
hideReadHandLayer() {
|
|
||||||
this.readHandLayer.active = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
setSpecialLayersActive() {
|
setSpecialLayersActive() {
|
||||||
let hasWild = Array.from(this.adopted.values()).some(v => v.type === 'wild');
|
let hasMulti = Array.from(this.adopted.values()).some(v => v.type === 'Multi');
|
||||||
let hasScatter = Array.from(this.adopted.values()).some(v => v.type === 'scatter');
|
let hasScatter = Array.from(this.adopted.values()).some(v => v.type === 'scatter');
|
||||||
this.readHandLayer.active = hasWild || hasScatter;
|
this.MultiLayer.active = hasMulti;
|
||||||
this.wildLayer.active = hasWild;
|
|
||||||
this.scatterLayer.active = hasScatter;
|
this.scatterLayer.active = hasScatter;
|
||||||
}
|
}
|
||||||
|
|
||||||
adoptSpecial(node: Node, rollerId: number, startPos: number, height: number, type: 'wild' | 'scatter') {
|
adoptSpecial(node: Node, rollerId: number, startPos: number, height: number, type: 'Multi' | 'scatter') {
|
||||||
if (!node || !node.isValid) return;
|
if (!node || !node.isValid) return;
|
||||||
if (this.adopted.has(node)) return;
|
if (this.adopted.has(node)) return;
|
||||||
|
|
||||||
let wp = node.worldPosition.clone();
|
let wp = node.worldPosition.clone();
|
||||||
let layer = type === 'wild' ? this.wildLayer : this.scatterLayer;
|
let layer = type === 'Multi' ? this.MultiLayer : this.scatterLayer;
|
||||||
layer.active = true;
|
layer.active = true;
|
||||||
|
|
||||||
node.parent = layer;
|
node.parent = layer;
|
||||||
@ -154,7 +137,7 @@ export class UpLayer extends Component {
|
|||||||
let msg = (roller as any).getNodeMsgFromPos(i);
|
let msg = (roller as any).getNodeMsgFromPos(i);
|
||||||
if (!msg) continue;
|
if (!msg) continue;
|
||||||
|
|
||||||
let type: 'wild' | 'scatter' = icon.index === 0 ? 'wild' : 'scatter';
|
let type: 'Multi' | 'scatter' = icon.index === 0 ? 'Multi' : 'scatter';
|
||||||
this.adoptSpecial(msg.node, roller.rollerId, msg.start, msg.height, type);
|
this.adoptSpecial(msg.node, roller.rollerId, msg.start, msg.height, type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,14 +171,6 @@ export class UpLayer extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setReadHandSkeletonActive(bol: boolean) {
|
|
||||||
this.readyHandNode.active = bol;
|
|
||||||
this.readyHandGrayNode.active = bol;
|
|
||||||
}
|
|
||||||
|
|
||||||
playScatterSpine(bol: boolean) {
|
|
||||||
this.scatterLayer.children.forEach(child => child.getComponent(Icon).playScatterIdleSpine(bol));
|
|
||||||
}
|
|
||||||
|
|
||||||
playScatterWaitSpine(bol: boolean) {
|
playScatterWaitSpine(bol: boolean) {
|
||||||
this.scatterLayer.children.forEach(child => child.getComponent(Icon).playScatterWaitSpine(bol));
|
this.scatterLayer.children.forEach(child => child.getComponent(Icon).playScatterWaitSpine(bol));
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
BIN
assets/resources/audio/Change_Free_Bgm.mp3
Normal file
BIN
assets/resources/audio/Change_Free_Bgm.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Change_Free_Bgm.mp3.meta
Normal file
14
assets/resources/audio/Change_Free_Bgm.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "d1adcd35-4537-4505-87a8-2ea2dca41247",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/resources/audio/Click_Double_Btn.mp3
Normal file
BIN
assets/resources/audio/Click_Double_Btn.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Click_Double_Btn.mp3.meta
Normal file
14
assets/resources/audio/Click_Double_Btn.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "be5da60d-5ece-42ca-9d87-fc5b179bdbde",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/resources/audio/Click_FeatureBuy_Btn.mp3
Normal file
BIN
assets/resources/audio/Click_FeatureBuy_Btn.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Click_FeatureBuy_Btn.mp3.meta
Normal file
14
assets/resources/audio/Click_FeatureBuy_Btn.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "b7700aa1-ed12-4ce0-86ca-ae5e32d88022",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/resources/audio/Gold_Jump.mp3
Normal file
BIN
assets/resources/audio/Gold_Jump.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Gold_Jump.mp3.meta
Normal file
14
assets/resources/audio/Gold_Jump.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "6662d5b9-78fd-40e7-bb9f-5b2cad94ecb3",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
BIN
assets/resources/audio/Maliao_Jump.mp3
Normal file
BIN
assets/resources/audio/Maliao_Jump.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Maliao_Jump.mp3.meta
Normal file
14
assets/resources/audio/Maliao_Jump.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "3edbbc79-d019-4575-82a2-2da4ac40c245",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/resources/audio/Start_Scroll_Fast.mp3
Normal file
BIN
assets/resources/audio/Start_Scroll_Fast.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Start_Scroll_Fast.mp3.meta
Normal file
14
assets/resources/audio/Start_Scroll_Fast.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "55c5c9c0-9833-48ff-ba5a-437a8ee0c9f4",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/resources/audio/Stop_Roller_Fast.mp3
Normal file
BIN
assets/resources/audio/Stop_Roller_Fast.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Stop_Roller_Fast.mp3.meta
Normal file
14
assets/resources/audio/Stop_Roller_Fast.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "8c47ed47-d38b-4cc6-9f4a-c47d163de199",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
BIN
assets/resources/audio/Total_Win_Jump.mp3
Normal file
BIN
assets/resources/audio/Total_Win_Jump.mp3
Normal file
Binary file not shown.
14
assets/resources/audio/Total_Win_Jump.mp3.meta
Normal file
14
assets/resources/audio/Total_Win_Jump.mp3.meta
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.0",
|
||||||
|
"importer": "audio-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "6675bdde-da0d-4863-825a-3a68c7682ca2",
|
||||||
|
"files": [
|
||||||
|
".json",
|
||||||
|
".mp3"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"downloadMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user