larger safe screen
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 673 KiB After Width: | Height: | Size: 679 KiB |
|
Before Width: | Height: | Size: 610 KiB After Width: | Height: | Size: 603 KiB |
|
Before Width: | Height: | Size: 418 KiB After Width: | Height: | Size: 409 KiB |
@@ -15,7 +15,7 @@
|
||||
InputMultiplexer InputProcessor Net Preferences Screen]))
|
||||
|
||||
|
||||
(def start-x 60)
|
||||
(def start-x 35)
|
||||
(def start-y 83)
|
||||
|
||||
(defn close [entities]
|
||||
@@ -27,17 +27,17 @@
|
||||
(assoc :start-showing? false)))
|
||||
|
||||
(defn button-box [x y]
|
||||
(zone/box (+ start-x x) (+ start-y y) (+ start-x x 16) (+ start-y y 20)))
|
||||
(zone/box (+ start-x x) (+ start-y y) (+ start-x x 30) (+ start-y y 36)))
|
||||
|
||||
(defn get-button [[x y]]
|
||||
(first (filter (fn [{:keys [in?] :as button}]
|
||||
(when (in? x y)
|
||||
button))
|
||||
[{:in? (button-box 9 13) :sound (utils/load-sound "inside-house/safe-1.ogg") :id 1 }
|
||||
{:in? (button-box 29 13) :sound (utils/load-sound "inside-house/safe-2.ogg") :id 2}
|
||||
{:in? (button-box 49 13) :sound (utils/load-sound "inside-house/safe-3.ogg") :id 3}
|
||||
{:in? (button-box 70 13) :sound (utils/load-sound "inside-house/safe-4.ogg") :id 4}
|
||||
{:in? (button-box 91 13) :sound (utils/load-sound "inside-house/safe-5.ogg") :id 5}])))
|
||||
[{:in? (button-box 6 16) :sound (utils/load-sound "inside-house/safe-1.ogg") :id 1 }
|
||||
{:in? (button-box 43 16) :sound (utils/load-sound "inside-house/safe-2.ogg") :id 2}
|
||||
{:in? (button-box 76 16) :sound (utils/load-sound "inside-house/safe-3.ogg") :id 3}
|
||||
{:in? (button-box 118 16) :sound (utils/load-sound "inside-house/safe-4.ogg") :id 4}
|
||||
{:in? (button-box 155 16) :sound (utils/load-sound "inside-house/safe-5.ogg") :id 5}])))
|
||||
|
||||
(defscreen safe-screen
|
||||
:on-show
|
||||
@@ -54,8 +54,8 @@
|
||||
:safe (assoc (utils/get-texture "inside-house/safe-screen.png") :x start-x :y start-y)
|
||||
:entered-keys (doall (for [i (range 5)]
|
||||
(assoc inputed-key
|
||||
:x (+ start-x 10 (* i 12))
|
||||
:y (+ start-y 56))))
|
||||
:x (+ start-x 12 (* i 12))
|
||||
:y (+ start-y 68))))
|
||||
:shown? false}))
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
:else
|
||||
new-state)))
|
||||
(if (or (< x start-x)
|
||||
(> x (+ start-x 200))
|
||||
(> x (+ start-x 250))
|
||||
(< y start-y)
|
||||
(> y (+ start-y 75)))
|
||||
(> y (+ start-y 100)))
|
||||
(do
|
||||
(sound! (utils/load-sound "inside-house/close-safe.ogg") :play (utils/current-sound-volume 0.3))
|
||||
(close entities)))))))
|
||||
|
||||