private void HandleOnRebuyActionResponseReceived(string sender, string rebuyInfo) { if (sender.Equals(Constants.TABLEGAME_SERVER_NAME)) { RebuyAction action = JsonUtility.FromJson <RebuyAction> (rebuyInfo); if (playerID.Equals(action.Player_Name)) { buyinChips = action.Player_BuyIn_Chips; totalChips = action.Player_Total_Play_Chips; totalRealMoney = action.Player_Total_Real_Chips; DisplayTotalChips(); if (playerID.Equals(GameManager.Instance.currentTurnPlayerID) && playerID.Equals(NetworkManager.Instance.playerID) && !GameManager.Instance.isGameCompleted) { GameManager.Instance.DisplayAppropriateBetPanel(); } } if (action.Player_Name.Equals(NetworkManager.Instance.playerID)) { if (GameManager.Instance.ownTablePlayer.buyinChips >= Constants.TABLE_GAME_PLAY_MIN_CHIPS) { GameManager.Instance.isSitoutForInsufficientChips = false; if (GameManager.Instance.isSitoutForInsufficientChips) { GameManager.Instance.OnBackToGameButtonTap(); } } } } }
private void HandleOnAddChipsResponseReceived(string sender, string rebuyInfo) { if (sender.Equals(Constants.TABLEGAME_SERVER_NAME)) { RebuyAction rebuy = JsonUtility.FromJson <RebuyAction> (rebuyInfo); if (rebuy.Player_Name.Equals(playerID)) { buyinChips = rebuy.Player_BuyIn_Chips; totalChips = rebuy.Player_Total_Play_Chips; totalRealMoney = rebuy.Player_Total_Real_Chips; DisplayTotalChips(); } } }
private void HandleOnRebuyActionResponseReceived(string sender, string rebuyInfo) { if (sender.Equals(Constants.WHOOPASS_SERVER_NAME)) { RebuyAction action = JsonUtility.FromJson <RebuyAction> (rebuyInfo); if (playerID.Equals(action.Player_Name)) { buyInAmount = action.Player_BuyIn_Chips; totalChips = action.Player_Total_Play_Chips; totalRealMoney = action.Player_Total_Real_Chips; DisplayTotalChips(); if (action.Player_Name.Equals(NetworkManager.Instance.playerID)) { WhoopAssGame.Instance.btnRebuy.gameObject.SetActive(false); WhoopAssGame.Instance.btnAddChips.gameObject.SetActive(false); WhoopAssGame.Instance.rebuyPanel.gameObject.SetActive(false); } } } }