コード例 #1
0
		HighScore SplitHighScoreLineIntoHighScoreObject (string line)
		{
			var hiscore =  new HighScore();
			var scoreLines = line.Split('|');
			hiscore.Score = scoreLines[1];
			hiscore.Name = scoreLines[3];
			hiscore.Position = (int.Parse(scoreLines[5]) + 1).ToString();

			return hiscore;
		}
コード例 #2
0
		IEnumerator GetUserScore()
		{
			var url = dreamloWebserviceURL +  _publicCode  + "/pipe-get/" + _platformID;
			WWW www = new WWW(url);
			yield return www;

			UserScore = new HighScore ();
			if (string.IsNullOrEmpty(www.error))
			{
				UserScore = SplitHighScoreLineIntoHighScoreObject(www.text);
				IsConnected = true;
			}
			else 
			{
				print ("Error downloading: " + www.error);
				IsConnected = false;
			}

		}