Пример #1
0
    public void CheckScores()
    {
        string url = GameSettings.POSTLevelCheckInsertSoloURL + GameSettings.GetUserFBToken() + "&level_id=" + GameInfoCollocation.info.currentLevel + "&type=" + GameInfoCollocation.info.gameMode;

        GameSettings.MyDebug(url);

        LevelCheckRequest postData = new LevelCheckRequest();

        postData.collocationLevelID = GameInfoCollocation.currentGame.currentCollocationLevelID;
        postData.word1Text          = GameInfoInsert.chosenWords[0];
        postData.word2Text          = GameInfoInsert.chosenWords[1];
        postData.word3Text          = GameInfoInsert.chosenWords[2];

        string json = JsonUtility.ToJson(postData);

        StartCoroutine(PostRequest(url, json));
    }
Пример #2
0
    public void CheckScores()
    {
        string url = GameSettings.GETLevelCheckURL + GameSettings.GetUserFBToken() + "&level_id=" + GameInfoSynonym2.info.currentLevel + "&type=" + GameInfoSynonym2.info.gameMode;

        GameSettings.MyDebug(url);

        LevelCheckRequest postData = new LevelCheckRequest();

        postData.headword   = GameInfoSynonym2.currentGame.currentWord;
        postData.headwordID = GameInfoSynonym2.currentGame.currentWordID;
        postData.word1Text  = inputFieldsScr[0].inputField.text;
        postData.word2Text  = inputFieldsScr[1].inputField.text;
        postData.word3Text  = inputFieldsScr[2].inputField.text;

        string json = JsonUtility.ToJson(postData);

        StartCoroutine(PostRequest(url, json));
    }