示例#1
0
 //public Texture2D guiBackground;
 //bool gameOver = false;
 public static PointManagement GetInstance()
 {
     if (instance == null) {
         GameObject go = new GameObject("GameManager");
         go.AddComponent<PointManagement>();
         instance = go.GetComponent<PointManagement>();
     }
     return instance;
 }
示例#2
0
    void Awake()
    {
        if (instance != null) {
            Debug.Log ("Wrong");
            Destroy (gameObject);
            return;
        }
        instance = this;

        if (Input.GetKey (KeyCode.Escape))
            Application.Quit ();
    }