Newer
Older
Dreamsturbia-Project-IADE-Unity3D / Assets / Scripts / AI / FSM / Condition.cs
@Rackday Rackday on 21 Aug 403 bytes Project Added
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public abstract class Condition : ScriptableObject
{
    public bool negate;
    protected abstract bool Test(FiniteStateMachine fsm);

    public bool DoTest(FiniteStateMachine fsm)
    {
        if (negate)
        {
            return !Test(fsm);
        } else
        {
            return Test(fsm);
        }
    }
}