public static void GetScores(ScoresRetrieved callback, string level, Metric metric, int start, int count) { retrievalCallback = callback; string url = "http://www.pillowdrift.com/swift/?type=highscores&metric={0}&start={1}&count={2}&level={3}"; string metricString; if (metric == Metric.SPEED) { metricString = "speed"; } else if (metric == Metric.TIME) { metricString = "time"; } else { return; } // Make web request WWW www = new WWW(String.Format(url, metricString, start, count, level.Replace(" ", "%20"))); instance.StartCoroutine("WaitForRetrieval", www); }
public static void GetScores(ScoresRetrieved callback, string level, Metric metric, int start, int count) { retrievalCallback = callback; string url = "http://www.pillowdrift.com/swift/?type=highscores&metric={0}&start={1}&count={2}&level={3}"; string metricString; if (metric == Metric.SPEED) metricString = "speed"; else if (metric == Metric.TIME) metricString = "time"; else return; // Make web request WWW www = new WWW(String.Format(url, metricString, start, count, level.Replace(" ", "%20"))); instance.StartCoroutine("WaitForRetrieval", www); }