Browse Source

弃牌标识位置

master
cristianoxin 5 months ago
parent
commit
86c808d784
  1. 5444
      assets/10001/prefab/TeenPattieGame.prefab
  2. BIN
      assets/10001/res/game/abl_tp_beij_01.png
  3. 134
      assets/10001/res/game/abl_tp_beij_01.png.meta
  4. BIN
      assets/10001/res/game/abl_yxn_kuangj_01.png
  5. 134
      assets/10001/res/game/abl_yxn_kuangj_01.png.meta
  6. BIN
      assets/10001/res/game/abl_yxn_tup_02.png
  7. 134
      assets/10001/res/game/abl_yxn_tup_02.png.meta
  8. BIN
      assets/10001/res/game/icon_huanzhuo.png
  9. 134
      assets/10001/res/game/icon_huanzhuo.png.meta
  10. 52
      assets/10001/src/game/logic/TeenPattieUpLayerLogic.ts
  11. 29
      assets/10001/src/game/system/TeenpattieGameProxySystem.ts

5444
assets/10001/prefab/TeenPattieGame.prefab

File diff suppressed because it is too large

BIN
assets/10001/res/game/abl_tp_beij_01.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

134
assets/10001/res/game/abl_tp_beij_01.png.meta

@ -1,134 +0,0 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "c9a6a7ce-51d5-4a02-b970-cd8a159bcf09",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "c9a6a7ce-51d5-4a02-b970-cd8a159bcf09@6c48a",
"displayName": "abl_tp_beij_01",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "c9a6a7ce-51d5-4a02-b970-cd8a159bcf09",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "c9a6a7ce-51d5-4a02-b970-cd8a159bcf09@f9941",
"displayName": "abl_tp_beij_01",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -7,
"trimX": 3,
"trimY": 16,
"width": 1216,
"height": 529,
"rawWidth": 1222,
"rawHeight": 547,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-608,
-264.5,
0,
608,
-264.5,
0,
-608,
264.5,
0,
608,
264.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
3,
531,
1219,
531,
3,
2,
1219,
2
],
"nuv": [
0.0024549918166939444,
0.003656307129798903,
0.997545008183306,
0.003656307129798903,
0.0024549918166939444,
0.9707495429616088,
0.997545008183306,
0.9707495429616088
],
"minPos": [
-608,
-264.5,
0
],
"maxPos": [
608,
264.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "c9a6a7ce-51d5-4a02-b970-cd8a159bcf09@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "c9a6a7ce-51d5-4a02-b970-cd8a159bcf09@f9941"
}
}

BIN
assets/10001/res/game/abl_yxn_kuangj_01.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

134
assets/10001/res/game/abl_yxn_kuangj_01.png.meta

@ -1,134 +0,0 @@
{
"ver": "1.0.25",
"importer": "image",
"imported": true,
"uuid": "88c15b62-1a96-4a04-988e-7221164591f3",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "88c15b62-1a96-4a04-988e-7221164591f3@6c48a",
"displayName": "abl_yxn_kuangj_01",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "88c15b62-1a96-4a04-988e-7221164591f3",
"visible": false
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "88c15b62-1a96-4a04-988e-7221164591f3@f9941",
"displayName": "abl_yxn_kuangj_01",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1334,
"height": 106,
"rawWidth": 1334,
"rawHeight": 106,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 470,
"borderRight": 411,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-667,
-53,
0,
667,
-53,
0,
-667,
53,
0,
667,
53,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
106,
1334,
106,
0,
0,
1334,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-667,
-53,
0
],
"maxPos": [
667,
53,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "88c15b62-1a96-4a04-988e-7221164591f3@6c48a",
"atlasUuid": ""
},
"ver": "1.0.11",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"redirect": "88c15b62-1a96-4a04-988e-7221164591f3@f9941"
}
}

BIN
assets/10001/res/game/abl_yxn_tup_02.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

134
assets/10001/res/game/abl_yxn_tup_02.png.meta

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

BIN
assets/10001/res/game/icon_huanzhuo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

134
assets/10001/res/game/icon_huanzhuo.png.meta

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

52
assets/10001/src/game/logic/TeenPattieUpLayerLogic.ts

