sounds.
This commit is contained in:
BIN
desktop/resources/blink-other.ogg
Normal file
BIN
desktop/resources/blink-other.ogg
Normal file
Binary file not shown.
BIN
desktop/resources/blink-other.wav
Normal file
BIN
desktop/resources/blink-other.wav
Normal file
Binary file not shown.
BIN
desktop/resources/blink.ogg
Normal file
BIN
desktop/resources/blink.ogg
Normal file
Binary file not shown.
BIN
desktop/resources/blink.wav
Normal file
BIN
desktop/resources/blink.wav
Normal file
Binary file not shown.
BIN
desktop/resources/outside-castle/scratch.ogg
Normal file
BIN
desktop/resources/outside-castle/scratch.ogg
Normal file
Binary file not shown.
BIN
desktop/resources/outside-castle/scratch.wav
Normal file
BIN
desktop/resources/outside-castle/scratch.wav
Normal file
Binary file not shown.
BIN
desktop/resources/outside-castle/scratch_1.wav
Normal file
BIN
desktop/resources/outside-castle/scratch_1.wav
Normal file
Binary file not shown.
@@ -323,6 +323,7 @@
|
|||||||
:game-player (assoc (texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191
|
:game-player (assoc (texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191
|
||||||
`:talk-color (color 1.0 0.3 0.2 1.0)
|
`:talk-color (color 1.0 0.3 0.2 1.0)
|
||||||
:script (actions/get-script entities (do-game-player-dialogue entities))
|
:script (actions/get-script entities (do-game-player-dialogue entities))
|
||||||
|
:blink (sound "blink-other.ogg")
|
||||||
:scripts #(condp = %
|
:scripts #(condp = %
|
||||||
:wool (actions/get-script entities
|
:wool (actions/get-script entities
|
||||||
(walk-to-player entities)
|
(walk-to-player entities)
|
||||||
@@ -371,6 +372,7 @@
|
|||||||
:anim game-player-stand
|
:anim game-player-stand
|
||||||
:anim-start 0
|
:anim-start 0
|
||||||
:stand game-player-stand
|
:stand game-player-stand
|
||||||
|
:anim-sound-frames {game-player-stand {11 [:blink 0.3] }}
|
||||||
:flex game-player-flex
|
:flex game-player-flex
|
||||||
:talk game-player-talk)}
|
:talk game-player-talk)}
|
||||||
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)
|
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)
|
||||||
|
|||||||
@@ -295,8 +295,9 @@
|
|||||||
:sunrise [(assoc (texture "outside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
|
:sunrise [(assoc (texture "outside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
|
||||||
:entities {:peddler (actions/start-animation screen
|
:entities {:peddler (actions/start-animation screen
|
||||||
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
||||||
:anim-sound-frames {peddler-stand {23 [:scratch 1.0]}}
|
:anim-sound-frames {peddler-stand {23 [:scratch 1.0]}
|
||||||
:scratch (sound "scratch.ogg")
|
peddler-talk {23 [:scratch 1.0]}}
|
||||||
|
:scratch (sound "outside-castle/scratch.ogg")
|
||||||
:talk peddler-talk :stand peddler-stand
|
:talk peddler-talk :stand peddler-stand
|
||||||
:talk-color (color 1.0 0.9 0.4 1.0)
|
:talk-color (color 1.0 0.9 0.4 1.0)
|
||||||
:script (actions/get-script
|
:script (actions/get-script
|
||||||
|
|||||||
@@ -135,6 +135,7 @@
|
|||||||
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
|
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
|
||||||
walk-right (animation 0.075 (for [i (range 8)]
|
walk-right (animation 0.075 (for [i (range 8)]
|
||||||
(texture (aget player-sheet 0 i))))
|
(texture (aget player-sheet 0 i))))
|
||||||
|
|
||||||
stand-anim (animation 0.1 (for [i (flatten [(repeat 6 [(repeat 10 0) (repeat 3 1) (repeat 20 0)]) 3 4 5 5 5 6 5 6 5 6 5 4 3 ])]
|
stand-anim (animation 0.1 (for [i (flatten [(repeat 6 [(repeat 10 0) (repeat 3 1) (repeat 20 0)]) 3 4 5 5 5 6 5 6 5 6 5 4 3 ])]
|
||||||
(texture (aget stand-sheet 0 i))))
|
(texture (aget stand-sheet 0 i))))
|
||||||
reach-up (animation 0.1 (for [i [0 3 4 5]]
|
reach-up (animation 0.1 (for [i [0 3 4 5]]
|
||||||
@@ -247,6 +248,7 @@
|
|||||||
:scaled true
|
:scaled true
|
||||||
:step-sound-1 (sound "ego/step-1.ogg")
|
:step-sound-1 (sound "ego/step-1.ogg")
|
||||||
:step-sound-2 (sound "ego/step-2.ogg")
|
:step-sound-2 (sound "ego/step-2.ogg")
|
||||||
|
:blink (sound "blink.ogg")
|
||||||
:scale-x start-scale
|
:scale-x start-scale
|
||||||
:scale-y start-scale
|
:scale-y start-scale
|
||||||
:talk-color (color 0.6 1.0 1.0 1.0)
|
:talk-color (color 0.6 1.0 1.0 1.0)
|
||||||
@@ -298,7 +300,23 @@
|
|||||||
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [:step-sound-1 1.0]
|
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [:step-sound-1 1.0]
|
||||||
6 [:step-sound-2 0.8]}
|
6 [:step-sound-2 0.8]}
|
||||||
(get-in ego [:right :walk]) {2 [:step-sound-1 1.0]
|
(get-in ego [:right :walk]) {2 [:step-sound-1 1.0]
|
||||||
6 [:step-sound-2 0.8]}}
|
6 [:step-sound-2 0.8]}
|
||||||
|
|
||||||
|
(get-in ego [:left :talk] ) {2 [:blink 0.2]}
|
||||||
|
(get-in ego [:right :talk] ) {2 [:blink 0.2]}
|
||||||
|
|
||||||
|
(get-in ego [:left :stand]) {11 [:blink 0.20]
|
||||||
|
44 [:blink 0.20]
|
||||||
|
77 [:blink 0.20]
|
||||||
|
110 [:blink 0.20]
|
||||||
|
143 [:blink 0.20]
|
||||||
|
176 [:blink 0.20]}
|
||||||
|
(get-in ego [:right :stand]) {11 [:blink 0.20]
|
||||||
|
44 [:blink 0.20]
|
||||||
|
77 [:blink 0.20]
|
||||||
|
110 [:blink 0.20]
|
||||||
|
143 [:blink 0.20]
|
||||||
|
176 [:blink 0.20]}}
|
||||||
:anim-merges {(get-in ego [:right :shock]) {:origin-x 15}
|
:anim-merges {(get-in ego [:right :shock]) {:origin-x 15}
|
||||||
:default {:origin-x 9}})]
|
:default {:origin-x 9}})]
|
||||||
(actions/start-animation screen
|
(actions/start-animation screen
|
||||||
@@ -374,6 +392,7 @@
|
|||||||
(when (and (not= previous-frame-index current-frame-index)
|
(when (and (not= previous-frame-index current-frame-index)
|
||||||
((set (keys anim-sound-frames)) anim))
|
((set (keys anim-sound-frames)) anim))
|
||||||
(when-let [[snd vol-scale] (get-in anim-sound-frames [anim current-frame-index])]
|
(when-let [[snd vol-scale] (get-in anim-sound-frames [anim current-frame-index])]
|
||||||
|
|
||||||
(let [vol (if (= target :ego)
|
(let [vol (if (= target :ego)
|
||||||
(* (/ (get-in entities [:ego :scale-x]) 1.5) 0.75)
|
(* (/ (get-in entities [:ego :scale-x]) 1.5) 0.75)
|
||||||
(max 0.0
|
(max 0.0
|
||||||
@@ -508,7 +527,9 @@
|
|||||||
(set! (.. (:value (:cam entities)) position x) (:x (:cam entities) 160.0))
|
(set! (.. (:value (:cam entities)) position x) (:x (:cam entities) 160.0))
|
||||||
(set! (.. (:value (:cam entities)) position y) (:y (:cam entities) 120.0))
|
(set! (.. (:value (:cam entities)) position y) (:y (:cam entities) 120.0))
|
||||||
|
|
||||||
(play-key-sounds (get-in entities [:room :entities]))
|
(when (= (get-in entities [:fade :opacity])
|
||||||
|
0.0)
|
||||||
|
(play-key-sounds (get-in entities [:room :entities])))
|
||||||
(doseq [m (vals (get-in entities [:musics]))]
|
(doseq [m (vals (get-in entities [:musics]))]
|
||||||
(when m
|
(when m
|
||||||
(music! m :set-volume (get-in entities [:volume :value]))))
|
(music! m :set-volume (get-in entities [:volume :value]))))
|
||||||
|
|||||||
Reference in New Issue
Block a user