it all works, rather smoothly too.

This commit is contained in:
Bryce Covert
2017-05-29 17:32:21 -07:00
parent 03cba14c2a
commit 42067c1080
19 changed files with 206 additions and 217 deletions

View File

@@ -242,9 +242,8 @@
(actions/walk-straight-to entities :ego [140 85] :face :right :update-baseline? false)
(actions/add-entity entities :blank (get-in @entities [:room :blank])))}})
(defn make [screen]
(let [[screen atlas] (utils/acquire-atlas screen "packed/cat-tree.atlas")
cat-stand-sheet (texture! (utils/atlas->texture atlas "cat-stand") :split 22 10)
(defn make [screen atlas global-atlas]
(let [cat-stand-sheet (texture! (utils/atlas->texture atlas "cat-stand") :split 22 10)
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
(aget cat-stand-sheet 0 i)))
cat-walk (animation 0.2 [(utils/atlas->texture atlas "pounce")])