using UnityEngine;
using System.Collections;

public class GeneralStuffScript : MonoBehaviour {
    public GameObject windscreen;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKey(KeyCode.Escape)) Application.LoadLevel(0);

        if (Win() || Input.GetKey(KeyCode.O))
        {
            windscreen.SetActive(true);
        }

        //print(GameObject.FindObjectsOfType<FreqReactorScript>().Length);
	}

    public bool Win() {
        
        return GameObject.FindObjectsOfType<FreqReactorScript>().Length == 0;
    }
}
