using UnityEngine;
using UnityEngine.SceneManagement;
using DG.Tweening;

public class ReloadSceneKey : MonoBehaviour
{
	public KeyCode Key = KeyCode.R;

	void Update()
	{
		if (Input.GetKeyDown(Key))
			ReloadScene();

		if (Input.GetKeyDown(KeyCode.T))  // Turbo
			Time.timeScale = 4f;

		if (Input.GetKeyDown(KeyCode.Y))  // Undo Turbo
			Time.timeScale = 1f;

		//if (Input.GetKeyDown(KeyCode.Alpha1))
		//{
		//	Debug.Log("invoking fake celebration - perfect");
		//	Scoreboard.instance.noMoreBalloons = true;
		//	Scoreboard.instance.timesUp = true;

		//	Scoreboard.instance.goldenBalloons = Scoreboard.instance.goldenBalloonsMax;
		//	Scoreboard.instance.purpleBalloons = Scoreboard.instance.purpleBalloonsMax;
		//	Scoreboard.instance.blueBalloons = Scoreboard.instance.blueBalloonsMax;
		//}

		//if (Input.GetKeyDown(KeyCode.Alpha2))
		//{
		//	Debug.Log("invoking fake celebration - close");
		//	Scoreboard.instance.noMoreBalloons = true;
		//	Scoreboard.instance.timesUp = true;

		//	Scoreboard.instance.goldenBalloons = Scoreboard.instance.goldenBalloonsMax;
		//	Scoreboard.instance.purpleBalloons = Scoreboard.instance.purpleBalloonsMax - 1;
		//	Scoreboard.instance.blueBalloons = Scoreboard.instance.blueBalloonsMax - 1;
		//}

		//if (Input.GetKeyDown(KeyCode.Alpha3))
		//{
		//	Debug.Log("invoking fake celebration - poor");
		//	Scoreboard.instance.noMoreBalloons = true;
		//	Scoreboard.instance.timesUp = true;

		//	Scoreboard.instance.goldenBalloons = 1;
		//	Scoreboard.instance.purpleBalloons = 3;
		//	Scoreboard.instance.blueBalloons = 6;
		//}
	}

	void ReloadScene()
	{
		DOTween.KillAll();
		SceneManager.LoadScene(SceneManager.GetActiveScene().name);
	}
}
