Esempio n. 1
0
 /// <summary>
 /// Provides the exit status given position and exit (NSEW)
 /// </summary>
 /// <param name="worldTiles"></param>
 /// <param name="position"></param>
 /// <param name="exit"></param>
 /// <returns></returns>
 private static ExitStatus GetExistStatus(Dictionary <Vector3D, TileInfo> worldTiles, Vector3D position, TileExits exit)
 {
     if (!worldTiles.ContainsKey(position))
     {
         return(ExitStatus.Free);
     }
     else
     {
         if ((worldTiles[position].ExitDirectionBits & (int)exit) > 0)
         {
             return(ExitStatus.Open);
         }
         else
         {
             return(ExitStatus.Blocked);
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Provides the exit status given position and exit (NSEW)
 /// </summary>
 /// <param name="worldTiles"></param>
 /// <param name="position"></param>
 /// <param name="exit"></param>
 /// <returns></returns>
 private static ExitStatus GetExistStatus(Dictionary<Vector3D, TileInfo> worldTiles, Vector3D position, TileExits exit)
 {
     if (!worldTiles.ContainsKey(position)) return ExitStatus.Free;
     else
     {
         if ((worldTiles[position].ExitDirectionBits & (int)exit) > 0) return ExitStatus.Open;
         else return ExitStatus.Blocked;
     }
 }