Newer
Older
TheVengeance-Project-IADE-Unity2D / Assets / Scripts / NPC / BlackSmith / Conditions / HasGreetPlayer.cs
@Rackday Rackday on 29 Oct 600 bytes Major Update
using MyCollections.AI.FinitStateMachine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(menuName = "Finite State Machine/Condition/HasGreet")]
public class HasGreetPlayer : Condition
{
    public override bool CheckCondition(FSM fsm)
    {
        Blacksmith controller = (Blacksmith)fsm.Controller;
        if (fsm.Controller.AgentFOV.GetTarget() != null)
        {
            if (controller != null)
            {
                return controller.hasGreetPlayer;
            }

            return false;
        }

        return false;
    }
}