safe improvement (with cursor)
This commit is contained in:
@@ -12,11 +12,14 @@
|
|||||||
[play-clj.g2d :refer :all]))
|
[play-clj.g2d :refer :all]))
|
||||||
|
|
||||||
(defn open-safe [entities]
|
(defn open-safe [entities]
|
||||||
|
(actions/play-animation entities :ego :start-squat :stop? false)
|
||||||
(screen! safe/safe-screen :show-screen
|
(screen! safe/safe-screen :show-screen
|
||||||
:success (actions/get-script entities
|
:success (actions/get-script entities
|
||||||
|
(actions/play-animation entities :ego :end-squat)
|
||||||
|
|
||||||
(if (actions/has-item? entities :recipe)
|
(if (actions/has-item? entities :recipe)
|
||||||
(do
|
(do
|
||||||
(actions/play-animation entities :ego :squat)
|
|
||||||
(actions/talk entities :ego "I already took everything interesting from there."))
|
(actions/talk entities :ego "I already took everything interesting from there."))
|
||||||
(do
|
(do
|
||||||
(actions/talk entities :ego "Yes! That worked.")
|
(actions/talk entities :ego "Yes! That worked.")
|
||||||
@@ -33,6 +36,7 @@
|
|||||||
(actions/give entities :mandrake)
|
(actions/give entities :mandrake)
|
||||||
(actions/talk entities :ego "Weird. It's some kind of root."))))
|
(actions/talk entities :ego "Weird. It's some kind of root."))))
|
||||||
:failure (actions/get-script entities
|
:failure (actions/get-script entities
|
||||||
|
(actions/play-animation entities :ego :end-squat)
|
||||||
(actions/talk entities :ego "I don't think that worked...")))
|
(actions/talk entities :ego "I don't think that worked...")))
|
||||||
(actions/update-state entities #(assoc % :active? false)))
|
(actions/update-state entities #(assoc % :active? false)))
|
||||||
|
|
||||||
|
|||||||
@@ -937,10 +937,10 @@ void main()
|
|||||||
layers (get-layers entities)
|
layers (get-layers entities)
|
||||||
all-entities (concat (vals entities) layers (vals (get-in entities [:room :entities])))]
|
all-entities (concat (vals entities) layers (vals (get-in entities [:room :entities])))]
|
||||||
(screen! fade-screen :update-fade :opacity (get-in entities [:fade :opacity]))
|
(screen! fade-screen :update-fade :opacity (get-in entities [:fade :opacity]))
|
||||||
#_(doseq [e (sort-by :baseline all-entities)]
|
(doseq [m (vals (get-in entities [:musics]))]
|
||||||
(if (:parallax e)
|
(when m
|
||||||
(render-parallax screen (get-rendered entities e))
|
(music! m :set-volume (utils/current-music-volume (get-in entities [:volume :value])))))
|
||||||
(render! screen [(get-rendered entities e)]))))
|
nil)
|
||||||
(let [entities (fade-in-first-time-if-necessary screen entities)
|
(let [entities (fade-in-first-time-if-necessary screen entities)
|
||||||
entities (utils/apply-tweens screen entities (:tweens entities))
|
entities (utils/apply-tweens screen entities (:tweens entities))
|
||||||
entities (update-cursor screen entities)
|
entities (update-cursor screen entities)
|
||||||
|
|||||||
@@ -256,7 +256,9 @@
|
|||||||
|
|
||||||
|
|
||||||
(not (get-in entities [:state :active?]))
|
(not (get-in entities [:state :active?]))
|
||||||
entities
|
(-> entities
|
||||||
|
(assoc-in [:cursor :override] nil)
|
||||||
|
(assoc-in [:cursor :active] false))
|
||||||
|
|
||||||
(is-unstoppable-script-running screen entities)
|
(is-unstoppable-script-running screen entities)
|
||||||
(-> entities
|
(-> entities
|
||||||
|
|||||||
Reference in New Issue
Block a user