示例#1
0
    public static TLMBGameConfig CreateCountGame(int coinPerCard)
    {
        TLMBGameConfig gameConfig = new TLMBGameConfig();

        gameConfig.coinPerCard = coinPerCard;
        return(gameConfig);
    }
示例#2
0
    public static TLMBGameConfig CreateNormalGame(int firstRankRewardCoin, int secondRankRewardCoin)
    {
        TLMBGameConfig gameConfig = new TLMBGameConfig();

        gameConfig.firstRankRewardCoin  = firstRankRewardCoin;
        gameConfig.secondRankRewardCoin = secondRankRewardCoin;
        return(gameConfig);
    }
示例#3
0
    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));
    }
示例#4
0
	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");
	}
示例#5
0
    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");
    }
示例#6
0
	public static TLMBGameConfig CreateCountGame(int coinPerCard) {
		TLMBGameConfig gameConfig = new TLMBGameConfig();
		gameConfig.coinPerCard = coinPerCard;
		return gameConfig;	
	}
示例#7
0
	public static TLMBGameConfig CreateNormalGame(int firstRankRewardCoin, int secondRankRewardCoin) {
		TLMBGameConfig gameConfig = new TLMBGameConfig();
		gameConfig.firstRankRewardCoin = firstRankRewardCoin;
		gameConfig.secondRankRewardCoin = secondRankRewardCoin;
		return gameConfig;
	}