closer to supporting toss.
This commit is contained in:
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user