using UnityEngine;
using System.Collections;

public class GameManager : MonoBehaviour
{

    #region Variables

    #endregion
    private static GameManager s_Instance = null;

    public static GameManager instance
    {
        get
        {
            if (s_Instance == null)
            {
                s_Instance = FindObjectOfType(typeof (GameManager)) as GameManager;
            }

            if (s_Instance == null)
            {
                GameObject obj = new GameObject("GameManager");
                s_Instance = obj.AddComponent(typeof (GameManager)) as GameManager;
            }

            return s_Instance;
        }
    }

    //clean up 
    void OnApplicationQuit()
    {
        s_Instance = null;
    }

    public void GameOver()
    {
        Application.LoadLevel("Menu");
    }

    public void StartGame()
    {
        Application.LoadLevel("Game");
    }

    public void GoToMenu()
    {
        Application.LoadLevel("Menu");
    }
}
