Upload from upload_mods.ps1
This commit is contained in:
25
Scripts/Requirements/IsSleeping.cs
Normal file
25
Scripts/Requirements/IsSleeping.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user