Support next version of libGDX

This commit is contained in:
oakes
2014-08-08 15:48:52 -04:00
parent 0cd1b03bdf
commit 93ad83db7b
4 changed files with 18 additions and 16 deletions

View File

@@ -465,7 +465,7 @@ with the tiled map file at `path` and `unit` scale.
(defmethod draw! BatchTiledMapRenderer
[{:keys [^BatchTiledMapRenderer renderer] :as screen} entities]
(let [^SpriteBatch batch (.getSpriteBatch renderer)]
(let [^Batch batch (.getSpriteBatch renderer)]
(.begin batch)
(doseq [entity entities]
(e/draw-entity! entity screen batch))
@@ -474,7 +474,7 @@ with the tiled map file at `path` and `unit` scale.
(defmethod draw! Stage
[{:keys [^Stage renderer] :as screen} entities]
(let [^SpriteBatch batch (.getSpriteBatch renderer)]
(let [^Batch batch (.getBatch renderer)]
(.begin batch)
(doseq [entity entities]
(e/draw-entity! entity screen batch))
@@ -595,7 +595,7 @@ to overlap correctly with the entities.
(when-not (get-in screen [:layers ln])
(update-fn! assoc-in [[:layers ln] (split-layer screen ln)])))
(when camera (.setView renderer camera))
(let [^SpriteBatch batch (.getSpriteBatch renderer)]
(let [^Batch batch (.getSpriteBatch renderer)]
(.begin batch)
(doseq [entity (->> (map #(get-in screen [:layers %]) layer-names)
(apply concat entities)