*
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user