コード例 #1
0
ファイル: WallBrush.cs プロジェクト: squall-tech/akmapeditor
        public static bool hasMatchingWallBrushAtTile(GameMap map, WallBrush wall_brush, int x, int y, int z)
        {
            Tile t = map.getTile(x, y, z);

            if (t == null)
            {
                return(false);
            }

            foreach (Item item in t.Items)
            {
                if (item.Type.IsWall)
                {
                    WallBrush wb = item.getWallBrush();
                    if (wb == wall_brush)
                    {
                        return(!item.Type.WallHateMe);
                    }
                    else if (wall_brush.friendOf(wb) || wb.friendOf(wall_brush))
                    {
                        return(!item.Type.WallHateMe);
                    }
                }
            }

            return(false);
        }