supporting going around at night.
This commit is contained in:
BIN
desktop/resources/outside-jail/background-dark.png
Normal file
BIN
desktop/resources/outside-jail/background-dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -53,7 +53,8 @@
|
||||
:ego "He's the mightiest knight in all of Remington."
|
||||
:ego "If only I could be as strong as him one day."
|
||||
))}}
|
||||
:layers [(assoc (texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:layers {:day [(assoc (texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:night [(assoc (texture "outside-jail/background-dark.png") :x 0 :y 0 :baseline 0)]}
|
||||
:entities {:fountain (assoc (animation->texture screen fountain)
|
||||
:x 150 :y 126 :baseline 114
|
||||
:anim fountain
|
||||
|
||||
@@ -283,6 +283,12 @@
|
||||
(defn stop-sound [snd]
|
||||
(music! snd :stop))
|
||||
|
||||
(defn get-layers [entities]
|
||||
(let [layers (get-in entities [:room :layers])]
|
||||
(if (map? layers)
|
||||
((get-in entities [:state :time]) layers)
|
||||
layers)))
|
||||
|
||||
(defn make-music [r]
|
||||
(doto (music r) (music! :set-looping true)))
|
||||
|
||||
@@ -371,8 +377,9 @@
|
||||
[id ((:update-fn entity) screen entities entity)]
|
||||
[id entity])))))
|
||||
current-frame (get-in entities [:room :entities :ego :object])
|
||||
layers (get-layers entities)
|
||||
|
||||
all-entities (concat (vals entities) (get-in entities [:room :layers]) (vals (get-in entities [:room :entities])))]
|
||||
all-entities (concat (vals entities) layers (vals (get-in entities [:room :entities])))]
|
||||
(when (and (not= current-frame (get-in entities [:room :entities :ego :last-frame]))
|
||||
(or (= (get-in entities [:room :entities :ego :anim]) (get-in entities [:room :entities :ego :left :walk]))
|
||||
(= (get-in entities [:room :entities :ego :anim]) (get-in entities [:room :entities :ego :right :walk])))
|
||||
|
||||
Reference in New Issue
Block a user