@ -3,12 +3,10 @@ import { TeenPattieRollNumComponent } from '../../tool/TeenPattieRollNumComponen
import { CutDownLabelHertEffectComponent } from './effect/CutDownLabelHertEffectComponent';
import { TeenPattieCommData } from '../TeenPattieCommData';
import { TeenPattieCommTool } from '../../tool/TeenPattieCommTool';
import { TeenPattieShowEffectLogic } from './TeenPattieShowEffectLogic';
import { TeenPattieEventType } from '../../tool/TeenPattieEventType';
import { I18Manager, Message, Network, SystemParams, UILayerIndex, UIManager } from '../../sdk/API';
import { Message, Network, UILayerIndex, UIManager } from '../../sdk/API';
import { UserData } from '../../sdk/GameVO';
import { GameNetCode, GamePanelConst } from '../../GameConst10001';
import { TeenPattieGameStaticSystem } from '../system/TeenPattieGameStaticSystem';
import { Game10001Res } from '../../comm/Game10001Res';
/**顶层 */
@ -17,28 +15,21 @@ export class TeenPattieUpLayerLogic extends Component {
private bg:Node;
private gold: Label;
private refreshBtn: Button;
private matchTips: Node;
private matchTipsLabel:Label;
private goldNum: TeenPattieRollNumComponent;
private rollNum: TeenPattieRollNumComponent;
/**底注 */
private betNote: Label;
/**房间里总注池 */
private totalLabel: Label;
/**当前轮数 */
private currRound: Label;
/**牌桌 */
private betNode: Node;
/**筹码 */
private chouma: Node;
/**菜单按钮 */
private menuBtn: Button;
private menuNode: Node;
/**菜单列表 */
private menu: Node;
/**退出 */
@ -47,8 +38,6 @@ export class TeenPattieUpLayerLogic extends Component {
private setting: Button;
/**记录 */
private GameRule: Button;
/**规则 旧 */
private rule: Button;
/**开始游戏的倒计时 */
private cutdown: Node;
@ -56,14 +45,10 @@ export class TeenPattieUpLayerLogic extends Component {
private cut: number = 5;
private cutDownlabelEfct: CutDownLabelHertEffectComponent;
/**显示动画 */
showEffect:TeenPattieShowEffectLogic;
onLoad(): void {
this.bg = this.node;
this.gold = find("goldNode/num", this.node)?.getComponent(Label);
this.betNote = find("zhuchi/MinLabel", this.node)?.getComponent(Label);
this.totalLabel = find("zhuchi/TotalLabel", this.node)?.getComponent(Label);
this.currRound = find("round", this.node)?.getComponent(Label);
@ -74,28 +59,22 @@ export class TeenPattieUpLayerLogic extends Component {
if (!this.rollNum) this.rollNum = find("zhuchi/TotalLabel", this.node)?.addComponent(TeenPattieRollNumComponent);
this.menuBtn = find("menuBtn", this.node)?.getComponent(Button);
this.refreshBtn = find("refreshBtn", this.node)?.getComponent(Button);
this.close = find("menu/closeBtn", this.node)?.getComponent(Button);
this.setting = find("menu/setting", this.node)?.getComponent(Button);
this.GameRule = find("menu/record", this.node)?.getComponent(Button);
this.rule = find("rule", this.node)?.getComponent(Button);
this.menuNode = find("menuBtn", this.node);
this.menu = find("menu", this.node);
this.menu.active = false;
this.matchTips = find("matchTips", this.node);
this.matchTips.active = false;
this.matchTipsLabel = find("matchTips/Label",this.node)?.getComponent(Label);
this.betNode = find("betNode", this.node);
this.chouma = find("chouma", this.node);
this.chouma.active = false;
this.cutdown = find("cutdown", this.node);
this.cutDownlabelEfct = this.cutdown.addComponent(CutDownLabelHertEffectComponent);
// this.showEffect = this.node?.getComponent(TeenPattieShowEffectLogic);
this.initEvent();
this.setUserData();
}
@ -113,12 +92,10 @@ export class TeenPattieUpLayerLogic extends Component {
this.bg.on(Node.EventType.TOUCH_END,this.showTopMenuFalse,this);
this.refreshBtn.node.on(Node.EventType.TOUCH_END,this.onClickRefreshBth,this);
this.menuBtn.node.on(Node.EventType.TOUCH_END,this.onClickMenuBtn,this);
this.close.node.on(Node.EventType.TOUCH_END,this.onClickClose,this);
this.setting.node.on(Node.EventType.TOUCH_END,this.onClickSetting,this);
this.GameRule.node.on(Node.EventType.TOUCH_END,this.onClickRule,this);
this.rule.node.on(Node.EventType.TOUCH_END,this.onClickRule,this);
}
@ -135,12 +112,10 @@ export class TeenPattieUpLayerLogic extends Component {
this.bg?.off(Node.EventType.TOUCH_END,this.showTopMenuFalse,this);
this.refreshBtn?.node?.off(Node.EventType.TOUCH_END,this.onClickRefreshBth,this);
this.menuBtn?.node?.off(Node.EventType.TOUCH_END,this.onClickMenuBtn,this);
this.close?.node?.off(Node.EventType.TOUCH_END,this.onClickClose,this);
this.setting?.node?.off(Node.EventType.TOUCH_END,this.onClickSetting,this);
this.GameRule?.node?.off(Node.EventType.TOUCH_END,this.onClickRule,this);
this.rule?.node?.off(Node.EventType.TOUCH_END,this.onClickRule,this);
}
/**当前回合数 */
private rounds(round: number) {
@ -211,13 +186,6 @@ export class TeenPattieUpLayerLogic extends Component {
})
}
/**刷新房间 */
private onClickRefreshBth() {
this.totalLabel.string = "0";
TeenPattieGameStaticSystem.showEffect.hideBiPaiLigature();
}
private isNexOne:boolean = false;
/**
*
*
@ -227,10 +195,8 @@ export class TeenPattieUpLayerLogic extends Component {
console.warn("下一把游戏");
this.totalLabel.string = "0";
this.currRound.string = Game10001Res.getInstance()?.getString("game.title.round") || "" + `:0`;
}
/**获取房间总注信息 */
private getBaseBet(value: any) {
const allBet = TeenPattieCommTool.RideThousand(value.betTotal);
@ -251,6 +217,7 @@ export class TeenPattieUpLayerLogic extends Component {
for(let i = 0;i<allQiPai.length;i++){
if(allQiPai[i] == TeenPattieCommData.getInstance().playerSeatId){
TeenPattieCommData.getInstance().isGame = false;
break;
}
}
if(TeenPattieCommData.getInstance().isGame){
@ -279,28 +246,15 @@ export class TeenPattieUpLayerLogic extends Component {
private onClickSetting() {
UIManager.getInstance().show(`10001`, GamePanelConst.Game_Setting_Panel_TeenPattie, UILayerIndex.TopLayer);
}
/**点击记录 */
private onClickRecord() {
UIManager.getInstance().show(`10001`, GamePanelConst.Game_Record_Panel_TeenPattie, UILayerIndex.TopLayer);
}
/**点击规则 */
private onClickRule() {
// this.showTopMenuFalse();
UIManager.getInstance().show(`10001`, GamePanelConst.Game_Rule_Panel_TeenPattie, UILayerIndex.TopLayer);
}
/**
* 退
*/
private onHideGameBack() {
// Network.getInstance().send(GameNetCode.Close, {}, (value: any) => {
// Network.getInstance().removehandle(GameNetCode.Close);
// if (value.code == 0) {
// }
// })
// TeenPattieCommData.getInstance().clearCommData();
// Message.send(GameConst.EXIT_SUB_GAME);
// UIManager.getInstance().hide(GamePanelConst.Game_Main_Panel_TeenPattie);
}
/**关闭菜单 */

29
assets/10001/src/game/system/TeenpattieGameProxySystem.ts

@ -145,10 +145,9 @@ export class TeenpattieGameProxySystem extends Component {
this.chagedIndex =userPlayer >= 3 ? -(userPlayer - 3) : (3 - userPlayer)
for(let key in allData){
let data:any= allData[key];
let index:number = this.getPlayerIndex(data?.SeatId)
let index:number = this.getPlayerIndex(data?.SeatId);
this.setPlayerJoinData(index,data);
TeenPattieCommData.getInstance().allPlayerId.push(data?.SeatId);
// TeenpattieGameProxySystem.gameSystem.setJoinRoomPayerData(data,userPlayer);
TeenPattieCommData.getInstance()._allPlayerData.push(data);
}
@ -160,7 +159,7 @@ export class TeenpattieGameProxySystem extends Component {
if(value.data.data.time > 51){
Message.send(TeenPattieEventType.GameMatchTips,true);
}else{
TeenpattieGameProxySystem.upPlayer?.startCutDown(true,value.data.data.time);
if(value.data.data.time > 0) TeenpattieGameProxySystem.upPlayer?.startCutDown(true,value.data.data.time);
}
return;
}
@ -193,6 +192,14 @@ export class TeenpattieGameProxySystem extends Component {
}
}
/**
*
* @param userPlayer
*/
private resetAllPlayerSeatData(userPlayer:number){
}
/**房间底注 */
private onGameBaseBet(data: any){
Message.send(TeenPattieEventType.GameBaseBet, data);
@ -241,10 +248,8 @@ export class TeenpattieGameProxySystem extends Component {
/**看牌数据 */
private onGameSeeCard(value: any) {
console.warn("当前看牌玩家ID:",value.data.seatId);
if(TeenPattieCommData.getInstance().playerSeatId == value.data.seatId){
if(value.data.card){
this.setPlayerSeeCardData(value.data.card);
}
if(value.data.card){
this.setPlayerSeeCardData(value.data.card);
}
Message.send(TeenPattieEventType.IsSeeCard, value.data);
}
@ -377,13 +382,6 @@ export class TeenpattieGameProxySystem extends Component {
this.pkData = null;
}
/**重新开始游戏 */
private onGameReStart() {
TeenPattieCommData.getInstance().allPlayerId = []
TeenPattieCommData.getInstance()._allPlayerData = [];
this.clearCurrChuPaiId();
}
/**玩家加入 */
private onPlayerJoin(value:any){
let index:number = this.getPlayerIndex(value.data.SeatId)
@ -418,7 +416,8 @@ export class TeenpattieGameProxySystem extends Component {
}
Message.send(TeenPattieEventType.GameMatchTips,isStartCountTime);
}
/**踢出游戏弹出提示框 */
private exitTip(str:string){
let param:any={}
param.msg="kickout";

Loading…
Cancel
Save