progress on scene.
This commit is contained in:
@@ -14,16 +14,31 @@
|
||||
[play-clj.math :refer :all]
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn bloodclot-talk-script [entities]
|
||||
(actions/talk entities :ego "Let me down Bloodclot!" :anim :suspended-talk)
|
||||
(actions/do-dialogue entities :bloodclot-head "Not a chance."
|
||||
:bloodclot-head "It's dinnertime, runt."))
|
||||
|
||||
(defn make [screen]
|
||||
(rooms/make :music :fight
|
||||
:interactions {}
|
||||
:layers [(assoc (texture "held/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:entities {}
|
||||
:collision "held/collision.png"
|
||||
:scale-fn (constantly 1.5)
|
||||
:start-pos [113 120]
|
||||
:apply-state (fn [screen e]
|
||||
(-> e
|
||||
(assoc-in [:cam :paused? ] true)
|
||||
(update-in [:tweens] dissoc :cam-x :cam-y)
|
||||
(update-in [:room :entities :ego] #(actions/start-animation screen % :suspended))))))
|
||||
(let [bloodclot-talk (utils/make-anim "held/bloodclot-head.png" [114 82] 0.1 [0 1 2 1 0 3 3 0 1 2 1 0 3 4 5 6 5 3 3 1 2 1 3 3 3 3 3 0 0 0 7 8 7])
|
||||
bloodclot-stand (utils/make-anim "held/bloodclot-head.png" [114 82] 0.1 (flatten [(repeat 15 0) 7 8 7]))]
|
||||
(rooms/make :music :fight
|
||||
:interactions {}
|
||||
:layers [(assoc (texture "held/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:entities {:bloodclot-head (assoc (animation->texture screen bloodclot-stand)
|
||||
:x 211 :y 114 :baseline 240
|
||||
:origin-x 57 :origin-y 0
|
||||
:script (actions/get-script entities
|
||||
(bloodclot-talk-script entities))
|
||||
:stand bloodclot-stand
|
||||
:talk bloodclot-talk
|
||||
:anim bloodclot-stand
|
||||
:anim-start 0)}
|
||||
:collision "held/collision.png"
|
||||
:scale-fn (constantly 1.5)
|
||||
:start-pos [113 120]
|
||||
:apply-state (fn [screen e]
|
||||
(-> e
|
||||
(assoc-in [:cam :paused? ] true)
|
||||
(update-in [:tweens] dissoc :cam-x :cam-y)
|
||||
(update-in [:room :entities :ego] #(actions/start-animation screen % :suspended)))))))
|
||||
|
||||
Reference in New Issue
Block a user