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

public class CheckpointsMenu : MonoBehaviour {

	public GameObject player;
	public int level;
	public Button a;
	public Button b;
	public Button c;
	public Button d;

	public Vector3[] checkpoints;
	public Button[] Buttonsis;

	// Use this for initialization
	void Start () {
		level = PlayerPrefs.GetInt ("level");
	}
	
	// Update is called once per frame
	void Update () {
		player.transform.position = checkpoints[level];

		if(level == 0){
			a.interactable = true;
			b.interactable = false;
			c.interactable = false;
			d.interactable = false;
		} else if(level == 1){
			a.interactable = true;
			b.interactable = true;
			c.interactable = false;
			d.interactable = false;
		} else if(level == 2){
			a.interactable = true;
			b.interactable = true;
			c.interactable = true;
			d.interactable = false;
		} else if(level == 3){
			a.interactable = true;
			b.interactable = true;
			c.interactable = true;
			d.interactable = true;
		}

	}
}
