You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
641 B
C#
23 lines
641 B
C#
using MalbersAnimations.Scriptables;
|
|
|
|
|
|
namespace MalbersAnimations.Controller.AI
|
|
{
|
|
public class IsTargetInSetDecision : MAIDecision
|
|
{
|
|
public override string DisplayName => "Movement/Is Target in RuntimeSet";
|
|
public RuntimeGameObjects Set;
|
|
|
|
public override bool Decide(MAnimalBrain brain, int Index)
|
|
{
|
|
if (brain.AIControl.Target != null)
|
|
{
|
|
return Set.Items.Contains(brain.Target.gameObject);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void Reset() => Description = "Returns true if the Current AI Target is on a Runtime Set";
|
|
|
|
}
|
|
} |