Browse Source

规则替换

master
cristianoxin 5 months ago
parent
commit
cfa0c62eb1
  1. 10655
      assets/10001/prefab/TeenPattieRuleGame.prefab
  2. BIN
      assets/10001/res/game/rule/Flush.png
  3. 40
      assets/10001/res/game/rule/Flush.png.meta
  4. BIN
      assets/10001/res/game/rule/High.png
  5. 40
      assets/10001/res/game/rule/High.png.meta
  6. BIN
      assets/10001/res/game/rule/OnePair.png
  7. 40
      assets/10001/res/game/rule/OnePair.png.meta
  8. BIN
      assets/10001/res/game/rule/Straight.png
  9. 40
      assets/10001/res/game/rule/Straight.png.meta
  10. BIN
      assets/10001/res/game/rule/StraightFlush.png
  11. 30
      assets/10001/res/game/rule/StraightFlush.png.meta
  12. BIN
      assets/10001/res/game/rule/ThreeOfAKind.png
  13. 40
      assets/10001/res/game/rule/ThreeOfAKind.png.meta
  14. BIN
      assets/10001/res/game/rule/bp.png
  15. 40
      assets/10001/res/game/rule/bp.png.meta
  16. BIN
      assets/10001/res/game/rule/bpxz.png
  17. 40
      assets/10001/res/game/rule/bpxz.png.meta
  18. BIN
      assets/10001/res/game/rule/czqy.png
  19. 40
      assets/10001/res/game/rule/czqy.png.meta
  20. BIN
      assets/10001/res/game/rule/js.png
  21. 40
      assets/10001/res/game/rule/js.png.meta
  22. BIN
      assets/10001/res/game/rule/kp.png
  23. 40
      assets/10001/res/game/rule/kp.png.meta
  24. BIN
      assets/10001/res/game/rule/mz.png
  25. 40
      assets/10001/res/game/rule/mz.png.meta
  26. BIN
      assets/10001/res/game/rule/tx_pic_tanchaung.png
  27. 134
      assets/10001/res/game/rule/tx_pic_tanchaung.png.meta
  28. 56
      assets/10001/src/game/component/TeenPattieRuleGamePanel.ts

10655
assets/10001/prefab/TeenPattieRuleGame.prefab

File diff suppressed because it is too large

BIN
assets/10001/res/game/rule/Flush.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

40
assets/10001/res/game/rule/Flush.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 141,
"height": 105,
"rawWidth": 141,
"rawHeight": 105,
"width": 181,
"height": 145,
"rawWidth": 181,
"rawHeight": 145,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-70.5,
-52.5,
-90.5,
-72.5,
0,
70.5,
-52.5,
90.5,
-72.5,
0,
-70.5,
52.5,
-90.5,
72.5,
0,
70.5,
52.5,
90.5,
72.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
105,
141,
105,
145,
181,
145,
0,
0,
141,
181,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-70.5,
-52.5,
-90.5,
-72.5,
0
],
"maxPos": [
70.5,
52.5,
90.5,
72.5,
0
]
},

BIN
assets/10001/res/game/rule/High.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 12 KiB

40
assets/10001/res/game/rule/High.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 143,
"height": 105,
"rawWidth": 143,
"rawHeight": 105,
"width": 181,
"height": 145,
"rawWidth": 181,
"rawHeight": 145,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-71.5,
-52.5,
-90.5,
-72.5,
0,
71.5,
-52.5,
90.5,
-72.5,
0,
-71.5,
52.5,
-90.5,
72.5,
0,
71.5,
52.5,
90.5,
72.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
105,
143,
105,
145,
181,
145,
0,
0,
143,
181,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-71.5,
-52.5,
-90.5,
-72.5,
0
],
"maxPos": [
71.5,
52.5,
90.5,
72.5,
0
]
},

BIN
assets/10001/res/game/rule/OnePair.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 13 KiB

40
assets/10001/res/game/rule/OnePair.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 144,
"height": 105,
"rawWidth": 144,
"rawHeight": 105,
"width": 181,
"height": 145,
"rawWidth": 181,
"rawHeight": 145,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-72,
-52.5,
-90.5,
-72.5,
0,
72,
-52.5,
90.5,
-72.5,
0,
-72,
52.5,
-90.5,
72.5,
0,
72,
52.5,
90.5,
72.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
105,
144,
105,
145,
181,
145,
0,
0,
144,
181,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-72,
-52.5,
-90.5,
-72.5,
0
],
"maxPos": [
72,
52.5,
90.5,
72.5,
0
]
},

BIN
assets/10001/res/game/rule/Straight.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

