Files
MetalGear2D.Unity/Assets/Scripts/DoorPredicate.cs
T
2025-05-13 05:19:58 +03:00

28 lines
423 B
C#

using UnityEngine;
using System.Collections;
public class DoorPredicate : Predicate {
protected override bool CheckInternal (object param)
{
return Check ();
}
private Door _door;
void Start(){
_door = gameObject.GetComponentInChildren<Door>();
}
protected override bool CheckInternal ()
{
if(_door == null){
Debug.Log("WTF");
return false;
}
return _door.State != DoorState.Closed;
}
}