TiledMapper.Tile.GetNeighbour C# (CSharp) Method

GetNeighbour() public method

public GetNeighbour ( int dir ) : Tile
dir int
return Tile
        public Tile GetNeighbour(int dir)
        {
            return neighbours[dir];
        }

Usage Example

コード例 #1
0
 private int test2(Tile tile, int dir1, int dir2, int value)
 {
     if (!tile.IsPath(dir1) || !tile.IsPath(dir2)) return value;
     if (!tile.GetNeighbour(dir1).IsPath(dir2)) return value;
     if (!tile.GetNeighbour(dir2).IsPath(dir1)) return value;
     return 0;
 }