88 lines
2.8 KiB
TypeScript
88 lines
2.8 KiB
TypeScript
export class GameDataManager {
|
|
private static _instance: GameDataManager = null;
|
|
static get instance(): GameDataManager {
|
|
if (!this._instance) {
|
|
this._instance = new GameDataManager();
|
|
}
|
|
return this._instance;
|
|
}
|
|
|
|
|
|
// 游戏信息
|
|
private _gameInfo: any = null;
|
|
set gameInfo(info: any) {
|
|
this._gameInfo = info;
|
|
this._frb = info.Frb;
|
|
this._curBet = info.Data.Bet;
|
|
this._featureBuyMulti = info.BuyMul || 50;
|
|
}
|
|
get gameInfo(): any { return this._gameInfo; }
|
|
|
|
|
|
private _frb: any = null;
|
|
set frb(info: any) { this._frb = info; }
|
|
get frb(): any { return this._frb; }
|
|
|
|
// 自动次数
|
|
private _autoCount: number = 0;
|
|
set autoCount(count: number) { this._autoCount = count; }
|
|
get autoCount(): number { return this._autoCount; }
|
|
|
|
private _curBet: number = 0;
|
|
set curBet(bet: number) { this._curBet = bet; }
|
|
get curBet(): number { return this._curBet; }
|
|
|
|
private _featureBuyMulti: number = 50;
|
|
set featureBuyMulti(multi: number) { this._featureBuyMulti = multi; }
|
|
get featureBuyMulti(): number { return this._featureBuyMulti; }
|
|
|
|
private _canClickIconMsg: boolean = false;
|
|
set canClickIconMsg(bol: boolean) { this._canClickIconMsg = bol; }
|
|
get canClickIconMsg(): boolean { return this._canClickIconMsg; }
|
|
|
|
private _gamePending: string = null;
|
|
set gamePending(pending: string) { this._gamePending = pending; }
|
|
get gamePending(): string { return this._gamePending; }
|
|
|
|
private _chooseDiff: number = 1;
|
|
set chooseDiff(diff: number) { this._chooseDiff = diff; }
|
|
get chooseDiff(): number { return this._chooseDiff; }
|
|
|
|
|
|
// rankList de 结构
|
|
// {
|
|
// "List": [
|
|
// {
|
|
// "Id": "20251220_day_faketrans-PHP",
|
|
// "Name": "",
|
|
// "Type": "day",
|
|
// "StartTime": 1765900800,
|
|
// "EndTime": 1766332800,
|
|
// "Status": 0,
|
|
// "Rewards": null
|
|
// },
|
|
// {
|
|
// "Id": "20251220_day_faketrans-PHP",
|
|
// "Name": "",
|
|
// "Type": "week",
|
|
// "StartTime": 1765900800,
|
|
// "EndTime": 1766332800,
|
|
// "Status": 0,
|
|
// "Rewards": null
|
|
// }
|
|
// ,
|
|
// {
|
|
// "Id": "20251220_day_faketrans-PHP",
|
|
// "Name": "",
|
|
// "Type": "month",
|
|
// "StartTime": 1765900800,
|
|
// "EndTime": 1766332800,
|
|
// "Status": 0,
|
|
// "Rewards": null
|
|
// }
|
|
// ]
|
|
// }
|
|
|
|
// {"List":[{"Id":"20251222_day_faketrans","Name":"","Type":"day","StartTime":1766332800,"EndTime":1766419200,"Status":0,"Rewards":[100000,80000,60000,50000,40000,10000,10000,10000,10000,10000]}]}
|
|
|
|
} |