view 2D_Action_Game/Assets/Scripts/GameMgr.cs @ 2:fdab88fc2cb9

add game projects
author Yuta ANSE <e135745@ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2015 23:14:45 +0900
parents
children
line wrap: on
line source

using UnityEngine;
using System.Collections;

public class GameMgr : MonoBehaviour {
	void OnGUI(){
		if (Enemy.Count == 0){
			Util.SetFontSize (64);
			Util.SetFontAlignment (TextAnchor.MiddleCenter);
			Util.SetFontColor (Color.white);


			float w = 128;
			float h = 32;
			float px = Screen.width / 2 - w / 2;
			float py = Screen.height / 2 - w / 2;

			Util.GUILabel (px, py, w, h, "Game Clear!");

			py += 60;
			if (GUI.Button(new Rect(px, py, w, h), "Back to Title")){
				Application.LoadLevel ("Title");
		}
	}
}
}