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

public class MouseArea : MonoBehaviour, IPointerEnterHandler
{
	public int id;
	public CamManager cManager;

	private bool isEnabled = false;

	private void Awake()
	{
		isEnabled = true;
	}

	public void OnPointerEnter(PointerEventData eventData)
	{
		if (isEnabled) cManager.SetCamera(id, this);
	}

	public void SetEnabled()
	{
		isEnabled = true;
	}

	public void SetDisabled()
	{
		isEnabled = false;
	}
}
