25 lines
666 B
C#
25 lines
666 B
C#
using System;
|
|
using Unity.Behavior;
|
|
using UnityEngine;
|
|
|
|
[Serializable, Unity.Properties.GeneratePropertyBag]
|
|
[Condition(name: "GameObject Null", story: "[Object] is [IsNull] null", category: "Conditions", id: "0136a874fb9b9066a1c71f05e9b92e63")]
|
|
public partial class ObjectNullCondition : Condition
|
|
{
|
|
[SerializeReference] public BlackboardVariable<GameObject> Object;
|
|
[SerializeReference] public BlackboardVariable<bool> IsNull;
|
|
|
|
public override bool IsTrue()
|
|
{
|
|
return (Object.Value == null && IsNull) || (Object.Value != null && !IsNull);
|
|
}
|
|
|
|
public override void OnStart()
|
|
{
|
|
}
|
|
|
|
public override void OnEnd()
|
|
{
|
|
}
|
|
}
|