public static void SendInfoNotification(this ServerAPI api, Client sender, string message, int time = 3) { api.triggerClientEvent(sender, "infoNotification", message, time); }
private void sendRequest(ServerAPI.RequestType type, JSONObject dataObject) { Debug.Log(url + '/' + type.ToString() + " /// " + dataObject.ToString()); byte[] data = System.Text.Encoding.UTF8.GetBytes(dataObject.ToString()); www = new WWW(url+'/' +type.ToString(), data); }
public async void Buildings() { Tuple <bool, Building[]> result = await ServerAPI.Buildings(); Array.ForEach(result.Item2, x => Debug.Log(x.ToString())); }