Ejemplo n.º 1
0
 /// <summary>
 ///  callback method for native code to communicate events back to unity
 /// </summary>
 public static void PlayerAliasReceived(string json)
 {
     if (PlayerAliasReceivedEvent != null)
     {
         var ht = json.hashtableFromJson();
         PlayerAliasReceivedEvent(AGSProfile.fromHashtable(ht));
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// creates object from hashtable
    /// </summary>
    /// <returns>
    /// The hashtable.
    /// </returns>
    /// <param name='ht'>
    /// Ht.
    /// </param>
    public static AGSProfile fromHashtable(Hashtable ht)
    {
        var profile = new AGSProfile();

        profile.alias    = getStringValue(ht, "alias");
        profile.playerId = getStringValue(ht, "playerId");
        return(profile);
    }