closer to supporting toss.

This commit is contained in:
2015-05-07 21:26:07 -07:00
parent 983a4ac251
commit a791a85e35
14 changed files with 108 additions and 41 deletions

View File

@@ -117,10 +117,15 @@
(texture! frame :flip true false)
frame))))
(defn make-anim [file [w h] speed frames]
(defn split-texture [file [w h] frames]
(let [sheet (texture! (texture file) :split w h)]
(animation speed (for [i frames]
(aget sheet 0 i)))))
(for [i frames]
(aget sheet 0 i))))
(defn make-anim [file [w h] speed frames]
(animation speed (split-texture file [w h] frames)))
(defn make-bird [screen p]
(let [bird-sheet (texture! (texture "outside-castle/bird.png") :split 1 2)
bird-stand (animation 0.15 (for [i [0 1]]