using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class GameInfo : MonoBehaviour {

	public static GameInfo instance;
	public InputField crowdSize;
	public Slider crowdSpeed;
	public int wavedAt;
	public int correctlyWaved;

	void Awake()
	{
		DontDestroyOnLoad (this);
		DontDestroyOnLoad (instance);
	}

	void Start()
	{
		instance = this;
	}

	public static int getCrowdSize()
	{
        return int.Parse(instance.crowdSize.text);                                                                                                                       
	}

	public static float getCrowdSpeed()
	{
		return 2.0f;
	}

	public void StartEasyGame()
	{
        instance.crowdSize.text = "9";
        SceneManager.LoadScene ("MainScene");
	}

	public void StartHardGame()
	{
        instance.crowdSize.text = "30";
        SceneManager.LoadScene ("MainScene");
	}

	public static int getWaved()
	{
		return instance.wavedAt;
	}

	public static int getCorrect()
	{
		return instance.correctlyWaved;
	}

	public static void addCorrect()
	{
		instance.correctlyWaved++;
	}

	public static void addWaved()
	{
		instance.wavedAt++;
	}
}
