Merge branch 'master' into background_scripts
This commit is contained in:
@@ -66,11 +66,7 @@
|
|||||||
(not (actions/has-item? entities :money))))
|
(not (actions/has-item? entities :money))))
|
||||||
|
|
||||||
(defn walk-to-sheep [entities]
|
(defn walk-to-sheep [entities]
|
||||||
(actions/walk-to entities :ego [154 133] :skip-type :end)
|
(actions/walk-to entities :ego [119 134] :skip-type :end))
|
||||||
(actions/walk-straight-to entities :ego [119 134] :update-baseline? false))
|
|
||||||
|
|
||||||
(defn leave-sheep [entities]
|
|
||||||
(actions/walk-straight-to entities :ego [154 133] :update-baseline? false))
|
|
||||||
|
|
||||||
(defn magic [entities]
|
(defn magic [entities]
|
||||||
(actions/run-action entities
|
(actions/run-action entities
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
entities)
|
entities)
|
||||||
|
|
||||||
:show-screen (fn [{:keys [success failure]} [entities]]
|
:show-screen (fn [{:keys [success failure]} [entities]]
|
||||||
(sound! (utils/load-sound "inside-house/open-safe.ogg") :play (utils/current-sound-volume))
|
(sound! (utils/load-sound "inside-house/open-safe.ogg") :play (utils/current-sound-volume 0.3))
|
||||||
(assoc entities
|
(assoc entities
|
||||||
:shown? true
|
:shown? true
|
||||||
:button-choices []
|
:button-choices []
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
(when (:shown? entities)
|
(when (:shown? entities)
|
||||||
(let [[x y] (utils/unproject screen)]
|
(let [[x y] (utils/unproject screen)]
|
||||||
(if-let [button (get-button [x y])]
|
(if-let [button (get-button [x y])]
|
||||||
(do (sound! (:sound button) :play (utils/current-sound-volume))
|
(do (sound! (:sound button) :play (utils/current-sound-volume 0.3))
|
||||||
(let [new-state (update-in entities [:button-choices] #(conj % (:id button)))]
|
(let [new-state (update-in entities [:button-choices] #(conj % (:id button)))]
|
||||||
|
|
||||||
(cond (= [4 2 1 5 3] (:button-choices new-state))
|
(cond (= [4 2 1 5 3] (:button-choices new-state))
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
(< y start-y)
|
(< y start-y)
|
||||||
(> y (+ start-y 75)))
|
(> y (+ start-y 75)))
|
||||||
(do
|
(do
|
||||||
(sound! (utils/load-sound "inside-house/close-safe.ogg") :play (utils/current-sound-volume))
|
(sound! (utils/load-sound "inside-house/close-safe.ogg") :play (utils/current-sound-volume 0.3))
|
||||||
(close entities)))))))
|
(close entities)))))))
|
||||||
|
|
||||||
:on-resize (fn [{:keys [width height viewport]} entities]
|
:on-resize (fn [{:keys [width height viewport]} entities]
|
||||||
|
|||||||
Reference in New Issue
Block a user