// check if given state is on this state's path public bool IsOnMyPath(AIState state) { if (ParentState == null) { return(false); } if (ParentState == state) { return(true); } return(ParentState.IsOnMyPath(state)); }