예제 #1
0
 public Warp GetWarp(int x, int y)
 {
     for (int c = 0; c < Location.warps.Count; c++)
     {
         if (Location.warps[c].X == x && Location.warps[c].Y == y)
         {
             return(Warp.Wrap(Location.warps[c]));
         }
     }
     throw new NullReferenceException();
 }
예제 #2
0
 public bool TryGetWarp(int x, int y, out Warp warp)
 {
     warp = default(Warp);
     for (int c = 0; c < Location.warps.Count; c++)
     {
         if (Location.warps[c].X == x && Location.warps[c].Y == y)
         {
             warp = Warp.Wrap(Location.warps[c]);
             return(true);
         }
     }
     return(false);
 }