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

public class Menu : MonoBehaviour
{
    public int Opcion;
    public GameObject Play, Creditos, Salir;    
    // Start is called before the first frame update
    void Start()
    {               
    }

    // Update is called once per frame
    void Update()
    {
        //Controles de menu
        if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow))
        {
            Opcion= Opcion + 1 ;
        }
        if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow))
        {
            Opcion = Opcion - 1;
        }
        if (Opcion > 1)
        {
            Opcion = 0;
        }
        if (Opcion < 0)
        {
            Opcion = 2;
        }
        if (Opcion == 0)
        {
            Play.gameObject.transform.localScale = new Vector3(1.25f, 1.25f, 1.25f);
        }
        else
        {
            Play.gameObject.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
        }        
        if (Opcion == 1)
        {
            Salir.gameObject.transform.localScale = new Vector3(1.25f, 1.25f, 1.25f);
        }
        else
        {
            Salir.gameObject.transform.localScale = new Vector3(0.8f,0.8f,0.8f);
        }
        if (Opcion == 0 && Input.GetKeyDown(KeyCode.Space))
        {
            Application.LoadLevel("MikeScene");
        }
        if (Opcion == 1 && Input.GetKeyDown(KeyCode.Space))
        {
            Debug.Log("Quit");
            Application.Quit();
        }
    }    
}
