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

public class ButtonScript : MonoBehaviour
{

    public int ButtonID;

    // Use this for initialization
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }

    void OnMouseDown()
    {

        switch (ButtonID)
        {
            case 1: //Instructions
                SceneManager.LoadScene("Instructions");
                break;
            case 2: // Play
                PlayerPrefs.SetInt("JustStarting", 1);
                SceneManager.LoadScene("Game");
                break;
            case 5: // Replay regular health
                PlayerPrefs.SetInt("Health", PlayerPrefs.GetInt("LevelStartHealth"));
                PlayerPrefs.SetInt("Fuel", PlayerPrefs.GetInt("LevelStartFuel"));
                SceneManager.LoadScene("Game");
                PlayerPrefs.SetInt("Dying", 0);
                break;
            case 6: // Replay full health
                PlayerPrefs.SetInt("Health", 10);
                PlayerPrefs.SetInt("Fuel", 10);
                SceneManager.LoadScene("Game");
                PlayerPrefs.SetInt("Dying", 0);
                break;
            case 10: // Main Menu
                SceneManager.LoadScene("Title");
                break;
        }
    }
}
