Agent Class
public class Agent : MonoBehaviour
{
[SerializeField] private WorldManager wordManager;
private Task behaviorTree;
private TaskStatus behaviorTreeStatus = TaskStatus.None;
void Start(){
Task sequenceMoveToRoom = new Sequence();
sequenceMoveToRoom.AddChildren(new DoorOpenCondition("Door1"));
sequenceMoveToRoom.AddChildren(new MoveAction("Room1"));
Task sequenceOpenDoorMoveToRoom = new Sequence();
sequenceOpenDoorMoveToRoom.AddChildren(new MoveAction("Door1"));
sequenceOpenDoorMoveToRoom.AddChildren(new OpenDoorAction("Door1"));
sequenceOpenDoorMoveToRoom.AddChildren(new MoveAction("Room1"));
behaviorTree = new Selector();
behaviorTree.AddChildren(sequenceMoveToRoom);
behaviorTree.AddChildren(sequenceOpenDoorMoveToRoom);
}