diff --git a/src/script/BJ_Casino_Bot_Slot.ts b/src/script/BJ_Casino_Bot_Slot.ts index 8354a43..7768132 100644 --- a/src/script/BJ_Casino_Bot_Slot.ts +++ b/src/script/BJ_Casino_Bot_Slot.ts @@ -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(); } diff --git a/src/script/Common/Game/Base/Slot.ts b/src/script/Common/Game/Base/Slot.ts new file mode 100644 index 0000000..175c262 --- /dev/null +++ b/src/script/Common/Game/Base/Slot.ts @@ -0,0 +1,6 @@ +export * from "../Slot1"; +export * from "../Slot1201"; +export * from "../Slot48"; +export * from "../Slot50"; +export * from "../Slot62"; +export * from "./SlotBase"; diff --git a/src/script/Common/Game/Base/SlotBase.ts b/src/script/Common/Game/Base/SlotBase.ts index b0d1dd3..d1f133b 100644 --- a/src/script/Common/Game/Base/SlotBase.ts +++ b/src/script/Common/Game/Base/SlotBase.ts @@ -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; \ No newline at end of file diff --git a/src/script/Common/Game/Slot1.ts b/src/script/Common/Game/Slot1.ts index 8b0ebc4..708909e 100644 --- a/src/script/Common/Game/Slot1.ts +++ b/src/script/Common/Game/Slot1.ts @@ -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; diff --git a/src/script/Common/Game/Slot1201.ts b/src/script/Common/Game/Slot1201.ts index d2b781b..6a7942e 100644 --- a/src/script/Common/Game/Slot1201.ts +++ b/src/script/Common/Game/Slot1201.ts @@ -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; \ No newline at end of file diff --git a/src/script/Common/Game/Slot48.ts b/src/script/Common/Game/Slot48.ts index b48d5dc..1698a90 100644 --- a/src/script/Common/Game/Slot48.ts +++ b/src/script/Common/Game/Slot48.ts @@ -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; diff --git a/src/script/Common/Game/Slot50.ts b/src/script/Common/Game/Slot50.ts index c77eee0..fc524ec 100644 --- a/src/script/Common/Game/Slot50.ts +++ b/src/script/Common/Game/Slot50.ts @@ -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; \ No newline at end of file diff --git a/src/script/Common/Game/Slot62.ts b/src/script/Common/Game/Slot62.ts index ca674e1..aebbb5c 100644 --- a/src/script/Common/Game/Slot62.ts +++ b/src/script/Common/Game/Slot62.ts @@ -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; \ No newline at end of file