using UnityEngine;
using System.Collections;

public class Intro : MonoBehaviour {

	public static bool showCredits = false;

	public SpriteRenderer help;
	public SpriteRenderer credits;

	void Start () {
		help.enabled = false;
		credits.enabled = showCredits;
	}
	
	void Update () {
		if (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space)) {
			if (credits.enabled)
				credits.enabled = false;
			else if (help.enabled) {
				showCredits = true;
				Application.LoadLevel("Game");
			}
			else
				help.enabled = true;
		}

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