40
assets/10001/res/game/rule/Straight.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 142,
"height": 105,
"rawWidth": 142,
"rawHeight": 105,
"width": 181,
"height": 145,
"rawWidth": 181,
"rawHeight": 145,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-71,
-52.5,
-90.5,
-72.5,
0,
71,
-52.5,
90.5,
-72.5,
0,
-71,
52.5,
-90.5,
72.5,
0,
71,
52.5,
90.5,
72.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
105,
142,
105,
145,
181,
145,
0,
0,
142,
181,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-71,
-52.5,
-90.5,
-72.5,
0
],
"maxPos": [
71,
52.5,
90.5,
72.5,
0
]
},

BIN
assets/10001/res/game/rule/StraightFlush.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 16 KiB

30
assets/10001/res/game/rule/StraightFlush.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 145,
"height": 104,
"rawWidth": 145,
"rawHeight": 104,
"width": 181,
"height": 145,
"rawWidth": 181,
"rawHeight": 145,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-90.5,
-72.5,
-52,
0,
72.5,
-52,
0,
90.5,
-72.5,
52,
0,
-90.5,
72.5,
0,
90.5,
72.5,
52,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
104,
145,
104,
181,
145,
0,
0,
145,
181,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-90.5,
-72.5,
-52,
0
],
"maxPos": [
90.5,
72.5,
52,
0
]
},

BIN
assets/10001/res/game/rule/ThreeOfAKind.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 11 KiB

40
assets/10001/res/game/rule/ThreeOfAKind.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 141,
"height": 105,
"rawWidth": 141,
"rawHeight": 105,
"width": 181,
"height": 145,
"rawWidth": 181,
"rawHeight": 145,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-70.5,
-52.5,
-90.5,
-72.5,
0,
70.5,
-52.5,
90.5,
-72.5,
0,
-70.5,
52.5,
-90.5,
72.5,
0,
70.5,
52.5,
90.5,
72.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
105,
141,
105,
145,
181,
145,
0,
0,
141,
181,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-70.5,
-52.5,
-90.5,
-72.5,
0
],
"maxPos": [
70.5,
52.5,
90.5,
72.5,
0
]
},

BIN
assets/10001/res/game/rule/bp.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 139 KiB

40
assets/10001/res/game/rule/bp.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 439,
"height": 142,
"rawWidth": 439,
"rawHeight": 142,
"width": 572,
"height": 148,
"rawWidth": 572,
"rawHeight": 148,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-219.5,
-71,
-286,
-74,
0,
219.5,
-71,
286,
-74,
0,
-219.5,
71,
-286,
74,
0,
219.5,
71,
286,
74,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
142,
439,
142,
148,
572,
148,
0,
0,
439,
572,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-219.5,
-71,
-286,
-74,
0
],
"maxPos": [
219.5,
71,
286,
74,
0
]
},

BIN
assets/10001/res/game/rule/bpxz.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 148 KiB

40
assets/10001/res/game/rule/bpxz.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 439,
"height": 142,
"rawWidth": 439,
"rawHeight": 142,
"width": 572,
"height": 178,
"rawWidth": 572,
"rawHeight": 178,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-219.5,
-71,
-286,
-89,
0,
219.5,
-71,
286,
-89,
0,
-219.5,
71,
-286,
89,
0,
219.5,
71,
286,
89,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
142,
439,
142,
178,
572,
178,
0,
0,
439,
572,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-219.5,
-71,
-286,
-89,
0
],
"maxPos": [
219.5,
71,
286,
89,
0
]
},

BIN
assets/10001/res/game/rule/czqy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 77 KiB

40
assets/10001/res/game/rule/czqy.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 569,
"height": 52,
"rawWidth": 569,
"rawHeight": 52,
"width": 572,
"height": 86,
"rawWidth": 572,
"rawHeight": 86,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-284.5,
-26,
-286,
-43,
0,
284.5,
-26,
286,
-43,
0,
-284.5,
26,
-286,
43,
0,
284.5,
26,
286,
43,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
52,
569,
52,
86,
572,
86,
0,
0,
569,
572,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-284.5,
-26,
-286,
-43,
0
],
"maxPos": [
284.5,
26,
286,
43,
0
]
},

BIN
assets/10001/res/game/rule/js.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 176 KiB

40
assets/10001/res/game/rule/js.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 379,
"height": 142,
"rawWidth": 379,
"rawHeight": 142,
"width": 572,
"height": 178,
"rawWidth": 572,
"rawHeight": 178,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-189.5,
-71,
-286,
-89,
0,
189.5,
-71,
286,
-89,
0,
-189.5,
71,
-286,
89,
0,
189.5,
71,
286,
89,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
142,
379,
142,
178,
572,
178,
0,
0,
379,
572,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-189.5,
-71,
-286,
-89,
0
],
"maxPos": [
189.5,
71,
286,
89,
0
]
},

BIN
assets/10001/res/game/rule/kp.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 133 KiB

