comparison 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
comparison
equal deleted inserted replaced
0:347d21cdfc22 2:fdab88fc2cb9
1 using UnityEngine;
2 using System.Collections;
3
4 public class GameMgr : MonoBehaviour {
5 void OnGUI(){
6 if (Enemy.Count == 0){
7 Util.SetFontSize (64);
8 Util.SetFontAlignment (TextAnchor.MiddleCenter);
9 Util.SetFontColor (Color.white);
10
11
12 float w = 128;
13 float h = 32;
14 float px = Screen.width / 2 - w / 2;
15 float py = Screen.height / 2 - w / 2;
16
17 Util.GUILabel (px, py, w, h, "Game Clear!");
18
19 py += 60;
20 if (GUI.Button(new Rect(px, py, w, h), "Back to Title")){
21 Application.LoadLevel ("Title");
22 }
23 }
24 }
25 }