This commit is contained in:
Bryce Covert
2015-09-11 23:47:18 -07:00
parent 4d14cac8d9
commit e2f08801b3
31 changed files with 2700 additions and 195 deletions

View File

@@ -53,6 +53,11 @@
(.putString "save-1" (pr-str (entities :state)))
.flush))
(defn get-texture [path]
(let [atlas-name (str/replace path #".png" "")
atlas (texture-atlas "packed/pack.atlas")]
(texture (texture-atlas! atlas :find-region atlas-name))))
(defn has-save? []
(-> (.getPreferences (Gdx/app) "ticks-tales-saves")
(.contains "save-1")))
@@ -140,7 +145,7 @@
(defn make-bird [screen p]
(let [bird-sheet (texture! (texture "outside-castle/bird.png") :split 1 2)
(let [bird-sheet (texture! (get-texture "outside-castle/bird.png") :split 1 2)
bird-stand (animation 0.15 (for [i [0 1]]
(aget bird-sheet 0 i)))]
(assoc (animation->texture screen bird-stand)