public static TLMBGameConfig CreateCountGame(int coinPerCard) { TLMBGameConfig gameConfig = new TLMBGameConfig(); gameConfig.coinPerCard = coinPerCard; return(gameConfig); }
public static TLMBGameConfig CreateNormalGame(int firstRankRewardCoin, int secondRankRewardCoin) { TLMBGameConfig gameConfig = new TLMBGameConfig(); gameConfig.firstRankRewardCoin = firstRankRewardCoin; gameConfig.secondRankRewardCoin = secondRankRewardCoin; return(gameConfig); }
public void Create() { TLMBGameConfig gameConfig = TLMBGameConfig.CreateCountGame(10); JSONObject jsonData = new JSONObject(); jsonData.Add("gameConfig", gameConfig.ToJsonObject()); jsonData.Add("seatIndex", 0); SmartfoxClient.Instance.HandleServerRequest(CreateExtensionRequest(Command.TLMB.CREATE, jsonData)); }
public void Init(JSONObject jsonData) { roomId = jsonData.GetString("roomId"); userGames.Clear(); JSONArray userGameArray = jsonData.GetArray("userGames"); for (int i = 0; i < userGameArray.Length; i++) { userGames.Add(new TLMBGame(userGameArray[i].Obj)); } droppedCards = new TLMBCombination(jsonData.GetString("droppedCards")); roundDroppedCards = new TLMBCombination(jsonData.GetString("roundDroppedCards")); activeUserSeatIndex = jsonData.GetInt("activeUserSeatIndex"); state = (State)jsonData.GetInt("state"); gameConfig = new TLMBGameConfig(jsonData.GetObject("gameConfig")); remainingSeconds = jsonData.GetInt("remainingSeconds"); }
public static TLMBGameConfig CreateCountGame(int coinPerCard) { TLMBGameConfig gameConfig = new TLMBGameConfig(); gameConfig.coinPerCard = coinPerCard; return gameConfig; }
public static TLMBGameConfig CreateNormalGame(int firstRankRewardCoin, int secondRankRewardCoin) { TLMBGameConfig gameConfig = new TLMBGameConfig(); gameConfig.firstRankRewardCoin = firstRankRewardCoin; gameConfig.secondRankRewardCoin = secondRankRewardCoin; return gameConfig; }