void sendBetttingToServer()
 {
     try
     {
         JSONClass data  = new JSONClass();
         JSONArray array = new JSONArray();
         foreach (Bet b in BetList)
         {
             foreach (int n in b.number)
             {
                 JSONClass number = new JSONClass();
                 number.Add("NUMBER", "" + n);
                 int time = (36 / b.number.Count) - 1;
                 number.Add("TIMES", "" + time);
                 number.Add("TAG", "ADD_COIN");
                 number.Add("COIN", "" + b.coin);
                 //data.Add ("NUMBER", number);
                 Roulette_AppWarpClass.add_coin(number);
                 //array.Add (number);
             }
         }
         data.Add("TAG", "ADD_COIN");
         data.Add("NUMBER", array);
     }
     catch (System.Exception ex)
     {
         Debug.Log("Ex Handle " + ex);
     }
     //Roulette_AppWarpClass.add_coin (data);
 }
Beispiel #2
0
 void sendBetttingToServer(Bet b)
 {
     try {
         JSONClass number = new JSONClass();
         int       time   = (36 / b.number.Count) - 1;
         number.Add("TIMES", "" + time);
         number.Add("TAG", "ADD_COIN");
         number.Add("COIN", "" + b.coin);
         number.Add("BET_ID", "" + b.betID);
         number.Add("x", "" + b.coinPosition.x);
         number.Add("y", "" + b.coinPosition.y);
         number.Add("z", "" + b.coinPosition.z);
         number.Add("IMAGE", "" + b.coinImageName);
         JSONArray num = new JSONArray();
         foreach (int n in b.number)
         {
             num.Add("" + n);
         }
         number.Add("NUMBER", num.ToString());
         Roulette_AppWarpClass.add_coin(number);
     } catch (System.Exception ex) {
         // Debug.Log (ex.Message);
     }
 }