スクリプト事例ースコアをポストする

スコアをポストするそのコルーチン

ただし,エラーが出ても,コンソールに表示されるだけで,処理はなし(ダメやろ)

	// remember to use StartCoroutine when calling this function!
	IEnumerator PostScores(string name, string cName, string area,int quize,  int score, int time)
		{
		string hash = Md5Sum(name + cName + area + quize + score + time);

		string post_url = addScoreUrl + "name=" + WWW.EscapeURL(name) + "&cName=" + cName + "&area=" + area + "&quize=" + quize + "&score=" + score + "&time=" + time + "&hash=" + hash;

			// Post the URL to the site and create a download object to get the result.
			WWW hs_post = new WWW(post_url);
		Debug.Log (post_url);
			yield return hs_post; // Wait until the download is done

		if (hs_post.error != null) {
			print ("There was an error posting the high score: " + hs_post.error);
		} else {
			print("done ");
		}
		}