using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameManager : MonoBehaviour {
    private static bool showIntro = true;

	private static GameManager instance;
	public static GameManager Instance {
		get {
			return instance;
		}
	}

	public GameObject waveSegmentPrefab;

	public Dictionary<WaveColor, Material> lineMaterials;

    public PoolManager poolManager;

    public GameObject sparksPrefab;

    public SpriteRenderer gameOverOverlay;
    public TMPro.TextMeshPro gameOverText;

    public Animator activator;
    public CameraMovement movement;

	[HideInInspector]
	public string lastShotPlayerId;

	void Awake ()
	{
		GameManager.instance = this;

		this.lineMaterials = new Dictionary<WaveColor, Material> ();
		this.lineMaterials.Add (WaveColor.None, Resources.Load<Material>("Line"));
		this.lineMaterials.Add (WaveColor.Red, Resources.Load<Material>("RedLine"));
		this.lineMaterials.Add (WaveColor.Blue, Resources.Load<Material>("BlueLine"));
		this.lineMaterials.Add (WaveColor.All, Resources.Load<Material>("PurpleLine"));
	}

	// Use this for initialization
	void Start () {
		if (showIntro == true) {
            showIntro = false;
            this.activator.enabled = true;
            this.activator.speed = 2.5f;

        } else
        {
            this.movement.enabled = true;
        }
	}
	
	// Update is called once per frame
	void Update () {
		
	}
}
