using UnityEngine;

[CreateAssetMenu(menuName = "Player/Skills/Skill_Elephant")]
public class Skill_Elephant : SkillBase
{
    public override void Active(PlayerSkill playerSkill)
    {
        playerSkill.Skill_Anim(0);

        Vector3 mouseScreenPos = Input.mousePosition;
        mouseScreenPos.z = 10f; // 카메라로부터 10 유닛 앞에 스폰

        Vector3 mouseWorldPos = Camera.main.ScreenToWorldPoint(mouseScreenPos);
        mouseWorldPos.z = 0f; // 2D면 z는 0

        GameObject skill = Instantiate(skillPrefab, Test.Instance.skillTr);
        skill.transform.position = mouseWorldPos;
        skill.SetActive(true);
    }
}
