private void sendPlayerActionToServer(int betAmount, int action) { iTween.Stab(gameObject, iTween.Hash("audioclip", buttonAudio, "pitch", 1)); raiseValue = 0; lastPlayerBetAmt = 0; SliderChips.value = 0f; SliderChips.enabled = false; gameObjectManager.getBetAmountText().text = GameConstant.CURRENCY + raiseValue; JSON_Object requestJson = new JSON_Object(); try { requestJson.put(GameConstant.TAG_PLAYER_NAME, appwarp.username); requestJson.put(GameConstant.TAG_BET_AMOUNT, betAmount); requestJson.putOpt(GameConstant.TAG_ACTION, action); //setPlayerBetAmount(appwarp.username,betAmount); WarpClient.GetInstance().sendMove(GameConstant.REQUEST_FOR_ACTION + requestJson.ToString()); } catch (Exception e) { Debug.Log("GameManager : " + e.ToString()); } }
/** * Timer for rebuy chips in tournament * */ // private IEnumerator reBuyChipTimerOff(string sender){ // yield return new WaitForSeconds (GameConstant.TOURNAMENT_REBUY_TIMER); // // if (sender.Equals (appwarp.TEXASS_SERVER_NAME)) // texassGameManager.canReBuy = false; //// else //// waGameManager.distributeCards (); // // } private void sendGameType(int amt) { JSON_Object jsonObject = new JSON_Object(); jsonObject.put(GameConstant.TAG_SMALL_BLIEND_AMOUNT, amt); jsonObject.put(GameConstant.TAG_GAME_TYPE, appwarp.GAME_TYPE); WarpClient.GetInstance().SendChat(GameConstant.REQUEST_FOR_BLIEND_AMOUNT + jsonObject.ToString()); }