//中奖记录按钮事件 private void awardRecordOnclick() { AudioManager.Instance.PlaySound("button"); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); uIWanRenChang.game2TcpRoomOperation.jackpot(); }
//本局开始 public override void start0() { CardManager cardManager = MessageManager.GetInstance.GetUIDict <CardManager>(); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); GameMove gameMove = MessageManager.GetInstance.GetUIDict <GameMove>(); if (cardManager != null) { cardManager.BetCountdown(); cardManager.Clear(); } if (uIWanRenChang != null) { uIWanRenChang.Clear(2); } if (gameMove != null) { gameMove.Gamestaremove(); } if (cardManager != null) { //播放发牌动画 cardManager.deal(); } }
//有人上庄 public override void bankerExchange(int bankerType, Game2PositionPlayerInfoDto player) { //系统庄家 if (bankerType == 1) { //把玩家庄家信息清理掉 liuliu.toRoomInfDto.banker = player; UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChan != null) { uIWanRenChan.Barterbanker(); } } else { if (player != null) { //把这个庄家信息存进去 liuliu.toRoomInfDto.banker = player; //更换玩家庄家信息 UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChan != null) { uIWanRenChan.Barterbanker(player); } XUIMidMsg.QuickMsg("恭喜玩家" + player.userName + "上庄成功"); } } }
//下庄按钮点击事件 private void DownBankerOnclick() { AudioManager.Instance.PlaySound("button"); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); uIWanRenChang.game2TcpRoomOperation.bankerDown(); }
//历史记录按钮事件 private void iRBtnOnclick() { AudioManager.Instance.PlaySound("button"); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); uIWanRenChang.game2TcpRoomOperation.history(); }
//判断自己是不是庄家 public void IsBanker(bool isbanker) { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); ISbanker = isbanker; if (ISbanker == true) { //说明是庄家 //if (DownBankerBtn == null) //{ // DownBankerBtn = XUIUtils.GetCompmentT<Button>(transform, "UpBankerBG/DownbankBtn"); // XUIUtils.ListenerBtn(DownBankerBtn, DownBankerOnclick); //} DownBankerBtn.gameObject.SetActive(true); //不可以退出 uIWanRenChang.IsBack = false; } else { //说明不是 //if (DownBankerBtn==null) //{ // DownBankerBtn = XUIUtils.GetCompmentT<Button>(transform, "UpBankerBG/DownbankBtn"); // XUIUtils.ListenerBtn(DownBankerBtn, DownBankerOnclick); //} DownBankerBtn.gameObject.SetActive(false); //可以退出 uIWanRenChang.IsBack = true; } }
//进房下注倒计时变更 public void BetCountdown(int a) { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); uIWanRenChang.BetChip(true); CountDown.gameObject.SetActive(true); CountdownMoveatorCoroutine = ILMgr.Instance.StartCoroutine(CountdownMoveator(28 - a)); }
//有人上庄或者排队成功 public override void bankerUp2CallBack(int callBackParam) { GameMove gameMove = MessageManager.GetInstance.GetUIDict <GameMove>(); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); uIWanRenChang.game2TcpRoomOperation.bankerList(); gameMove.BankerQuque(callBackParam); }
//下注成功 public override void bet2CallBack(Game2BetUpdateWeathDto callBackParam) { GameMove gameMove = MessageManager.GetInstance.GetUIDict <GameMove>(); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); gameMove.BetInfo(callBackParam); uIWanRenChang.BetInfo(callBackParam); }
//本局开始 public void Gamestaremove() { AudioManager.Instance.PlaySound("game_start"); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); //就可以投注了 uIWanRenChang.BetChip(true); }
//红包页面返回按钮 private void redpagBackOnclick() { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); redpagPanel.gameObject.SetActive(false); Tag.gameObject.SetActive(false); uIWanRenChang.TouchPanel.gameObject.SetActive(false); StopCoroutine("RedPagator"); }
private void OnDisable() { //Transform resultParentTrans = transform.Find("Bg/Result"); //for (int i = 0; i < resultParentTrans.childCount; i++) //{ // Transform result = resultParentTrans.GetChild(i); // //单双 // result.GetChild(0).GetComponent<Text>().text = ""; // //牌型 // result.GetChild(1).GetComponent<Text>().text = ""; //} AudioManager.Instance.StopBgAudio(); UIHallManager uIHall = MessageManager.GetInstance.GetUIDict <UIHallManager>(); if (uIHall != null) { if (uIHall.gameObject.activeSelf) { AudioManager.Instance.PlayerBgAudio("loadingbg"); } } UIZJHPanel uIZJHPanel = MessageManager.GetInstance.GetUIDict <UIZJHPanel>(); if (uIZJHPanel == null) { uIZJHPanel = MessageManager.GetInstance.GetUIDict <CheatZjhPanel>(); } if (uIZJHPanel != null) { if (uIZJHPanel.gameObject.activeSelf) { AudioManager.Instance.PlayerBgAudio("bgm3"); } } UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChang != null) { if (uIWanRenChang.gameObject.activeSelf) { AudioManager.Instance.PlayerBgAudio("WanRenBG"); } } //UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict<UIDicePlane>(); //if (uIDicePlane != null) //{ // if (uIDicePlane.gameObject.activeSelf) // { // AudioManager.Instance.PlayerBgAudio("DiceBG"); // } //} }
//玩家投注 public override void playerBetUpdateRoomWeath(long betUid, long reduceGold, long betGold, int betPosition) { UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChan != null) { uIWanRenChan.OtherBet(betUid, reduceGold, betGold, betPosition); } }
//庄家财富变更 public override void bankerSettleAccounts(long reduceGold, long winGold, long nowJackpot) { UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChan != null) { uIWanRenChan.BankerWeathChange(reduceGold, winGold, nowJackpot); } }
//结算消息排行 public override void ranking(GameRankingListDto dto) { UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (dto != null) { if (uIWanRenChan != null) { uIWanRenChan.Closeanaccount(dto); } } }
//自己结算财富变更 public override void playerSettleAccounts(long reduceGold, long winGold) { UIWanRenChang uIWanRenChan = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChan != null) { uIWanRenChan.SelfWeathChange(reduceGold, winGold); liuliu.SelfWeathDto[0] = reduceGold; liuliu.SelfWeathDto[1] = winGold; //调用筹码显示 uIWanRenChan.StakeCountonclick(6); } }
//红包页面显示 public void RedPagpaneltrue() { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); //红包页面显示 redpagPanel.gameObject.SetActive(true); Tag.gameObject.SetActive(true); uIWanRenChang.TouchPanel.transform.GetComponent <Image>().color = new Color(0.11f, 0.11f, 0.235f, 0.5f); uIWanRenChang.TouchPanel.gameObject.SetActive(true); //从天上随机掉落红包 StartCoroutine("RedPagator"); //从服务器获取红包排行榜并生成预设物。 //预设物的信息进行更改 }
//场中所有玩家按钮事件 private void OtherinfoOpenOnclick() { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (OtherinfoPanel.gameObject.activeSelf) { } else { AudioManager.Instance.PlaySound("button"); ////向服务器发送消息 uIWanRenChang.game2TcpRoomOperation.playPlayerList(); } }
/// <summary> /// 更新财富显示 /// </summary> public static void WealthUpdate() { UIHallManager uIHallManager = MessageManager.GetInstance.GetUIDict <UIHallManager>(); if (uIHallManager != null) { uIHallManager.UpdateUI(); } //UIVipPanel uiVipMsg = MessageManager.GetInstance.GetUIDict<UIVipPanel>(); //如果是在vip特权这个界面,就立即更新vip经验值 //if (uiVipMsg != null) //{ // if (uiVipMsg.gameObject.activeSelf) // { // uiVipMsg.UpdateUI(); // } //} UIZJHPanel uIZJHPanel = MessageManager.GetInstance.GetUIDict <UIZJHPanel>(); if (uIZJHPanel == null) { uIZJHPanel = MessageManager.GetInstance.GetUIDict <CheatZjhPanel>(); } if (uIZJHPanel != null) { uIZJHPanel.UpdateSelfUIInfo(); } UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); if (uIWanRenChang != null) { uIWanRenChang.MiddleWeath(); } UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>(); if (uIDicePlane != null) { uIDicePlane.MiddleWeath(); } UIShopPanel shopuiMessage = MessageManager.GetInstance.GetUIDict <UIShopPanel>(); if (shopuiMessage != null) { if (shopuiMessage.gameObject.activeSelf) { shopuiMessage.UpdateUIData(); } } }
//退出万人场 public override void exitRoom2CallBack(bool callBackParam) { if (callBackParam == true) { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); GameMove gameMove = MessageManager.GetInstance.GetUIDict <GameMove>(); CardManager cardManager = MessageManager.GetInstance.GetUIDict <CardManager>(); uIWanRenChang.BackGameboj(); gameMove.BackGameboj(); cardManager.BackGameboj(); UIManager.Instance.Clear(); PlayerCache.roomPlayersInfoDic.Clear(); SceneManager.LoadScene((int)SceneType.Hall); } }
//里面上庄按钮点击事件 private void UPBankerBtnOnclick() { AudioManager.Instance.PlaySound("button"); if (PlayerCache.loginInfo.gold >= 30000000000) { UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); //向服务器发消息 uIWanRenChang.game2TcpRoomOperation.bankerUp(); XUIMidMsg.QuickMsg("排队成功"); } else { //提示余额不足 XUIMidMsg.QuickMsg("亲您的的财富不足以上庄的哦"); } }
// 房间玩家信息 public void WanPlayerInfoCommand(Game2PlayerRoomDto game2PlayerRoomDto) { liuliu.toRoomInfDto = game2PlayerRoomDto; GameManager.Instance.game2PlayerRoomDto = null; UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); CardManager cardManager = MessageManager.GetInstance.GetUIDict <CardManager>(); if (liuliu.toRoomInfDto != null) { //获取自己人物信息 uIWanRenChang.GainPlayer(); //是否是系统庄家 if (liuliu.toRoomInfDto.banker == null) { uIWanRenChang.Barterbanker(); } else { uIWanRenChang.Barterbanker(liuliu.toRoomInfDto.banker); } //调用筹码显示 uIWanRenChang.StakeCountonclick(7); //投注上限 //liuliu.gameMove.Maximumbetsvo(liuliu.toRoomInfDto.BetLimit); //调用倒计时 if (liuliu.toRoomInfDto.roomTimer < 25) { cardManager.BetCountdown(liuliu.toRoomInfDto.roomTimer); } if (liuliu.toRoomInfDto.roomTimer > 0 && liuliu.toRoomInfDto.roomTimer < 30) { cardManager.Quickdeal(); } if (liuliu.toRoomInfDto.roomTimer > 30) { //停止投注 uIWanRenChang.BetChip(false); } if (liuliu.toRoomInfDto.roomTimer > 33) { XUIMidMsg.QuickMsg("结算中请稍等"); } } }
//停止投注 public void StopBet() { AudioManager.Instance.PlaySound("maidinglishou"); //不可以投注 UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); uIWanRenChang.BetChip(false); AwaithintCoroutine = ILMgr.Instance.StartCoroutine(Awaithint()); if (DowntimeratorCoroutine != null) { ILMgr.Instance.StopCoroutine(DowntimeratorCoroutine); DowntimeratorCoroutine = null; } if (downcountauCoroutine != null) { ILMgr.Instance.StopCoroutine(downcountauCoroutine); downcountauCoroutine = null; } }
//外面上庄按钮点击事件 private void upBankerOnclick() { //上庄页面显示 BankerBG.gameObject.SetActive(true); if (liuliu.toRoomInfDto.banker != null) { NewBanker.transform.GetChild(2).GetComponent <Text>().text = liuliu.toRoomInfDto.banker.userName; NewBanker.transform.GetChild(3).GetComponent <Text>().text = liuliu.toRoomInfDto.banker.gold.ToString(); } else { NewBanker.transform.GetChild(2).GetComponent <Text>().text = "系统庄家"; NewBanker.transform.GetChild(3).GetComponent <Text>().text = "99999999999"; } //反馈页面显示 TouchPanel.gameObject.SetActive(true); UIWanRenChang uIWanRenChang = MessageManager.GetInstance.GetUIDict <UIWanRenChang>(); //给服务器发消息获取上庄列表 uIWanRenChang.game2TcpRoomOperation.bankerList(); }