more progress on detail.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
desktop/resources/ego/squat.pxa/4.pxi
Normal file
BIN
desktop/resources/ego/squat.pxa/4.pxi
Normal file
Binary file not shown.
@@ -18,5 +18,9 @@
|
|||||||
<key>duration</key>
|
<key>duration</key>
|
||||||
<real>1</real>
|
<real>1</real>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>duration</key>
|
||||||
|
<real>1</real>
|
||||||
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
BIN
desktop/resources/inside-house/inputed-key.png
Normal file
BIN
desktop/resources/inside-house/inputed-key.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -40,14 +40,20 @@
|
|||||||
:on-show
|
:on-show
|
||||||
(fn [screen entities]
|
(fn [screen entities]
|
||||||
(update! screen :renderer (stage) :camera (orthographic))
|
(update! screen :renderer (stage) :camera (orthographic))
|
||||||
{:fade (assoc (texture "black.png")
|
(let [inputed-key (texture "inside-house/inputed-key.png")]
|
||||||
:scale-x 80
|
{:fade (assoc (texture "black.png")
|
||||||
:scale-y 80
|
:scale-x 80
|
||||||
:opacity 0.7)
|
:scale-y 80
|
||||||
:safe (assoc (texture "inside-house/safe-screen.png") :x start-x :y start-y)
|
:opacity 0.7)
|
||||||
:start-showing? false
|
:safe (assoc (texture "inside-house/safe-screen.png") :x start-x :y start-y)
|
||||||
:shown? false})
|
: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
|
:on-render
|
||||||
(fn [screen [entities]]
|
(fn [screen [entities]]
|
||||||
(let [entities (if (:start-showing? entities)
|
(let [entities (if (:start-showing? entities)
|
||||||
@@ -57,7 +63,8 @@
|
|||||||
entities)]
|
entities)]
|
||||||
|
|
||||||
(when (:shown? 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))
|
entities))
|
||||||
|
|
||||||
:show-screen (fn [{:keys [success failure]} [entities]]
|
:show-screen (fn [{:keys [success failure]} [entities]]
|
||||||
@@ -76,6 +83,7 @@
|
|||||||
(if-let [button (get-button [x y])]
|
(if-let [button (get-button [x y])]
|
||||||
(do (sound! (:sound button) :play)
|
(do (sound! (:sound button) :play)
|
||||||
(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))
|
||||||
(do ((:success entities) (-> @(resolve 'advent.screens.scene/scene)
|
(do ((:success entities) (-> @(resolve 'advent.screens.scene/scene)
|
||||||
:entities
|
:entities
|
||||||
|
|||||||
@@ -99,9 +99,9 @@
|
|||||||
(texture (aget stand-sheet 0 i))))
|
(texture (aget stand-sheet 0 i))))
|
||||||
talk-anim (animation 0.2 (for [i (range 8)]
|
talk-anim (animation 0.2 (for [i (range 8)]
|
||||||
(texture (aget talk-sheet 0 i))))
|
(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))))
|
(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))))
|
(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] ]
|
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))))
|
(texture (aget squat-sheet 0 i))))
|
||||||
|
|||||||
Reference in New Issue
Block a user