more progress on detail.

This commit is contained in:
2014-12-13 13:48:56 -08:00
parent f07ca7579f
commit 3364d2febb
6 changed files with 22 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

View File

@@ -18,5 +18,9 @@
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -40,14 +40,20 @@
:on-show
(fn [screen entities]
(update! screen :renderer (stage) :camera (orthographic))
{:fade (assoc (texture "black.png")
:scale-x 80
:scale-y 80
:opacity 0.7)
:safe (assoc (texture "inside-house/safe-screen.png") :x start-x :y start-y)
:start-showing? false
:shown? false})
(let [inputed-key (texture "inside-house/inputed-key.png")]
{:fade (assoc (texture "black.png")
:scale-x 80
:scale-y 80
:opacity 0.7)
:safe (assoc (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))))
:start-showing? false
:shown? false}))
:on-render
(fn [screen [entities]]
(let [entities (if (:start-showing? entities)
@@ -57,7 +63,8 @@
entities)]
(when (:shown? entities)
(render! screen [(:fade entities) (:safe entities)]))
(render! screen [(:fade entities) (:safe entities)])
(render! screen (take (count (:button-choices entities)) (:entered-keys entities))))
entities))
:show-screen (fn [{:keys [success failure]} [entities]]
@@ -76,6 +83,7 @@
(if-let [button (get-button [x y])]
(do (sound! (:sound button) :play)
(let [new-state (update-in entities [:button-choices] #(conj % (:id button)))]
(cond (= [4 2 1 5 3] (:button-choices new-state))
(do ((:success entities) (-> @(resolve 'advent.screens.scene/scene)
:entities

View File

@@ -99,9 +99,9 @@
(texture (aget stand-sheet 0 i))))
talk-anim (animation 0.2 (for [i (range 8)]
(texture (aget talk-sheet 0 i))))
start-squat (animation 0.05 (for [i [0 1 2 3]]
start-squat (animation 0.05 (for [i [0 1 2 3 4]]
(texture (aget squat-sheet 0 i))))
end-squat (animation 0.05 (for [i [3 2 1 0]]
end-squat (animation 0.05 (for [i [4 3 2 1 0]]
(texture (aget squat-sheet 0 i))))
squat-anim (animation 0.05 (for [i [0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 2 1] ]
(texture (aget squat-sheet 0 i))))