thieumao

Unity Parse.com Simple Test

Aug 27th, 2015
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using Parse;
  4.  
  5. public class Mao : MonoBehaviour {
  6.  
  7.     // Use this for initialization
  8.     void Start () {
  9.         /*
  10.         ParseObject testObject = new ParseObject("Coder");
  11.         testObject["Name"] = "Thieu Mao";
  12.         testObject["Project"] = "Phim";
  13.         testObject.SaveAsync();
  14.  
  15.         testObject = new ParseObject("Coder");
  16.         testObject["Name"] = "Thieu Mao";
  17.         testObject["Project"] = "Tivi";
  18.         testObject.SaveAsync();
  19.          * */
  20.  
  21.         ParseQuery<ParseObject> query = ParseObject.GetQuery("Coder");
  22.         query.GetAsync("KiIGm7Dqgo").ContinueWith(t =>
  23.         {
  24.             ParseObject gameScore = t.Result;
  25.  
  26.             //int score = gameScore.Get<int>("score");
  27.             string Project = gameScore.Get<string>("Project");
  28.             print("Ket qua: " + Project);
  29.             //bool cheatMode = gameScore.Get<bool>("cheatMode");
  30.         });
  31.  
  32.  
  33.     }
  34.    
  35.     // Update is called once per frame
  36.     void Update () {
  37.    
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment