using UnityEngine;
using System.Collections;

public class Splash : MonoBehaviour 
{
    float timer = 0f;

	// Use this for initialization
	void Start () {
        StartCoroutine(Mg_Player.Instance.Spawn_R(new Vector3(0, -20,0), Vector3.up, false));
	}
	
	// Update is called once per frame
	void Update () 
    {
        if (Input.GetKey(KeyCode.Escape)) Application.Quit();
        if (Input.GetKey(KeyCode.Return) || Input.GetKey(KeyCode.KeypadEnter) || Input.GetButton("Fire1")) StartCoroutine(goToGame());
	}

    IEnumerator goToGame()
    {
        yield return new WaitForSeconds(1);
        Application.LoadLevel("Main");
        yield return null;
    }
}
