add bet table template
This commit is contained in:
parent
704eb23d9e
commit
2eba94d1d0
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ver": "1.1.3",
|
"ver": "1.1.3",
|
||||||
"uuid": "0510b8c7-c63a-4b27-ab96-279aaaa1de5c",
|
"uuid": "63f861b2-04b5-4368-b335-55d72d707493",
|
||||||
"importer": "folder",
|
"importer": "folder",
|
||||||
"isBundle": false,
|
"isBundle": false,
|
||||||
"bundleName": "",
|
"bundleName": "",
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ver": "1.1.3",
|
"ver": "1.1.3",
|
||||||
"uuid": "0c865a3f-e64f-427c-94b2-13f1bf6e6557",
|
"uuid": "aaec7af0-d5fa-48f3-957b-0f5e338f3e7f",
|
||||||
"importer": "folder",
|
"importer": "folder",
|
||||||
"isBundle": false,
|
"isBundle": false,
|
||||||
"bundleName": "",
|
"bundleName": "",
|
1165
assets/core/bet-table/prefabs/bet-table.prefab
Normal file
1165
assets/core/bet-table/prefabs/bet-table.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
assets/core/bet-table/prefabs/bet-table.prefab.meta
Normal file
9
assets/core/bet-table/prefabs/bet-table.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.3.2",
|
||||||
|
"uuid": "295e0982-6e94-480e-9c48-f81914fb071d",
|
||||||
|
"importer": "prefab",
|
||||||
|
"optimizationPolicy": "AUTO",
|
||||||
|
"asyncLoadAssets": false,
|
||||||
|
"readonly": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ver": "1.1.3",
|
"ver": "1.1.3",
|
||||||
"uuid": "452efd13-e4a0-49d9-934c-8e8abd27f6a6",
|
"uuid": "769bcb96-d316-4338-af26-c675014053c2",
|
||||||
"importer": "folder",
|
"importer": "folder",
|
||||||
"isBundle": false,
|
"isBundle": false,
|
||||||
"bundleName": "",
|
"bundleName": "",
|
13
assets/core/bet-table/scripts/system.meta
Normal file
13
assets/core/bet-table/scripts/system.meta
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.3",
|
||||||
|
"uuid": "717557b2-f4f0-42eb-8462-c36aebbd38d9",
|
||||||
|
"importer": "folder",
|
||||||
|
"isBundle": false,
|
||||||
|
"bundleName": "",
|
||||||
|
"priority": 1,
|
||||||
|
"compressionType": {},
|
||||||
|
"optimizeHotUpdate": {},
|
||||||
|
"inlineSpriteFrames": {},
|
||||||
|
"isRemoteBundle": {},
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
18
assets/core/bet-table/scripts/system/request-confirm-bet.ts
Normal file
18
assets/core/bet-table/scripts/system/request-confirm-bet.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import getDecorators from "inversify-inject-decorators";
|
||||||
|
import { container, CONTROLLER, GameController } from "../../../plugins/core";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
const { lazyInject } = getDecorators(container, false);
|
||||||
|
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export class RequestConfirmBet extends cc.Component
|
||||||
|
{
|
||||||
|
@lazyInject(CONTROLLER.Game)
|
||||||
|
private gameController: GameController;
|
||||||
|
|
||||||
|
public request(): void
|
||||||
|
{
|
||||||
|
this.gameController.confirmBet();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "cdd78638-716b-4a6c-a873-9ab3468e635c",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
18
assets/core/bet-table/scripts/system/request-place-bet.ts
Normal file
18
assets/core/bet-table/scripts/system/request-place-bet.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import getDecorators from "inversify-inject-decorators";
|
||||||
|
import { BetController, container, CONTROLLER } from "../../../plugins/core";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
const { lazyInject } = getDecorators(container, false);
|
||||||
|
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export class RequestPlaceBet extends cc.Component
|
||||||
|
{
|
||||||
|
@lazyInject(CONTROLLER.Bet)
|
||||||
|
private betController: BetController;
|
||||||
|
|
||||||
|
public request(betPositionIndex: number): void
|
||||||
|
{
|
||||||
|
this.betController.placeBet(betPositionIndex);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "cd8dd4e2-9992-4845-adb8-2d03a607b3e7",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
import getDecorators from "inversify-inject-decorators";
|
||||||
|
import { ChipHandler } from "../../../chip-handler/scripts/chip-handler";
|
||||||
|
import { BetModel, container, GAME_VIEW, MODEL } from "../../../plugins/core";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
const { lazyInject } = getDecorators(container, false);
|
||||||
|
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export class UpdateChipOnViewBetChange extends cc.Component implements Core.View.ComponentView
|
||||||
|
{
|
||||||
|
@lazyInject(GAME_VIEW.Bet)
|
||||||
|
private gameViewBet: Core.View.GameView;
|
||||||
|
@lazyInject(MODEL.Bet)
|
||||||
|
private betModel: BetModel;
|
||||||
|
|
||||||
|
@property(ChipHandler)
|
||||||
|
private listChipHandler: ChipHandler[] = [];
|
||||||
|
|
||||||
|
protected onLoad(): void
|
||||||
|
{
|
||||||
|
this.gameViewBet.addComponent(this);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
public render(): void
|
||||||
|
{
|
||||||
|
for (let index = 0; index < this.listChipHandler.length; index++)
|
||||||
|
{
|
||||||
|
this.listChipHandler[index].updateChipBetValue(this.betModel.listBetPoint[index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "a611c97d-b2db-4ee5-b5ce-4b9e8fbd3cb1",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
import getDecorators from "inversify-inject-decorators";
|
||||||
|
import { ChipHandler } from "../../../chip-handler/scripts/chip-handler";
|
||||||
|
import { container, GAME_VIEW } from "../../../plugins/core";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
const { lazyInject } = getDecorators(container, false);
|
||||||
|
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export class UpdateChipOnViewLoungeChange extends cc.Component implements Core.View.ComponentView
|
||||||
|
{
|
||||||
|
@lazyInject(GAME_VIEW.Lounge)
|
||||||
|
private gameViewLounge: Core.View.GameView;
|
||||||
|
|
||||||
|
@property(ChipHandler)
|
||||||
|
private listChipHandler: ChipHandler[] = [];
|
||||||
|
|
||||||
|
protected onLoad(): void
|
||||||
|
{
|
||||||
|
this.gameViewLounge.addComponent(this);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
public render(): void
|
||||||
|
{
|
||||||
|
this.listChipHandler.forEach((chipHandler) =>
|
||||||
|
{
|
||||||
|
chipHandler.hideAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "b18964f9-9cfe-490b-ae68-df586c9a4d0a",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
import getDecorators from "inversify-inject-decorators";
|
||||||
|
import { MoneyLabelDisplay } from "../../../bet-position/scripts/component/money-label-display";
|
||||||
|
import { BetModel, container, GAME_VIEW, MODEL } from "../../../plugins/core";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
const { lazyInject } = getDecorators(container, false);
|
||||||
|
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export class UpdateMoneyOnViewBetChange extends cc.Component implements Core.View.ComponentView
|
||||||
|
{
|
||||||
|
@lazyInject(GAME_VIEW.Bet)
|
||||||
|
private gameViewBet: Core.View.GameView;
|
||||||
|
@lazyInject(MODEL.Bet)
|
||||||
|
private betModel: BetModel;
|
||||||
|
|
||||||
|
@property(MoneyLabelDisplay)
|
||||||
|
private listMoneyLabelDisplay: MoneyLabelDisplay[] = [];
|
||||||
|
|
||||||
|
protected onLoad(): void
|
||||||
|
{
|
||||||
|
this.gameViewBet.addComponent(this);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
public render(): void
|
||||||
|
{
|
||||||
|
for (let index = 0; index < this.listMoneyLabelDisplay.length; index++)
|
||||||
|
{
|
||||||
|
this.listMoneyLabelDisplay[index].setValue(this.betModel.listBetPoint[index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "007ad167-4325-4fd2-bdca-2e9790e423b6",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
import getDecorators from "inversify-inject-decorators";
|
||||||
|
import OddsLabelDisplay from "../../../bet-position/scripts/component/odds-label-display";
|
||||||
|
import { container, GAME_VIEW, ListOddsModel, MODEL } from "../../../plugins/core";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
const { lazyInject } = getDecorators(container, false);
|
||||||
|
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export class UpdateOddsOnDataChange extends cc.Component implements Core.View.ComponentView
|
||||||
|
{
|
||||||
|
@lazyInject(GAME_VIEW.Odds)
|
||||||
|
private gameViewOdds: Core.View.GameView;
|
||||||
|
@lazyInject(MODEL.ListOdds)
|
||||||
|
private listOddsModel: ListOddsModel;
|
||||||
|
|
||||||
|
@property(OddsLabelDisplay)
|
||||||
|
private listOddsLabelDisplay: OddsLabelDisplay[] = [];
|
||||||
|
|
||||||
|
protected onLoad(): void
|
||||||
|
{
|
||||||
|
this.gameViewOdds.addComponent(this);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
public render(): void
|
||||||
|
{
|
||||||
|
for (let index = 0; index < this.listOddsLabelDisplay.length; index++)
|
||||||
|
{
|
||||||
|
this.listOddsLabelDisplay[index].setValue(this.listOddsModel[index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "be85c1a5-fac1-40bc-90b1-376367388440",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user