all rooms now!
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
(defn make-night [entities]
|
||||
entities)
|
||||
|
||||
(defn make-coin-flip [screen]
|
||||
(let [coin-flip (utils/make-anim "castle-gate/coinflip.png" [10 10] 0.05 (range 5))]
|
||||
(defn make-coin-flip [screen atlas]
|
||||
(let [coin-flip (utils/make-anim atlas "coinflip" [10 10] 0.05 (range 5))]
|
||||
(assoc (animation->texture screen coin-flip)
|
||||
:x 212 :y 114 :baseline 151
|
||||
:opacity 0.0
|
||||
@@ -40,8 +40,8 @@
|
||||
:walk coin-flip
|
||||
:coinflip coin-flip)))
|
||||
|
||||
(defn make-goon-1 [screen]
|
||||
(let [stand (utils/make-anim "castle-gate/goon-1.png" [13 33] 0.21 [0 0 0 0 0 0 0 0 0 1])]
|
||||
(defn make-goon-1 [screen atlas]
|
||||
(let [stand (utils/make-anim atlas "goon-1" [13 33] 0.21 [0 0 0 0 0 0 0 0 0 1])]
|
||||
(assoc (animation->texture screen stand)
|
||||
:x 244 :y 102 :baseline 138
|
||||
:label "Goon"
|
||||
@@ -53,12 +53,13 @@
|
||||
:anim-start 0
|
||||
:stand stand)))
|
||||
|
||||
(defn make-goon-2 [screen]
|
||||
(let [stand (utils/make-anim "castle-gate/goon-2.png" [12 32] 0.175 [0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
talk (utils/make-anim "castle-gate/goon-2-talk.png" [12 32] 0.175 (range 2))
|
||||
flip (utils/make-anim "castle-gate/goon-2-flip.png" [12 32] 0.05 [1 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ])
|
||||
search (utils/make-anim "castle-gate/goon-2-search.png" [24 32] 0.3 [0 1 2 3 2 3 2 1 4 5 6 5 6 7 6 7 6 7 6 1 0])
|
||||
walk (utils/flip (utils/make-anim "castle-gate/goon-2-walk.png" [24 34] 0.075 (range 7)))]
|
||||
(defn make-goon-2 [screen atlas]
|
||||
(let [
|
||||
stand (utils/make-anim atlas "goon-2" [12 32] 0.175 [0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
talk (utils/make-anim atlas "goon-2-talk" [12 32] 0.175 (range 2))
|
||||
flip (utils/make-anim atlas "goon-2-flip" [12 32] 0.05 [1 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ])
|
||||
search (utils/make-anim atlas "goon-2-search" [24 32] 0.3 [0 1 2 3 2 3 2 1 4 5 6 5 6 7 6 7 6 7 6 1 0])
|
||||
walk (utils/flip (utils/make-anim atlas "goon-2-walk" [24 34] 0.075 (range 7)))]
|
||||
(assoc (animation->texture screen stand)
|
||||
:x 214 :y 102 :baseline 151
|
||||
:scale-x 1.4
|
||||
@@ -197,9 +198,11 @@
|
||||
(sign-note entities))}})
|
||||
|
||||
(defn make [screen]
|
||||
(let [throw-walkie (utils/make-anim-seq "castle-gate/throw-walkie" [205 136] 0.1 (flatten [(repeat 55 0) (range 9) (repeat 55 8)]))
|
||||
walkie-visible (animation 1.0 [(utils/get-texture "castle-gate/throw-walkie-9.png")])
|
||||
walkie-invisible (animation 1.0 [(utils/get-texture "castle-gate/throw-walkie-1.png")])]
|
||||
(let [[screen atlas] (utils/acquire-atlas screen "packed/castle-gate.atlas")
|
||||
[screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas")
|
||||
throw-walkie (utils/make-anim-seq atlas "throw-walkie" [205 136] 0.1 (flatten [(repeat 55 0) (range 9) (repeat 55 8)]))
|
||||
walkie-visible (animation 1.0 [(utils/atlas->texture atlas "throw-walkie" 8)])
|
||||
walkie-invisible (animation 1.0 [(utils/atlas->texture atlas "throw-walkie" 0)])]
|
||||
(rooms/make :music {:day :town-2 :night :night}
|
||||
:name "Castle gate"
|
||||
:timers {:taunt [1.0 6.0 flip-coin]}
|
||||
@@ -234,15 +237,15 @@
|
||||
(actions/walk-straight-to entities :ego [285 71]))}}
|
||||
:note (make-note)}
|
||||
|
||||
:layers {:day [(assoc (utils/get-texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]
|
||||
:night [(assoc (utils/get-texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]}
|
||||
:entities {:frankie (common/make-frankie screen)
|
||||
:goon-1 (make-goon-1 screen)
|
||||
:goon-2 (make-goon-2 screen)
|
||||
:layers {:day [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/atlas->texture atlas "overlay") :x 0 :y 0 :baseline 240)]
|
||||
:night [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/atlas->texture atlas "overlay") :x 0 :y 0 :baseline 240)]}
|
||||
:entities {:frankie (common/make-frankie screen global-atlas)
|
||||
:goon-1 (make-goon-1 screen atlas)
|
||||
:goon-2 (make-goon-2 screen atlas)
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:coin-flip (make-coin-flip screen)
|
||||
:coin-flip (make-coin-flip screen atlas)
|
||||
}
|
||||
:walkie-talkies (rooms/make-entity :walkie-talkies
|
||||
(assoc (animation->texture screen walkie-visible)
|
||||
|
||||
Reference in New Issue
Block a user