using System;
using UnityEngine;

public struct GameStats
{
    public float mojo;
    public float money;
    public float jobLevel;
    public bool AsMan;
}

[System.Serializable]
public class JobLevel
{
    public string name;
    [Range(1, 100)]
    public float stakes;
}


public class GameManager : MonoBehaviour
{

    static private GameManager _instance = null;
    private GameStats _stats;

    internal void PlayAsMan(bool asMan)
    {
        _stats.AsMan = asMan;
    }

    public JobLevel[] jobLevels;
    private void Awake()
    {
        if (_instance != null)
        {
            GameObject.Destroy(this.gameObject);
            return;
        }
        _instance = this;
    }

    public GameStats Stats
    {
        get { return _stats; }
        set { _stats = value; }
    }

    static public GameManager Instance()
    {
        return _instance;
    }

    public void GameOver(bool win)
    {
        FindObjectOfType<GameSceneManager>().LoadScene(((win) ? "Win" : "Loose"));
    }
}
