void createEntity()
    {
        //printToConsole("Creating Entity...");

        // Store all the information you want inside a dictionary
        Dictionary <string, object> movie = new Dictionary <string, object>();

        movie ["name"]    = name;
        movie["director"] = director;
        movie["duration"] = duration;
        movie["music"]    = music;

        // Make the request to store the entity inside the desired collection
        GamedoniaData.Create("movies", movie, delegate(bool success, IDictionary data){
            if (success)
            {
                //TODO Your success processing
                Application.LoadLevel("DataScene");
            }
            else
            {
                //TODO Your success processing
                //printToConsole("Failed to create entity.");
                errorMsg = Gamedonia.getLastError().ToString();
                Debug.Log(errorMsg);
            }
        });
    }
 void OnLogin(bool success)
 {
     if (success)
     {
         Application.LoadLevel("UserDetailsScene");
     }
     else
     {
         errorMsg = Gamedonia.getLastError().ToString();
         Debug.Log(errorMsg);
     }
 }
 void OnCreateUser(bool success)
 {
     if (success)
     {
         GamedoniaUsers.LoginUserWithEmail(email.ToLower(), password, OnLogin);
     }
     else
     {
         errorMsg = Gamedonia.getLastError().ToString();
         Debug.Log(errorMsg);
     }
 }
Example #4
0
 void OnGetMe(bool success, GDUserProfile userProfile)
 {
     if (success)
     {
         this.userProfile = userProfile;
     }
     else
     {
         errorMsg = Gamedonia.getLastError().ToString();
         Debug.Log(errorMsg);
     }
 }
Example #5
0
 void OnResetPassword(bool success)
 {
     if (success)
     {
         errorMsg = "Password reset successfully, please check your email for instructions to complete the process";
         Debug.Log(errorMsg);
     }
     else
     {
         errorMsg = Gamedonia.getLastError().ToString();
         Debug.Log(errorMsg);
     }
 }
 void OnLogin(bool success)
 {
     statusMsg = "";
     if (success)
     {
         printToConsole("Session started successfully. uid: " + GamedoniaUsers.me._id);
     }
     else
     {
         errorMsg = Gamedonia.getLastError().ToString();
         Debug.Log(errorMsg);
     }
 }
Example #7
0
    void OnLogin(bool success)
    {
        statusMsg = "";
        if (success)
        {
            printToConsole("Session started successfully. uid: " + GamedoniaUsers.me._id);

            //Requesting products
            GamedoniaStore.RequestProducts(productsList, productsList.Length);
        }
        else
        {
            errorMsg = Gamedonia.getLastError().ToString();
            Debug.Log(errorMsg);
        }
    }
Example #8
0
    void OnFacebookLogin(bool success)
    {
        if (success)
        {
            //Application.LoadLevel("UserDetailsScene");

            //Optional stuf if oyu want to store the facebook username inside the Gamedonia user profile
            Dictionary <string, object> profile = new Dictionary <string, object>();
            profile.Add("nickname", fbUserName);
            profile.Add("registerDate", DateTime.Now);
            GamedoniaUsers.UpdateUser(profile, OnLogin);
        }
        else
        {
            errorMsg = Gamedonia.getLastError().ToString();
            Debug.Log(errorMsg);
        }
    }