using UnityEngine;
using ScrambleKit.Extensions;

public class SpitterAttack : MonoBehaviour 
{
    public Transform ProjectilePrefab;

    void PerformAttack()
    {
        Transform proj = Instantiate(ProjectilePrefab);
        float angle = new Vector2(transform.localScale.x, 0).AngleFacing();
        proj.localEulerAngles = new Vector3(0, 0, angle);
        proj.position = transform.position + new Vector3(transform.localScale.x, 0, 0);
    }
}
