Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- using Parse;
- using System;
- using System.Threading.Tasks;
- public class Mao : MonoBehaviour
- {
- // Use this for initialization
- void Start()
- {
- var query = new ParseQuery<ParseObject>("GameScore")
- .WhereEqualTo ("objectId", "GY5pnlDaOJ");
- query.FindAsync().ContinueWith(t =>
- {
- var tokens = t.Result;
- IEnumerator<ParseObject> enumerator = tokens.GetEnumerator();
- enumerator.MoveNext();
- var token = enumerator.Current;
- token["score"] = 2015;
- return token.SaveAsync();
- }).Unwrap().ContinueWith(t =>
- {
- // Everything is done!
- //Debug.Log("Token has been updated!");
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment