25 lines
682 B
C#
25 lines
682 B
C#
using System;
|
|
using Unity.Behavior;
|
|
using UnityEngine;
|
|
|
|
[Serializable, Unity.Properties.GeneratePropertyBag]
|
|
[Condition(name: "GameObject is Null", story: "[Object] is [IsNull] null", category: "Variable Conditions", id: "9be617c0444353affee2f412e94ae715")]
|
|
public partial class GameObjectNullCondition : 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()
|
|
{
|
|
}
|
|
}
|