40
assets/10001/res/game/rule/kp.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 439,
"height": 142,
"rawWidth": 439,
"rawHeight": 142,
"width": 572,
"height": 159,
"rawWidth": 572,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-219.5,
-71,
-286,
-79.5,
0,
219.5,
-71,
286,
-79.5,
0,
-219.5,
71,
-286,
79.5,
0,
219.5,
71,
286,
79.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
142,
439,
142,
159,
572,
159,
0,
0,
439,
572,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-219.5,
-71,
-286,
-79.5,
0
],
"maxPos": [
219.5,
71,
286,
79.5,
0
]
},

BIN
assets/10001/res/game/rule/mz.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 128 KiB

40
assets/10001/res/game/rule/mz.png.meta

@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 439,
"height": 142,
"rawWidth": 439,
"rawHeight": 142,
"width": 572,
"height": 159,
"rawWidth": 572,
"rawHeight": 159,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-219.5,
-71,
-286,
-79.5,
0,
219.5,
-71,
286,
-79.5,
0,
-219.5,
71,
-286,
79.5,
0,
219.5,
71,
286,
79.5,
0
],
"indexes": [
@ -84,12 +84,12 @@
],
"uv": [
0,
142,
439,
142,
159,
572,
159,
0,
0,
439,
572,
0
],
"nuv": [
@ -103,13 +103,13 @@
1
],
"minPos": [
-219.5,
-71,
-286,
-79.5,
0
],
"maxPos": [
219.5,
71,
286,
79.5,
0
]
},

BIN
assets/10001/res/game/rule/tx_pic_tanchaung.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 KiB

134
assets/10001/res/game/rule/tx_pic_tanchaung.png.meta

@ -0,0 +1,134 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "e995c65a-85ce-4278-a03e-766b0a7256be",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "e995c65a-85ce-4278-a03e-766b0a7256be@6c48a",
"displayName": "tx_pic_tanchaung",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "e995c65a-85ce-4278-a03e-766b0a7256be",
"visible": false
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "e995c65a-85ce-4278-a03e-766b0a7256be@f9941",
"displayName": "tx_pic_tanchaung",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 868,
"height": 570,
"rawWidth": 868,
"rawHeight": 570,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-434,
-285,
0,
434,
-285,
0,
-434,
285,
0,
434,
285,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
570,
868,
570,
0,
0,
868,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-434,
-285,
0
],
"maxPos": [
434,
285,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "e995c65a-85ce-4278-a03e-766b0a7256be@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "e995c65a-85ce-4278-a03e-766b0a7256be@f9941"
}
}

56
assets/10001/src/game/component/TeenPattieRuleGamePanel.ts

@ -7,78 +7,22 @@ const { ccclass, property } = _decorator;
export class TeenPattieRuleGamePanel extends Component {
private closeBtn:Button;
private select:Node;
private info:Node;
private selectNode:Node[]=[];
protected onLoad(): void {
this.closeBtn = find("content/closeBtn",this.node)?.getComponent(Button);
this.select = find("content/select/view/content",this.node);
this.info = find("content/info",this.node);
for(let i=0;i<this.select.children.length;i++){
let a = this.select.children[i];
this.selectNode.push(a);
}
this.onClickItem({target:this.selectNode[0]});
}
start() {
this.closeBtn?.node?.on(Node.EventType.TOUCH_END,this.onClickCloseBtn,this);
for(let i=0;i<this.select.children.length;i++){
this.selectNode[i].on(Node.EventType.TOUCH_END,this.onClickItem,this);
}
}
protected onDestroy(): void {
this.closeBtn?.node?.off(Node.EventType.TOUCH_END,this.onClickCloseBtn,this);
if(this.select.isValid && this.select.children){
for(let i=0;i<this.select.children.length;i++){
this.selectNode[i]?.off(Node.EventType.TOUCH_END,this.onClickItem,this);
}
}
this.clearTw()
}
private onClickCloseBtn(){
UIManager.getInstance().hide(GamePanelConst.Game_Rule_Panel_TeenPattie);
}
private defName:string
private onClickItem(e:any){
const name_str = e.target["name"];
if(this.defName === name_str) return;
this.defName = name_str;
const ui = this.info.children;
for(let i=0;i<ui.length;i++){
const infoNode = ui[i].name;
ui[i].active = name_str == infoNode;
if(ui[i].active) this.setUIOpacity(ui[i])
}
}
private tw:Tween<UIOpacity>
private setUIOpacity(content:Node){
const uiop:UIOpacity = find("view/content",content)?.getComponent(UIOpacity)
let opacity:any={a:0}
this.tw = tween(opacity).to(0.2,{a:255},{progress(start, end, current, ratio) {
uiop.opacity = start +(end-start) *ratio;
return start +(end-start) *ratio;
},})
.call(()=>{
this.clearTw()
})
.start()
}
private clearTw(){
if(this.tw){
this.tw.stop()
this.tw = null
}
}
}

Loading…
Cancel
Save