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

public class GhostFeedback : MonoBehaviour
{
    public Transform TransformComponent { get; private set; }

    public bool IsVisible { get { return m_SpriteObj.activeInHierarchy; } }

    [SerializeField] private GameObject m_SpriteObj;
    [SerializeField] private SoundEffect m_SpawnSfx;

    private Animator m_Animator;

    private void Awake()
    {
        m_Animator = GetComponent<Animator>();
        TransformComponent = transform;
    }

    public void Popup()
    {
        m_SpriteObj.SetActive(true);
        m_Animator.SetTrigger("Popup");
        m_SpawnSfx.Play(TransformComponent.position);
    }
}
