26 lines
610 B
C#
26 lines
610 B
C#
using UnityEngine.Scripting;
|
|
|
|
[Preserve]
|
|
public class IsSleeping : TargetedCompareRequirementBase
|
|
{
|
|
public override bool IsValid(MinEventParams _params)
|
|
{
|
|
if (!base.IsValid(_params))
|
|
{
|
|
return false;
|
|
}
|
|
EntityAlive entityAlive = this.target as EntityAlive;
|
|
if (entityAlive == null)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
//Log.Out("IsSleeping entityAlive.IsSleeping: " + entityAlive.IsSleeping);
|
|
if (!this.invert)
|
|
{
|
|
return entityAlive.IsSleeping;
|
|
}
|
|
return !entityAlive.IsSleeping;
|
|
}
|
|
}
|