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

public class ScaleOnHover : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {

    [SerializeField] private float scale = 1.1f;

    private Vector3 initialScale;

    private void Start() {
        initialScale = transform.localScale;
    }

    public void OnPointerEnter(PointerEventData eventData) {
        transform.localScale = initialScale * scale;

        AudioManager.Instance.Play(GameManager.Instance, "Hover", false, 1);
    }

    public void OnPointerExit(PointerEventData eventData) => transform.localScale = initialScale;
}

