Newer
Older
TheVengeance-Project-IADE-Unity2D / Assets / Scripts / NPC / Orc / Conditions / IsNotOnDestination.cs
@Rackday Rackday on 3 Sep 405 bytes Minor Update
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MyCollections.AI.FinitStateMachine;

[CreateAssetMenu(menuName = "Finite State Machine/Condition/IsNotOnDestination")]
public class IsNotOnDestination : Condition
{
    public override bool CheckCondition(FSM fsm)
    {
        Agent agent = fsm.Controller.Agent;

        return agent.remainingDistance > 0.2f;
    }
}