예제 #1
0
        public void DrawPath(IReadOnlyList <Vector2> path)
        {
            foreach ((Vector2 previous, Vector2 current) in path.Skip(1).Zip(path.Skip(2), (a, b) => (a, b)))
            {
                Directions direction    = (current - previous).Direction();
                Tiles      previousTile = mapManager.TileAt(previous).Value;
                Tiles      arrow;
                if (previousTile == Tiles.SlopeLeft || previousTile == Tiles.SlopeRight)
                {
                    arrow = direction.SlopeArrow();
                }
                else
                {
                    arrow = direction.FlatArrow();
                }

                worldRenderer.DrawEntity(arrow, previous);
            }
        }