예제 #1
0
    public void SaveScores()
    {
        string url = GameSettings.POSTLevelSaveScoreDragSoloURL + GameSettings.GetUserFBToken() + "&level_id=" + GameInfoCollocation.info.currentLevel + "&type=" + GameInfoCollocation.info.gameMode;

        GameSettings.MyDebug(url);

        LevelSaveScoreRequest postData = new LevelSaveScoreRequest();

        postData.collocationLevelID = GameInfoCollocation.currentGame.currentCollocationLevelID;
        postData.score = sum_score;
        postData.order = new ColClassifyOrder[GameInfoChoose.classyfiedBtns.Count];

        for (int i = 0; i < GameInfoChoose.classyfiedBtns.Count; i++)
        {
            postData.order[i] = new ColClassifyOrder();
            postData.order[i].position = i;
            postData.order[i].collocation_id = GameInfoChoose.classyfiedBtns[i].collocation_id;
        }

        postData.log_session = GameInfoChoose.info.log_session;

        string json = JsonUtility.ToJson(postData);

        StartCoroutine(PostRequest(url, json));
    }
예제 #2
0
    public void SaveScores()
    {
        string url = GameSettings.POSTLevelSaveScoreDragSoloURL + GameSettings.GetUserFBToken() + "&level_id=" + GameInfoCollocation.info.currentLevel + "&type=" + GameInfoCollocation.info.gameMode;

        GameSettings.MyDebug(url);

        LevelSaveScoreRequest postData = new LevelSaveScoreRequest();

        postData.collocationLevelID = GameInfoCollocation.currentGame.currentCollocationLevelID;
        postData.score = sum_score;

        string json = JsonUtility.ToJson(postData);

        StartCoroutine(PostRequest(url, json));
    }