using NodeCanvas.Framework;
using ParadoxNotion.Design;
using RaycastPro.Casters;
using RaycastPro.RaySensors;
using UnityEngine;


namespace NodeCanvas.Tasks.Actions{

	[Category("RaycastPro")]
	[Description("")]
	public class BasicCasterShoot : ActionTask<BasicCaster>
	{
		public int bulletIndex;

		public int amount = 1;
		
		protected override void OnExecute()
		{
			if (amount > 1)
			{
				agent.MultipleCast(bulletIndex, amount);
			}
			else if (amount == 1)
			{
				agent.Cast(bulletIndex);
			}
			
			EndAction(true);
		}
	}
}