[fix] Select Bet顯示
[add] import全部Slot
This commit is contained in:
parent
5c96518b6b
commit
2453ccb670
@ -1,6 +1,6 @@
|
||||
import { Ref, ref } from "vue";
|
||||
import { BJ_Casino_Bot } from "./BJ_Casino_Bot";
|
||||
import SlotBase from "./Common/Game/Base/SlotBase";
|
||||
import { SlotBase } from "./Common/Game/Base/Slot";
|
||||
import { Tools } from "./Tools";
|
||||
|
||||
export class BJ_Casino_Bot_Slot {
|
||||
@ -79,6 +79,7 @@ export class BJ_Casino_Bot_Slot {
|
||||
|
||||
public SelectBet(data: any): void {
|
||||
this.NowBetIndex = data;
|
||||
this.BetIndex.value = this.BetGroup[data].toString();
|
||||
this._bj_Casino_Bot.AddLog(`改變Bet: ${this.NowBet}`);
|
||||
}
|
||||
|
||||
@ -98,16 +99,19 @@ export class BJ_Casino_Bot_Slot {
|
||||
}
|
||||
let id: string = this._bj_Casino_Bot.LobbyScript.InputSlot.value;
|
||||
let slot: any;
|
||||
const slotGroup: typeof import("./Common/Game/Base/Slot") = await import(/* @vite-ignore */`./Common/Game/Base/Slot`);
|
||||
try {
|
||||
slot = await import(/* @vite-ignore */`./Common/Game/Slot${id}`);
|
||||
// slot = await import(/* @vite-ignore */`./Common/Game/Slot${id}`);
|
||||
slot = slotGroup[`Slot${id}`];
|
||||
} catch (error) {
|
||||
// this._bj_Casino_Bot.AddLog(`Slot${id} Spin error: ${error}`);
|
||||
}
|
||||
if (!slot) {
|
||||
slot = await import(/* @vite-ignore */`./Common/Game/Base/SlotBase`);
|
||||
slot = slotGroup.SlotBase;
|
||||
}
|
||||
const slot_default: typeof SlotBase = slot.default;
|
||||
this.Slot = new slot_default(this._bj_Casino_Bot, this);
|
||||
// const slot_default: typeof SlotBase = slot.default;
|
||||
// this.Slot = new slot_default(this._bj_Casino_Bot, this);
|
||||
this.Slot = new slot(this._bj_Casino_Bot, this);
|
||||
this.IsSpin.value = true;
|
||||
this.Spin();
|
||||
}
|
||||
|
6
src/script/Common/Game/Base/Slot.ts
Normal file
6
src/script/Common/Game/Base/Slot.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export * from "../Slot1";
|
||||
export * from "../Slot1201";
|
||||
export * from "../Slot48";
|
||||
export * from "../Slot50";
|
||||
export * from "../Slot62";
|
||||
export * from "./SlotBase";
|
@ -6,7 +6,7 @@ import { NumberEx } from "../../../Engine/Utils/Number/NumberEx";
|
||||
import { CommonSlotFgSpinRequest, CommonSlotSpinRequest } from "../Request/CommonSlotRequest";
|
||||
import { Slot_ChoiceRequest } from "../Request/SlotRequest";
|
||||
|
||||
export default class SlotBase {
|
||||
export class SlotBase {
|
||||
//#region public
|
||||
|
||||
public get ID(): number { return this._bj_Casino_Bot.LobbyScript.Slot; }
|
||||
@ -166,3 +166,5 @@ export default class SlotBase {
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
export default SlotBase;
|
@ -1,7 +1,7 @@
|
||||
import SlotBase from "./Base/SlotBase";
|
||||
|
||||
|
||||
export default class Slot1 extends SlotBase {
|
||||
export class Slot1 extends SlotBase {
|
||||
//#region public
|
||||
|
||||
public get ID(): number { return 1; }
|
||||
@ -9,3 +9,5 @@ export default class Slot1 extends SlotBase {
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
export default Slot1;
|
||||
|
@ -1,10 +1,12 @@
|
||||
import SlotBase from "./Base/SlotBase";
|
||||
|
||||
|
||||
export default class Slot1201 extends SlotBase {
|
||||
export class Slot1201 extends SlotBase {
|
||||
//#region public
|
||||
|
||||
public get FreeCount(): number { return +this.GameRunData["free"]; }
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
export default Slot1201;
|
@ -1,7 +1,7 @@
|
||||
import SlotBase from "./Base/SlotBase";
|
||||
|
||||
|
||||
export default class Slot48 extends SlotBase {
|
||||
export class Slot48 extends SlotBase {
|
||||
//#region public
|
||||
|
||||
public get ID(): number { return 48; }
|
||||
@ -11,3 +11,5 @@ export default class Slot48 extends SlotBase {
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
export default Slot48;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import SlotBase from "./Base/SlotBase";
|
||||
|
||||
|
||||
export default class Slot50 extends SlotBase {
|
||||
export class Slot50 extends SlotBase {
|
||||
//#region public
|
||||
|
||||
public get ID(): number { return 50; }
|
||||
@ -9,3 +9,5 @@ export default class Slot50 extends SlotBase {
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
export default Slot50;
|
@ -1,7 +1,7 @@
|
||||
import SlotBase from "./Base/SlotBase";
|
||||
|
||||
|
||||
export default class Slot62 extends SlotBase {
|
||||
export class Slot62 extends SlotBase {
|
||||
//#region public
|
||||
|
||||
public get ID(): number { return 62; }
|
||||
@ -33,3 +33,5 @@ export default class Slot62 extends SlotBase {
|
||||
|
||||
//#endregion
|
||||
}
|
||||
|
||||
export default Slot62;
|
Loading…
x
Reference in New Issue
Block a user