This commit is contained in:
2015-03-10 17:00:41 -07:00
12 changed files with 22 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
[clojure.set :as set]
[clojure.string :as str]
[play-clj.core :refer :all]
[play-clj.math :refer :all]
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
@@ -29,8 +30,21 @@
(defn make [screen]
(rooms/make :music :town-1
:interactions {}
:layers [(assoc (texture "dream/background.png") :x 0 :y 0 :baseline 0)]
:entities {:clouds (assoc (particle-effect "dream/cloudy2") :x 160 :y 120 :baseline 240)}
:layers [(assoc (texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1)
(assoc (texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1)
(assoc (texture "dream/cliff.png") :x 50 :y 133 :baseline 1 :parallax 0.6 :scale-x 1.2 :scale-y 1.2)
(assoc (texture "dream/background.png") :x 0 :y 0 :baseline 2)
(assoc (texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0)
(assoc (texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)]
:entities {:clouds (assoc (particle-effect "dream/cloudy2") :x 160 :y 120 :baseline 241)
:broom (assoc (texture "dream/broom.png") :x 286 :y 122
:path (catmull-rom-spline (map #(apply vector-2* %) [[286 122] [286 128]]) true)
:update-fn (partial utils/update-path-location 0.30)
:baseline 240)
:shovel (assoc (texture "dream/shovel.png") :x 33 :y 122
:path (catmull-rom-spline (map #(apply vector-2* %) [[22 122] [22 128]]) true)
:update-fn (partial utils/update-path-location 0.33)
:baseline 240)}
:collision "dream/collision.png"
:scale-fn (constantly 1.5)
:start-pos [140 55]))