Merge pull request 'Close #3: feature/add-balance-template' (#16) from feature/add-balance-template into develop
Reviewed-on: dev-tech/ts-table-game-template#16 Reviewed-by: Le Hoang Nam <nam.le@noreply.localhost>
This commit is contained in:
commit
e1935cd38b
13
assets/core.meta
Normal file
13
assets/core.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "4fb16fa3-e631-4543-b196-dd6273091509",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/balance.meta
Normal file
13
assets/core/balance.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "9b399c8f-b109-413b-bddf-d990428db0b0",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/balance/prefabs.meta
Normal file
13
assets/core/balance/prefabs.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "deaecb7c-66d4-4e00-8265-9bcebb1755ba",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
1591
assets/core/balance/prefabs/balance.prefab
Normal file
1591
assets/core/balance/prefabs/balance.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
assets/core/balance/prefabs/balance.prefab.meta
Normal file
9
assets/core/balance/prefabs/balance.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "894c2c5e-5952-40a4-8db1-3836f2038903",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/balance/scripts.meta
Normal file
13
assets/core/balance/scripts.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "ea973ab2-c31f-4ec4-8efa-4e02d6eaaa9d",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/balance/scripts/component.meta
Normal file
13
assets/core/balance/scripts/component.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "e82d09af-22de-4ffa-a7e6-03fd32b65473",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
48
assets/core/balance/scripts/component/balance-component.ts
Normal file
48
assets/core/balance/scripts/component/balance-component.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import { WinPoint } from "./win-point";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export class BalanceComponent extends cc.Component
|
||||
{
|
||||
@property(WinPoint)
|
||||
private winPoint: WinPoint = null;
|
||||
@property(cc.Label)
|
||||
private labelUserName: cc.Label = null;
|
||||
@property(cc.Label)
|
||||
private labelBalanceValue: cc.Label = null;
|
||||
private balanceValue: number = -1;
|
||||
|
||||
|
||||
public updateBalance(value: number): void
|
||||
{
|
||||
if (this.validateWinMoney(value))
|
||||
{
|
||||
this.showWinPoint(value);
|
||||
} else
|
||||
{
|
||||
this.updateLabelValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
public updateUserName(value: number): void
|
||||
{
|
||||
this.labelBalanceValue.string = value.toString();
|
||||
}
|
||||
|
||||
private showWinPoint(value: number): void
|
||||
{
|
||||
this.winPoint.show(value - this.balanceValue, () => { this.updateLabelValue(value) });
|
||||
}
|
||||
|
||||
private validateWinMoney(value: number): boolean
|
||||
{
|
||||
return this.balanceValue != -1 && value > this.balanceValue
|
||||
}
|
||||
|
||||
private updateLabelValue(value: number): void
|
||||
{
|
||||
this.balanceValue = value;
|
||||
this.labelBalanceValue.string = value.toFixed(2).toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "a3fb5522-eef3-4b4e-a667-a441b572289c",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
25
assets/core/balance/scripts/component/win-point.ts
Normal file
25
assets/core/balance/scripts/component/win-point.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import gsap from "gsap";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export class WinPoint extends cc.Component
|
||||
{
|
||||
@property(cc.Label)
|
||||
private labelWinPoint: cc.Label = null;
|
||||
|
||||
protected onLoad(): void
|
||||
{
|
||||
this.node.active = false;
|
||||
}
|
||||
|
||||
public show(value: number, callback: Function): void
|
||||
{
|
||||
this.node.active = true;
|
||||
this.labelWinPoint.string = "+" + value.toFixed(2);
|
||||
gsap.delayedCall(1, () =>
|
||||
{
|
||||
this.node.active = false;
|
||||
});
|
||||
}
|
||||
}
|
10
assets/core/balance/scripts/component/win-point.ts.meta
Normal file
10
assets/core/balance/scripts/component/win-point.ts.meta
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "8a1d67c2-c378-40af-9689-15f01fd6ef8a",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/balance/scripts/system.meta
Normal file
13
assets/core/balance/scripts/system.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "60a91349-ae6f-49ba-8d8c-c5a0aa1d5c95",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
|
||||
import getDecorators from "inversify-inject-decorators";
|
||||
import { BalanceModel, container, GAME_VIEW, MODEL } from "../../../plugins/core";
|
||||
import { BalanceComponent } from "../component/balance-component";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
const { lazyInject } = getDecorators(container);
|
||||
@ccclass
|
||||
export default class UpdateBalanceValueOnDataChange extends cc.Component implements Core.View.ComponentView
|
||||
{
|
||||
@lazyInject(GAME_VIEW.Balance)
|
||||
private gameViewBalance: Core.View.GameView;
|
||||
@lazyInject(MODEL.RemainBalance)
|
||||
private balanceModel: BalanceModel;
|
||||
|
||||
@property(BalanceComponent)
|
||||
private balanceComponent: BalanceComponent = null;
|
||||
|
||||
protected onLoad(): void
|
||||
{
|
||||
this.gameViewBalance.addComponent(this);
|
||||
this.render();
|
||||
}
|
||||
|
||||
public render()
|
||||
{
|
||||
this.balanceComponent.updateBalance(this.balanceModel.totalCredit);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "794b3b20-bd72-4392-8776-058becd2ebf3",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/balance/scripts/textures.meta
Normal file
13
assets/core/balance/scripts/textures.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "38c58cf1-2373-44ff-8c45-afdbc07db7b1",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
BIN
assets/core/balance/scripts/textures/bg-balance.png
Normal file
BIN
assets/core/balance/scripts/textures/bg-balance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
38
assets/core/balance/scripts/textures/bg-balance.png.meta
Normal file
38
assets/core/balance/scripts/textures/bg-balance.png.meta
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "573de954-070d-4e16-b261-41ed51af2f8a",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 245,
|
||||
"height": 71,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"bg-balance": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "fed051b1-f0f0-4fcd-b612-255d30af003e",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "573de954-070d-4e16-b261-41ed51af2f8a",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 2,
|
||||
"trimY": 0,
|
||||
"width": 241,
|
||||
"height": 71,
|
||||
"rawWidth": 245,
|
||||
"rawHeight": 71,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/core/balance/scripts/textures/coin-balance.png
Normal file
BIN
assets/core/balance/scripts/textures/coin-balance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
38
assets/core/balance/scripts/textures/coin-balance.png.meta
Normal file
38
assets/core/balance/scripts/textures/coin-balance.png.meta
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "fc57a3c2-4c2c-48de-b1b5-402cb8a7cbe4",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 26,
|
||||
"height": 26,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"coin-balance": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "c6b4abde-4bb9-419b-bb70-d6c30ba92540",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "fc57a3c2-4c2c-48de-b1b5-402cb8a7cbe4",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 26,
|
||||
"height": 26,
|
||||
"rawWidth": 26,
|
||||
"rawHeight": 26,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/core/balance/scripts/textures/player-profile.jpg
Normal file
BIN
assets/core/balance/scripts/textures/player-profile.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
38
assets/core/balance/scripts/textures/player-profile.jpg.meta
Normal file
38
assets/core/balance/scripts/textures/player-profile.jpg.meta
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "6e61c7d9-06d0-4f06-be46-61b8d26af192",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"player-profile": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "4a5cac60-ce45-4446-bb88-0b3110f42dea",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "6e61c7d9-06d0-4f06-be46-61b8d26af192",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"rawWidth": 200,
|
||||
"rawHeight": 200,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/core/balance/scripts/textures/profile-border.png
Normal file
BIN
assets/core/balance/scripts/textures/profile-border.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
38
assets/core/balance/scripts/textures/profile-border.png.meta
Normal file
38
assets/core/balance/scripts/textures/profile-border.png.meta
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "a2932a65-a282-4349-ab35-628603779fb5",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 88,
|
||||
"height": 91,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"profile-border": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "766af824-10f1-4fc3-bd30-d647fb4a44f1",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "a2932a65-a282-4349-ab35-628603779fb5",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 88,
|
||||
"height": 91,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 91,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
13
assets/core/chip.meta
Normal file
13
assets/core/chip.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "c3c21a4a-e1a3-407d-a865-de0a631f9c0f",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/chip/config.meta
Normal file
13
assets/core/chip/config.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "dc4c782c-195a-420e-99f4-fb7552dbb61d",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
35
assets/core/chip/config/chip-color-config.ts
Normal file
35
assets/core/chip/config/chip-color-config.ts
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
export class ChipColorConfig
|
||||
{
|
||||
private static mapHexColorByValue: Map<Number, string> = new Map<Number, string>([
|
||||
[1, "#741F20"],
|
||||
[2, "#742356"],
|
||||
[3, "#1B5B15"],
|
||||
[4, "#1B5B15"],
|
||||
[5, "#9D4065"],
|
||||
[6, "#9D4065"],
|
||||
[7, "#9D4065"],
|
||||
[8, "#9D4065"],
|
||||
[9, "#9D4065"],
|
||||
[10, "#201F5E"],
|
||||
[11, "#201F5E"],
|
||||
[12, "#201F5E"],
|
||||
[13, "#201F5E"],
|
||||
[14, "#201F5E"],
|
||||
[15, "#201F5E"],
|
||||
[16, "#201F5E"],
|
||||
]);
|
||||
|
||||
public static GetColor(chipValue: Number): cc.Color
|
||||
{
|
||||
var colorHex = this.mapHexColorByValue.get(chipValue);
|
||||
if (colorHex == null)
|
||||
{
|
||||
return cc.Color.WHITE;
|
||||
} else
|
||||
{
|
||||
var color = new cc.Color().fromHEX(colorHex);;
|
||||
return color;
|
||||
}
|
||||
}
|
||||
}
|
10
assets/core/chip/config/chip-color-config.ts.meta
Normal file
10
assets/core/chip/config/chip-color-config.ts.meta
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "f3e6582e-d503-481d-bbbd-b4be508e6dc6",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/chip/prefabs.meta
Normal file
13
assets/core/chip/prefabs.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "c22fe85b-e5b1-4a52-919f-0e777095af56",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
436
assets/core/chip/prefabs/chip.prefab
Normal file
436
assets/core/chip/prefabs/chip.prefab
Normal file
@ -0,0 +1,436 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "chip",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 138,
|
||||
"height": 138
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
-60.678,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.65,
|
||||
0.65,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "below-layer",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 116,
|
||||
"g": 31,
|
||||
"b": 32,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 140,
|
||||
"height": 140
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0.636,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "bff54f22-0f2d-4eb3-a256-0a5ca31f36f5"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "43ANAqfhhCD4xTCOMvW5nT",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "above-layer",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 140,
|
||||
"height": 140
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0.636,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "03a08d17-a871-4148-88c4-49181c0f25e2"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "2dmBPBa/ZJPakJqfb7CrHt",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "label-value",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 78.12
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_string": "1",
|
||||
"_N$string": "1",
|
||||
"_fontSize": 62,
|
||||
"_lineHeight": 62,
|
||||
"_enableWrapText": true,
|
||||
"_N$file": null,
|
||||
"_isSystemFontUsed": false,
|
||||
"_spacingX": 0,
|
||||
"_batchAsBitmap": false,
|
||||
"_styleFlags": 0,
|
||||
"_underlineHeight": 0,
|
||||
"_N$horizontalAlign": 1,
|
||||
"_N$verticalAlign": 1,
|
||||
"_N$fontFamily": "Arial",
|
||||
"_N$overflow": 2,
|
||||
"_N$cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "06lDa363xGZKXU/10WRDWE",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "2b048YbtMZEWrnIdtkXQ/EK",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"labelChipValue": {
|
||||
"__id__": 9
|
||||
},
|
||||
"nodeChipColor": {
|
||||
"__id__": 2
|
||||
},
|
||||
"value": 1,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "",
|
||||
"sync": false
|
||||
}
|
||||
]
|
9
assets/core/chip/prefabs/chip.prefab.meta
Normal file
9
assets/core/chip/prefabs/chip.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "ad6757ac-55f7-43b6-99bf-09806442345d",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/chip/scripts.meta
Normal file
13
assets/core/chip/scripts.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "e4f1840d-5a30-41d5-8789-694bf3dd26d7",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
27
assets/core/chip/scripts/chip.ts
Normal file
27
assets/core/chip/scripts/chip.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { ChipColorConfig } from "../config/chip-color-config";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export class Chip extends cc.Component
|
||||
{
|
||||
|
||||
@property(cc.Label)
|
||||
private labelChipValue: cc.Label = null;
|
||||
@property(cc.Node)
|
||||
private nodeChipColor: cc.Node = null;
|
||||
@property(cc.Integer)
|
||||
private value: number = 1;
|
||||
|
||||
public setChipValue(value: number): void
|
||||
{
|
||||
this.value = value;
|
||||
this.labelChipValue.string = value.toString();
|
||||
this.nodeChipColor.color = ChipColorConfig.GetColor(value);
|
||||
}
|
||||
|
||||
public getChipValue(): number
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
10
assets/core/chip/scripts/chip.ts.meta
Normal file
10
assets/core/chip/scripts/chip.ts.meta
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "2b04861b-b4c6-445a-b9c8-76d91743f10a",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/chip/textures.meta
Normal file
13
assets/core/chip/textures.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "525d3784-086b-4a1b-bf8d-ca4eb414a231",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
BIN
assets/core/chip/textures/below-chip.png
Normal file
BIN
assets/core/chip/textures/below-chip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
38
assets/core/chip/textures/below-chip.png.meta
Normal file
38
assets/core/chip/textures/below-chip.png.meta
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "e47954fd-d224-4959-98be-76c5d94d6ca7",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 148,
|
||||
"height": 148,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"below-chip": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "bff54f22-0f2d-4eb3-a256-0a5ca31f36f5",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "e47954fd-d224-4959-98be-76c5d94d6ca7",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 148,
|
||||
"height": 148,
|
||||
"rawWidth": 148,
|
||||
"rawHeight": 148,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/core/chip/textures/top-chip.png
Normal file
BIN
assets/core/chip/textures/top-chip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
38
assets/core/chip/textures/top-chip.png.meta
Normal file
38
assets/core/chip/textures/top-chip.png.meta
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "c0c639cd-5cca-4994-a585-9b2895aefed0",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 148,
|
||||
"height": 148,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"top-chip": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "03a08d17-a871-4148-88c4-49181c0f25e2",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "c0c639cd-5cca-4994-a585-9b2895aefed0",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 148,
|
||||
"height": 148,
|
||||
"rawWidth": 148,
|
||||
"rawHeight": 148,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
13
assets/core/list-bet-option.meta
Normal file
13
assets/core/list-bet-option.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "5dfb07e0-d394-4993-857e-1c08a27738a1",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/list-bet-option/prefabs.meta
Normal file
13
assets/core/list-bet-option/prefabs.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "8490c2f5-e3a2-40a8-9b2d-793ed0c74eb1",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
4072
assets/core/list-bet-option/prefabs/list-bet-option.prefab
Normal file
4072
assets/core/list-bet-option/prefabs/list-bet-option.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "dc38c4b9-5372-4f4c-af06-57a7558043f0",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/list-bet-option/scripts.meta
Normal file
13
assets/core/list-bet-option/scripts.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "c77dad7f-9228-4531-a275-7bfab716675f",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/list-bet-option/scripts/component.meta
Normal file
13
assets/core/list-bet-option/scripts/component.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "8f0d2e7e-6e89-4ceb-9c28-dd20095e18ba",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import getDecorators from "inversify-inject-decorators";
|
||||
import { Chip } from "../../../chip/scripts/chip";
|
||||
import { container } from "../../../plugins/core";
|
||||
import { RequestChangeBetOption } from "../system/request-change-bet-option";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
const { lazyInject } = getDecorators(container);
|
||||
|
||||
@ccclass
|
||||
export default class BetOptionOnClick extends cc.Component
|
||||
{
|
||||
@property(RequestChangeBetOption)
|
||||
private requestChangeBetOption: RequestChangeBetOption = null;
|
||||
@property(Chip)
|
||||
private chip: Chip = null;
|
||||
|
||||
private onClick(): void
|
||||
{
|
||||
this.requestChangeBetOption.request(this.chip.getChipValue());
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "3e0a4e6d-2d3e-4e24-acaf-4b5a7cc894ea",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
import getDecorators from "inversify-inject-decorators";
|
||||
import { container } from "../../../plugins/core";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
const { lazyInject } = getDecorators(container);
|
||||
@ccclass
|
||||
export class ListBetOptionComponent extends cc.Component
|
||||
{
|
||||
private isShow: boolean = false;
|
||||
|
||||
@property(cc.Node)
|
||||
private nodeContainer: cc.Node = null;
|
||||
|
||||
protected onLoad(): void
|
||||
{
|
||||
this.hide();
|
||||
}
|
||||
|
||||
private show(): void
|
||||
{
|
||||
if (this.isShow == true) return;
|
||||
this.isShow = true;
|
||||
this.nodeContainer.active = true;
|
||||
}
|
||||
|
||||
private hide(): void
|
||||
{
|
||||
if (this.isShow == false) return;
|
||||
this.isShow = false;
|
||||
this.nodeContainer.active = false;
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "b97b1fa5-3f92-4ad8-b2e1-8122e3d44c98",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/list-bet-option/scripts/system.meta
Normal file
13
assets/core/list-bet-option/scripts/system.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "4a0e5978-9cec-4078-b874-08e87223482e",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
import getDecorators from "inversify-inject-decorators";
|
||||
import { BetOptionController, container, CONTROLLER } from "../../../plugins/core";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
const { lazyInject } = getDecorators(container, false);
|
||||
|
||||
|
||||
@ccclass
|
||||
export class RequestChangeBetOption extends cc.Component
|
||||
{
|
||||
@lazyInject(CONTROLLER.BetOption)
|
||||
private betOptionController: BetOptionController;
|
||||
|
||||
public request(value): void
|
||||
{
|
||||
this.betOptionController.changeBetOption(value);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "d6167141-9f81-4e6d-9b8d-02d8f644a0aa",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
import getDecorators from "inversify-inject-decorators";
|
||||
import { Chip } from "../../../chip/scripts/chip";
|
||||
import { container, GAME_VIEW, ListBetOptionModel, MODEL, SelectedBetOptionModel } from "../../../plugins/core";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
const { lazyInject } = getDecorators(container, false);
|
||||
|
||||
|
||||
@ccclass
|
||||
export class UpdateListBetOptionOnDataChange extends cc.Component implements Core.View.ComponentView
|
||||
{
|
||||
@lazyInject(GAME_VIEW.BetOption)
|
||||
private gameViewBetOption: Core.View.GameView;
|
||||
@lazyInject(MODEL.ListBetOption)
|
||||
private listBetOptionModel: ListBetOptionModel;
|
||||
@lazyInject(MODEL.SelectedBetOption)
|
||||
private selectedBetOptionModel: SelectedBetOptionModel;
|
||||
|
||||
@property(Chip)
|
||||
private selectedChip: Chip = null;
|
||||
@property(Chip)
|
||||
private listBetOptionChip: Chip[] = [];
|
||||
|
||||
|
||||
protected onLoad(): void
|
||||
{
|
||||
this.gameViewBetOption.addComponent(this);
|
||||
}
|
||||
|
||||
public render()
|
||||
{
|
||||
this.updateListBetOptionValue();
|
||||
}
|
||||
|
||||
public updateListBetOptionValue(): void
|
||||
{
|
||||
this.selectedChip.setChipValue(this.selectedBetOptionModel.selectedBetOption);
|
||||
var listChipSelect = [];
|
||||
|
||||
this.listBetOptionModel.listBetOption.forEach(betOption =>
|
||||
{
|
||||
if (betOption != this.selectedBetOptionModel.selectedBetOption)
|
||||
{
|
||||
listChipSelect.push(betOption);
|
||||
}
|
||||
});
|
||||
|
||||
var minLength = Math.min(this.listBetOptionChip.length, listChipSelect.length);
|
||||
for (let index = 0; index < minLength; index++)
|
||||
{
|
||||
var betOption = listChipSelect[index];
|
||||
this.listBetOptionChip[index].setChipValue(betOption);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "cc3d7615-0d8e-4fb0-9c94-e033503b3e5e",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/core/plugins.meta
Normal file
13
assets/core/plugins.meta
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "453b0527-6cad-43e6-83af-0eb85a63f845",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
1030
assets/core/plugins/core.d.ts
vendored
Normal file
1030
assets/core/plugins/core.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
assets/core/plugins/core.d.ts.meta
Normal file
6
assets/core/plugins/core.d.ts.meta
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"ver": "2.0.2",
|
||||
"uuid": "8735d714-0f46-4c44-b32b-e28eca191190",
|
||||
"importer": "text",
|
||||
"subMetas": {}
|
||||
}
|
410
assets/core/plugins/core.i.ts
Normal file
410
assets/core/plugins/core.i.ts
Normal file
@ -0,0 +1,410 @@
|
||||
declare namespace Core.Pattern {
|
||||
interface Command<ParamType = void> {
|
||||
execute(param: ParamType): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Pattern {
|
||||
interface UndoManager {
|
||||
push(undoable: Undoable): any;
|
||||
undo(): any;
|
||||
isUndoable(): boolean;
|
||||
reset(): any;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Pattern {
|
||||
interface Undoable {
|
||||
undo(onSuccess?: Function): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface BalanceController {
|
||||
updateBalance(credit: number, freeCredit: number): void;
|
||||
withdraw(credit: number): void;
|
||||
deposit(credit: number): void;
|
||||
releaseBetCredit(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface BetController {
|
||||
placeBet(betPositionIndex: number): void;
|
||||
clearBet(betPositionIndex: number): void;
|
||||
clearAllBet(): void;
|
||||
doubleBet(): void;
|
||||
undo(): void;
|
||||
rebet(): void;
|
||||
reset(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface BetLimitController {
|
||||
updateCurrentBetLimit(roomIndex: number): any;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface BetOptionController {
|
||||
updateListBetOption(listBetOption: number[], defaultBetOption: number): void;
|
||||
changeBetOption(betOption: number): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface CountdownController {
|
||||
startCountdown(duration: number, callbacks?: {
|
||||
onComplete?: Function;
|
||||
onTick?: Function;
|
||||
}): any;
|
||||
stop(): any;
|
||||
reset(): any;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface ErrorController {
|
||||
handleError(error: Symbol): void;
|
||||
handleServerError(errorCode: number): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface GameController {
|
||||
startNewRound(): void;
|
||||
confirmBet(): void;
|
||||
collectPoint(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface HistoryController<RoundResult> {
|
||||
updateHistory(listRoundRecord: Core.Model.RoundRecordModel<RoundResult>[]): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface LoungeBetLimitController {
|
||||
updateBetLimitSetting(listBetLimitSetting: Core.Model.BetLimitModel[]): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface LoungeBetOptionController {
|
||||
updateBetOptionSetting(listBetOptionSetting: Model.ListBetOptionModel[]): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface OddsController {
|
||||
updateListOdds(listOdds: number[]): any;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface RoomController {
|
||||
joinRoom(roomIndex: number): void;
|
||||
leaveRoom(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface RoundResultController<RoundResult> {
|
||||
updateRoundResult(roundResult: RoundResult): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface StatisticController<RoundResult> {
|
||||
addRoundResult(roundResult: RoundResult): void;
|
||||
addListRoundResult(listRoundResult: RoundResult[]): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Controller {
|
||||
interface WinController {
|
||||
updateTotalWinPoint(totalWinPoint: number): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.EventSystem {
|
||||
interface EventListener {
|
||||
register(type: any, callback: Function): EventContract;
|
||||
}
|
||||
interface EventPublisher {
|
||||
emit(type: any): void;
|
||||
}
|
||||
interface EventContract {
|
||||
on(): void;
|
||||
off(): void;
|
||||
break(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ApplicationConfigModel {
|
||||
sessionOCode: string;
|
||||
sessionHash: string;
|
||||
platform: string;
|
||||
port: number;
|
||||
address: string;
|
||||
currency: string;
|
||||
publisher: string;
|
||||
enabledSSL: boolean;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface BalanceModel {
|
||||
credit: number;
|
||||
freeCredit: number;
|
||||
get totalCredit(): number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface BetConflictModel {
|
||||
listConflictBetPosition: number[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface BetLimitModel {
|
||||
listMinBetPoint: number[];
|
||||
listMaxBetPoint: number[];
|
||||
minTotalBetPoint: number;
|
||||
maxTotalBetPoint: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface BetModel {
|
||||
listBetPoint: number[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface BetPositionModel {
|
||||
index: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface BetSettingModel {
|
||||
listBetPoint: number[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface CountdownModel {
|
||||
remainTime: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ErrorModel {
|
||||
errorType: Symbol;
|
||||
serverErrorCode: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface HistoryModel<RoundResult> {
|
||||
listRoundRecord: RoundRecordModel<RoundResult>[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface HTTPServerModel {
|
||||
url: string;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ListBetConflictModel {
|
||||
listBetConflict: BetConflictModel[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ListBetOptionModel {
|
||||
listBetOption: number[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ListOddsModel {
|
||||
listOdds: number[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ListPlayerModel {
|
||||
listPlayer: PlayerModel[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ListRoomBetLimitModel {
|
||||
listRoomBetLimit: BetLimitModel[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface ListRoomBetOptionModel {
|
||||
listRoomBetOption: ListBetOptionModel[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface PlayerModel {
|
||||
id: string;
|
||||
name: string;
|
||||
balance: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface RoomIndexModel {
|
||||
roomIndex: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface RoundRecordModel<RoundResult extends any = number[]> {
|
||||
roundId: string;
|
||||
betTime: Date;
|
||||
stake: number;
|
||||
win: number;
|
||||
profitLoss: number;
|
||||
roundResult: RoundResult;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface RoundResultModel<RoundResult> {
|
||||
roundResult: RoundResult;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface SelectedBetOptionModel {
|
||||
selectedBetOption: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface StatisticModel<RoundResult = any> {
|
||||
listRoundResult: RoundResult[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Model {
|
||||
interface WinModel {
|
||||
totalWinPoint: number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Network {
|
||||
interface Connector {
|
||||
connectToServer(): void;
|
||||
joinRoom(roomIndex: number): void;
|
||||
startNewRound(): void;
|
||||
sendConfirmBet(betArray: number[]): void;
|
||||
collectPoint(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Network {
|
||||
interface DataProcessor {
|
||||
process(data: any): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Network {
|
||||
interface NetworkController {
|
||||
connectToServer(): any;
|
||||
disconnectFromServer(): any;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Network {
|
||||
interface NetworkRequest {
|
||||
send(data?: any): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Network {
|
||||
interface NetworkResponse {
|
||||
onResponse(data?: any): any;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Parameter {
|
||||
interface BetConstantParameter {
|
||||
get DEFAULT_LIST_BET_OPTION(): number[];
|
||||
}
|
||||
}
|
||||
declare namespace Core.Parameter {
|
||||
interface GameConstantParameter {
|
||||
get BET_POSITION_COUNT(): number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Service {
|
||||
interface AvailableBetCalculator {
|
||||
getAvailableBet(betPositionIndex: number): number;
|
||||
}
|
||||
}
|
||||
declare namespace Core.Service {
|
||||
interface Validator {
|
||||
validate(): boolean;
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface BetControllerStateContext extends StateContext<BetControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface BetControllerStateMachine extends StateMachine<BetControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface BetControllerState extends Controller.BetController, State {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface BetOptionControllerStateContext extends StateContext<BetOptionControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface BetOptionControllerStateMachine extends StateMachine<BetOptionControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface BetOptionControllerState extends Controller.BetOptionController, State {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface GameControllerStateContext extends StateContext<GameControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface GameControllerStateMachine extends StateMachine<GameControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface GameControllerState extends Controller.GameController, State {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface RoomControllerStateContext extends StateContext<RoomControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface RoomControllerStateMachine extends StateMachine<RoomControllerState> {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface RoomControllerState extends Controller.RoomController, State {
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface StateContext<T extends State> {
|
||||
setState(state: T): void;
|
||||
getState(): T;
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface StateMachine<T extends State> {
|
||||
changeState(event: symbol): void;
|
||||
getState(): T;
|
||||
}
|
||||
interface StateMachineEventManager<T extends State = State> {
|
||||
registerStateMachine(stateMachine: StateMachine<T>): void;
|
||||
unregisterStateMachine(stateMachine: StateMachine<T>): void;
|
||||
emit(event: symbol): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface StateTransition<T extends State> {
|
||||
from?: new (...arg: any[]) => T;
|
||||
event: symbol;
|
||||
to: new (...arg: any[]) => T;
|
||||
}
|
||||
type ListStateTransition<T extends State> = StateTransition<T>[];
|
||||
interface ListStateTransitionAssertor<T extends State> {
|
||||
assert(listStateTransition: ListStateTransition<T>): any;
|
||||
}
|
||||
interface ListStateTransitionCreator<T extends State> {
|
||||
create(): ListStateTransition<T>;
|
||||
}
|
||||
}
|
||||
declare namespace Core.State {
|
||||
interface State {
|
||||
enter(): void;
|
||||
leave(): void;
|
||||
}
|
||||
}
|
||||
declare namespace Core.View {
|
||||
interface ComponentView {
|
||||
render(): void;
|
||||
}
|
||||
interface GameView {
|
||||
addComponent(component: ComponentView): void;
|
||||
update(): void;
|
||||
}
|
||||
}
|
10
assets/core/plugins/core.i.ts.meta
Normal file
10
assets/core/plugins/core.i.ts.meta
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "6e64a7a1-b33d-4971-b81c-12a4531f88bb",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
31
assets/core/plugins/core.js
Normal file
31
assets/core/plugins/core.js
Normal file
File diff suppressed because one or more lines are too long
10
assets/core/plugins/core.js.meta
Normal file
10
assets/core/plugins/core.js.meta
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "c7f8a66a-65a3-4281-8ef2-361ebb759f39",
|
||||
"importer": "javascript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
32935
creator.d.ts
vendored
Normal file
32935
creator.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
jsconfig.json
Normal file
15
jsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
".vscode",
|
||||
"library",
|
||||
"local",
|
||||
"settings",
|
||||
"temp"
|
||||
]
|
||||
}
|
71
package-lock.json
generated
Normal file
71
package-lock.json
generated
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "ts-table-game-template",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"gsap": "^3.12.7",
|
||||
"inversify": "^6.0.1",
|
||||
"inversify-inject-decorators": "^3.1.0",
|
||||
"reflect-metadata": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@inversifyjs/common": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@inversifyjs/common/-/common-1.4.0.tgz",
|
||||
"integrity": "sha512-qfRJ/3iOlCL/VfJq8+4o5X4oA14cZSBbpAmHsYj8EsIit1xDndoOl0xKOyglKtQD4u4gdNVxMHx4RWARk/I4QA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@inversifyjs/core": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@inversifyjs/core/-/core-1.3.5.tgz",
|
||||
"integrity": "sha512-B4MFXabhNTAmrfgB+yeD6wd/GIvmvWC6IQ8Rh/j2C3Ix69kmqwz9pr8Jt3E+Nho9aEHOQCZaGmrALgtqRd+oEQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@inversifyjs/common": "1.4.0",
|
||||
"@inversifyjs/reflect-metadata-utils": "0.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@inversifyjs/reflect-metadata-utils": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@inversifyjs/reflect-metadata-utils/-/reflect-metadata-utils-0.2.4.tgz",
|
||||
"integrity": "sha512-u95rV3lKfG+NT2Uy/5vNzoDujos8vN8O18SSA5UyhxsGYd4GLQn/eUsGXfOsfa7m34eKrDelTKRUX1m/BcNX5w==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"reflect-metadata": "0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/gsap": {
|
||||
"version": "3.13.0",
|
||||
"resolved": "https://registry.npmjs.org/gsap/-/gsap-3.13.0.tgz",
|
||||
"integrity": "sha512-QL7MJ2WMjm1PHWsoFrAQH/J8wUeqZvMtHO58qdekHpCfhvhSL4gSiz6vJf5EeMP0LOn3ZCprL2ki/gjED8ghVw==",
|
||||
"license": "Standard 'no charge' license: https://gsap.com/standard-license."
|
||||
},
|
||||
"node_modules/inversify": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/inversify/-/inversify-6.2.2.tgz",
|
||||
"integrity": "sha512-KB836KHbZ9WrUnB8ax5MtadOwnqQYa+ZJO3KWbPFgcr4RIEnHM621VaqFZzOZd9+U7ln6upt9n0wJei7x2BNqw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@inversifyjs/common": "1.4.0",
|
||||
"@inversifyjs/core": "1.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"reflect-metadata": "~0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/inversify-inject-decorators": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/inversify-inject-decorators/-/inversify-inject-decorators-3.1.0.tgz",
|
||||
"integrity": "sha512-/seBlVp5bXrLQS3DpKEmlgeZL6C7Tf/QITd+IMQrbBBGuCbxb7k3hRAWu9XSreNpFzLgSboz3sClLSEmGwHphw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/reflect-metadata": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
|
||||
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
}
|
||||
}
|
8
package.json
Normal file
8
package.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"gsap": "^3.12.7",
|
||||
"inversify": "^6.0.1",
|
||||
"inversify-inject-decorators": "^3.1.0",
|
||||
"reflect-metadata": "^0.2.2"
|
||||
}
|
||||
}
|
8
project.json
Normal file
8
project.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"engine": "cocos-creator-js",
|
||||
"packages": "packages",
|
||||
"name": "NewProject",
|
||||
"id": "00ad01ce-30d6-4b04-af5a-614039d57f32",
|
||||
"version": "2.4.10",
|
||||
"isNew": false
|
||||
}
|
1
settings/project.json
Normal file
1
settings/project.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
19
tsconfig.json
Normal file
19
tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [ "es2015", "es2017", "dom" ],
|
||||
"target": "es5",
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"outDir": "temp/vscode-dist",
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"library",
|
||||
"local",
|
||||
"temp",
|
||||
"build",
|
||||
"settings"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user