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

public class LevelSelectionController : MonoBehaviour {

    private void Start() {
        //StartCoroutine(SceneTransitionManager.fadeOut());
    }

    public void goToGame(int level) {
        switch (level) {
            case 1:
                PlayerPrefs.SetInt("currentLevel", 1);
                PlayerPrefs.SetInt("moves", 4);
                PlayerPrefs.SetInt("targets", 6);
                SceneManager.LoadScene("level_cover");
                break;
            case 2:
                PlayerPrefs.SetInt("currentLevel", 2);
                PlayerPrefs.SetInt("moves", 4);
                PlayerPrefs.SetInt("targets", 9);
                SceneManager.LoadScene("level_cover");
                break;
            case 3:
                PlayerPrefs.SetInt("currentLevel", 3);
                PlayerPrefs.SetInt("moves", 6);
                PlayerPrefs.SetInt("targets", 15);
                SceneManager.LoadScene("level_cover");
                break;
            case 4:
                break;
        }
    }
    
    public void goToMainMenu() {
        SceneManager.LoadScene("menu");
    }

}
