animation for fire mint.

This commit is contained in:
2014-11-09 10:49:19 -08:00
parent 86d1f7273d
commit 0b27e1642d
17 changed files with 75 additions and 7 deletions

View File

@@ -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)]