Clarify the render-sorted! docstring
This commit is contained in:
@@ -571,11 +571,13 @@ specify which layers to render with or without.
|
|||||||
(sort-by :y #(compare %2 %1) entities))
|
(sort-by :y #(compare %2 %1) entities))
|
||||||
|
|
||||||
(defn render-sorted!
|
(defn render-sorted!
|
||||||
"Draws the supplied tiled-map layers and entities. If no sort function is
|
"Draws the specified layer tiles and entities sorted by their position on the
|
||||||
supplied, they will be sorted by :y (latitude).
|
y axis. A custom sort function may be provided. This is primarily intended for
|
||||||
|
games with isometric tiled maps, where the layer tiles often need to be sorted
|
||||||
|
to overlap correctly with the entities.
|
||||||
|
|
||||||
(render-sorted! screen [\"walls\"] entities)
|
(render-sorted! screen [\"walls\"] entities)
|
||||||
(render-sorted! screen #(sort-by :x %) [\"walls\"] entities)"
|
(render-sorted! screen #(sort-by :y %) [\"walls\"] entities)"
|
||||||
([screen layer-names entities]
|
([screen layer-names entities]
|
||||||
(render-sorted! sort-by-y screen layer-names entities))
|
(render-sorted! sort-by-y screen layer-names entities))
|
||||||
([{:keys [^BatchTiledMapRenderer renderer
|
([{:keys [^BatchTiledMapRenderer renderer
|
||||||
|
|||||||
Reference in New Issue
Block a user