// 打牌 protected virtual void OnMahjongClick(Transform item) { YxDebug.Log("玩家打牌"); if (!Menus.IsForbiddenAll()) { YxDebug.Log("当前存在菜单操作,不能打牌"); return; } if (App.GetGameManager <Lyzz2DGameManager>().GetLeftNum() < 0) { return; } var mahjongItem = item.GetComponent <MahjongItem>(); if (mahjongItem.Value == GetLaiZiValue()) { YxDebug.Log("混牌不能打"); item.GetComponent <UserContorl>().OnRecoveryPos(); return; } if (HasToken) { _mjClick(mahjongItem); } else { item.GetComponent <UserContorl>().OnRecoveryPos(); } }
// sendNoneReq:是否需要向服务端发送取消消息(只有等待自己出牌的时候才不需要发送) public void ShowMenu(int timeOut, bool sendNoneReq = true) { if (Menus.IsForbiddenAll()) { if (sendNoneReq) { ResponseOtherThrow(); } return; } InteraptMenu.Instance.ShowMenu(Menus, timeOut); }