all rooms now!
This commit is contained in:
@@ -18,39 +18,41 @@
|
||||
(:import [com.badlogic.gdx.graphics Color]))
|
||||
|
||||
(defn make [screen]
|
||||
(let [
|
||||
peddler-sheet (texture! (utils/get-texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||
(let [[screen atlas] (utils/acquire-atlas screen "packed/ending-castle.atlas")
|
||||
[screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas")
|
||||
|
||||
peddler-sheet (texture! (utils/atlas->texture atlas "peddler-talk" ) :split 18 36)
|
||||
peddler-stand (utils/flip (animation 0.2 (for [i (flatten [(repeat 8 0) 6 (repeat 8 0) 6 (repeat 5 0) 4 5 4 5 4 5])]
|
||||
(aget peddler-sheet 0 i))))
|
||||
warden-stand (utils/make-anim "ending-castle/warden-2.png" [21 41] 0.21 (flatten [(repeat 7 0) 1]))
|
||||
warden-stand (utils/make-anim atlas "warden-2" [21 41] 0.21 (flatten [(repeat 7 0) 1]))
|
||||
|
||||
game-player-stand (utils/make-anim "ending-castle/game-player.png" [14 39] 0.2 (flatten [(repeat 5 0) 1] ))
|
||||
game-player-stand (utils/make-anim atlas "game-player" [14 39] 0.2 (flatten [(repeat 5 0) 1] ))
|
||||
|
||||
ladder-guard-stand-1 (animation 0.1 [(utils/get-texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
ladder-guard-stand-2 (utils/flip (animation 0.1 [(utils/get-texture "inside-cafeteria/ladder-guard-2.png")]))
|
||||
grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
cat-stand (utils/make-anim "cat-tree/cat-stand.png" [22 10] 0.15 (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]))
|
||||
duke-stand (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 (flatten [(repeat 4 0) 1]))
|
||||
duke-talk (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [0 2 0 2 1 2])
|
||||
duke-reach (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [3 4 5 6])
|
||||
duke-reach-talk (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [6 7])
|
||||
duke-knight (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [8 9 10 9 8])
|
||||
ladder-guard-stand-1 (animation 0.1 [(utils/atlas->texture atlas "ladder-guard-2")])
|
||||
ladder-guard-stand-2 (utils/flip (animation 0.1 [(utils/atlas->texture atlas "ladder-guard-2")]))
|
||||
grandma-stand (utils/make-anim atlas "grandma" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
cat-stand (utils/make-anim atlas "cat-stand" [22 10] 0.15 (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]))
|
||||
duke-stand (utils/make-anim atlas "duke" [40 48] 0.23 (flatten [(repeat 4 0) 1]))
|
||||
duke-talk (utils/make-anim atlas "duke" [40 48] 0.23 [0 2 0 2 1 2])
|
||||
duke-reach (utils/make-anim atlas "duke" [40 48] 0.23 [3 4 5 6])
|
||||
duke-reach-talk (utils/make-anim atlas "duke" [40 48] 0.23 [6 7])
|
||||
duke-knight (utils/make-anim atlas "duke" [40 48] 0.23 [8 9 10 9 8])
|
||||
|
||||
georgia-stand (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [(repeat 20 0) 1 (repeat 10 0) 1]))
|
||||
georgia-hand-hold (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [(repeat 3 0) 3 4]))
|
||||
georgia-talk (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [0 2 0 2 0 1 0 0 2]))
|
||||
georgia-kick (utils/make-anim-seq "georgia/kick" [40 43] 0.1 (flatten [(repeat 10 0) (repeat 7 1) (repeat 7 2)
|
||||
georgia-stand (utils/make-anim atlas "georgia/stand" [20 43] 0.2 (flatten [(repeat 20 0) 1 (repeat 10 0) 1]))
|
||||
georgia-hand-hold (utils/make-anim atlas "georgia/stand" [20 43] 0.2 (flatten [(repeat 3 0) 3 4]))
|
||||
georgia-talk (utils/make-anim atlas "georgia/stand" [20 43] 0.2 (flatten [0 2 0 2 0 1 0 0 2]))
|
||||
georgia-kick (utils/make-anim-seq atlas "georgia/kick" [40 43] 0.1 (flatten [(repeat 10 0) (repeat 7 1) (repeat 7 2)
|
||||
3 4 5 6 7 8 9 10 11 12 13 (repeat 10 14)
|
||||
15 16 17 18 19 (repeat 10 0)]))
|
||||
frankie-fall (utils/make-anim-seq "ending-castle/frankie-fall" [40 35] 0.1 (flatten [(range 8) (repeat 20 7) 8 9 10 11 7]))
|
||||
frankie-down (utils/make-anim-seq "ending-castle/frankie-fall" [40 35] 0.1 [0])
|
||||
frankie-fall (utils/make-anim-seq atlas "frankie-fall" [40 35] 0.1 (flatten [(range 8) (repeat 20 7) 8 9 10 11 7]))
|
||||
frankie-down (utils/make-anim-seq atlas "frankie-fall" [40 35] 0.1 [0])
|
||||
scaler (utils/scaler-fn-with-baseline 20 1.3 1.30)]
|
||||
(rooms/make :music :dream
|
||||
:sounds {:cloud (utils/load-sound "ending-castle/cloud.ogg")}
|
||||
:name "Ending"
|
||||
:interactions {}
|
||||
:layers [(assoc (utils/get-texture "ending-castle/ending-castle2-assets/background.png") :x 0 :y 0 :origin-x 0 :origin-y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "ending-castle/ending-castle2-assets/foreground.png") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)]
|
||||
:layers [(assoc (utils/atlas->texture atlas "ending-castle2-assets/background") :x 0 :y 0 :origin-x 0 :origin-y 0 :baseline 0)
|
||||
(assoc (utils/atlas->texture atlas "ending-castle2-assets/foreground") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)]
|
||||
:apply-state (fn [screen e]
|
||||
(as-> e e
|
||||
(utils/play-sound! screen e :cloud (fn [e]
|
||||
@@ -70,14 +72,14 @@
|
||||
:stand georgia-stand
|
||||
:talk georgia-talk
|
||||
:kick georgia-kick
|
||||
:walk (utils/make-anim "georgia/walk.png" [20 43] 0.2 (range 8))
|
||||
:walk (utils/make-anim atlas "georgia/walk" [20 43] 0.2 (range 8))
|
||||
:hand-hold georgia-hand-hold
|
||||
:kick-sound (utils/load-sound "georgia/kick.ogg")
|
||||
:anim-sound-frames {georgia-kick {27 [:kick-sound (constantly 0.6)]}}
|
||||
:anim-merges {georgia-stand {:origin-x 10 :origin-y 1}
|
||||
:default {:origin-x 10 :origin-y 1}
|
||||
georgia-kick {:origin-x 19 :origin-y 0}}))
|
||||
:entities {:frankie (assoc (common/make-frankie screen)
|
||||
:entities {:frankie (assoc (common/make-frankie screen global-atlas)
|
||||
:x 28 :y 21 :baseline 200
|
||||
:fall frankie-fall
|
||||
:down frankie-down
|
||||
@@ -88,7 +90,7 @@
|
||||
:anim-merges {:default {:origin-x 12 :origin-y 0}
|
||||
frankie-fall {:origin-x 22 :origin-y 0}
|
||||
frankie-down {:origin-x 22 :origin-y 0}})
|
||||
:gandarf (assoc (common/make-wizard screen {:x 205 :y 400 :baseline 239})
|
||||
:gandarf (assoc (common/make-wizard screen global-atlas {:x 205 :y 400 :baseline 239})
|
||||
:update-fn (fn [screen entities gandarf]
|
||||
(assoc gandarf :y (or (get-in entities [:gandarf-cloud :y])
|
||||
(:y gandarf)))))
|
||||
@@ -119,22 +121,22 @@
|
||||
:scale-x 0.65
|
||||
:scale-y 0.65
|
||||
:scaled true)
|
||||
:crowd-left (assoc (utils/get-texture "ending-castle/crowd-left.png")
|
||||
:crowd-left (assoc (utils/atlas->texture atlas "crowd-left")
|
||||
:x 0 :y 0
|
||||
:scale-x 1.3
|
||||
:scale-y 1.3
|
||||
:baseline 239)
|
||||
:crowd-right (assoc (utils/get-texture "ending-castle/crowd-right.png")
|
||||
:crowd-right (assoc (utils/atlas->texture atlas "crowd-right")
|
||||
:x 196 :y 0
|
||||
:scale-x 1.3
|
||||
:scale-y 1.3
|
||||
:baseline 238)
|
||||
:guard-1 (assoc (utils/get-texture "ending-castle/guard-1.png")
|
||||
:guard-1 (assoc (utils/atlas->texture atlas "guard-1")
|
||||
:x 91 :y 73
|
||||
:scale-x 0.9
|
||||
:scale-y 0.9
|
||||
:baseline 140)
|
||||
:guard-2 (assoc (utils/get-texture "ending-castle/guard-2.png")
|
||||
:guard-2 (assoc (utils/atlas->texture atlas "guard-2")
|
||||
:x 182 :y 73
|
||||
:scale-x 0.9
|
||||
:scale-y 0.9
|
||||
|
||||
Reference in New Issue
Block a user