Example #1
0
 private bool CheckForFlags(NavMeshCellFlags flag)
 {
     return(flag.HasFlag(NavMeshCellFlags.Walkable) &&
            !flag.HasFlag(NavMeshCellFlags.Tree) &&
            !flag.HasFlag(NavMeshCellFlags.GridFlagObstacle) &&
            !flag.HasFlag(NavMeshCellFlags.MovementBlocker));
 }
Example #2
0
 /// <summary>
 ///     The is walkable cell.
 /// </summary>
 /// <param name="flags">
 ///     The flags.
 /// </param>
 /// <returns>
 ///     The <see cref="bool" />.
 /// </returns>
 public static bool IsWalkableCell(NavMeshCellFlags flags)
 {
     return(!flags.HasFlag(NavMeshCellFlags.GridFlagObstacle) && flags.HasFlag(NavMeshCellFlags.Walkable) &&
            !flags.HasFlag(NavMeshCellFlags.Tree));
 }