コード例 #1
0
        static void DrawConnections(NavGrid grid, Vector2i coord)
        {
            Vector2i left = coord;

            left.x -= 1;

            if (grid.IsValidCoord(left) && grid.GetCaseAt(left) != null)
            {
                DrawLine(grid, coord, left);
            }

            Vector2i bot = coord;

            bot.y -= 1;

            if (grid.IsValidCoord(bot) && grid.GetCaseAt(bot) != null)
            {
                DrawLine(grid, coord, bot);
            }
        }