using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Facebook.MiniJSON;
using Holoville.HOTween;
///
/// This class contains all static method used in different part of the project or that may be usefull for you
/// Author : Pondomaniac Games
///
public class Util : ScriptableObject
{
//Getting the picture using the facebook GRAPH api
public static string GetPictureURL(string facebookID, int? width = null, int? height = null, string type = null)
{
string url = string.Format("/{0}/picture", facebookID);
string query = width != null ? "&width=" + width.ToString() : "";
query += height != null ? "&height=" + height.ToString() : "";
query += type != null ? "&type=" + type : "";
if (query != "") url += ("?g" + query);
return url;
}
//Getting the picture texture
public static void FriendPictureCallback(FBResult result)
{
if (result.Error != null)
{
Debug.LogError(result.Error);
return;
}
GameStateManager.FriendTexture = result.Texture;
}
//Getting a random friend list
public static Dictionary RandomFriend(List