animation for fire mint.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
[advent.utils :as utils]
|
||||
[clojure.core.async :refer [put! <! <!! >! >!! chan go thread take! alts!!]])
|
||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter]
|
||||
[com.badlogic.gdx.graphics.g2d TextureRegion]
|
||||
[com.badlogic.gdx.graphics.g2d TextureRegion Animation]
|
||||
[com.badlogic.gdx Screen]))
|
||||
|
||||
(defprotocol IAction
|
||||
@@ -42,10 +42,10 @@
|
||||
entity)))
|
||||
|
||||
(defn find-animation [entity anim]
|
||||
(if (keyword? anim)
|
||||
(if (instance? Animation anim)
|
||||
anim
|
||||
(or (get-in entity [(:facing entity) anim])
|
||||
(anim entity))
|
||||
anim))
|
||||
(get entity anim))))
|
||||
|
||||
(defn start-animation [screen entity anim]
|
||||
(let [new-anim (find-animation entity anim)]
|
||||
|
||||
Reference in New Issue
Block a user