using UnityEngine;
using System.Collections;

public class Button : Element
{
    public override bool UpdateElement()
    {
        if (!m_Active)
            return false;

        // TODO : Correct inputs
        if (Input.GetMouseButtonDown(0))
        {
            RaycastHit hitInfo;
            if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hitInfo))
            {
                if (hitInfo.transform == transform)
                {
                    return true;
                }
            }
        }

        return false;
    }

    public override void Show()
    {
        base.Show();
    }

    public override void Hide()
    {
        base.Hide();
    }
}