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

namespace DesktopVision
{
    /// <summary>
    /// This class is used to move a Desktop Vision computer game object
    /// </summary>
    public class DVMoveComputerButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
    {
        /// <summary>
        /// The computer which will be moved when the icon is activated
        /// </summary>
        public DVComputer computer;
        /// <summary>
        /// When the pointer is down toggle true the computer movingComputer boolean
        /// </summary>
        public void OnPointerDown(PointerEventData data)
        {
            computer.movingComputer = true;
        }
        /// <summary>
        /// When the pointer is up toggle false the computer movingComputer boolean
        /// </summary>

        public void OnPointerUp(PointerEventData data)
        {
            computer.movingComputer = false;
        }
    }
}