namespace Goap.Agent.Core { public interface IAction { ActionMoveMode GetMoveMode(IMonoAgent agent); float GetStoppingDistance(); bool IsInRange(IMonoAgent agent, float distance, IActionData data, IComponentReference references); IActionData GetData(); /// /// Called when the action is created /// void Created(); /// /// Check if the action is valid /// bool IsValid(IActionReceiver agent, IActionData data); /// /// Called when the action is started/assigned to an agent /// void Start(IMonoAgent agent, IActionData data); /// /// Called the first time the action is performed /// void BeforePerform(IMonoAgent agent, IActionData data); /// /// Called every frame while the action is being performed /// IActionRunState Perform(IMonoAgent agent, IActionData data, IActionContext context); /// /// Called when the action is stopped (forced or otherwise) /// void Stop(IMonoAgent agent, IActionData data); /// /// Called when the action is completed /// void Complete(IMonoAgent agent, IActionData data); bool IsExecutable(IActionReceiver agent, bool conditionsMet); } }