Newer
Older
TheVengeance-Project-IADE-Unity2D / Assets / Scripts / NPC / Orc / Conditions / CanSeeTarget.cs
@Rackday Rackday on 27 Aug 400 bytes Minor Update
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MyCollections.AI.FinitStateMachine;

[CreateAssetMenu(menuName = "Finite State Machine/Condition/CanSeeTarget")]
public class CanSeeTarget : Condition
{
    public override bool CheckCondition(FSM fsm)
    {
        FOV fov = fsm.Controller.AgentFOV;

        return fov.GetTarget() != null ? true : false;
    }
}