More sounds.

This commit is contained in:
Bryce Covert
2018-02-11 20:03:43 -08:00
parent 1c6f61c5d2
commit fc57a0b36e
3 changed files with 27 additions and 10 deletions

View File

@@ -843,7 +843,6 @@
(defn glad [entities]
(actions/run-action entities
(begin [this screen entities]
(println "ORIGIN" (get-in entities [:room :entities :ego :origin-x]))
(let [current-y (get-in entities [:room :entities :ego :y])
to-y (+ current-y 15)]
(-> entities

View File

@@ -391,6 +391,10 @@
(defn jump-away [entities]
(Thread/sleep 500)
(actions/play-sound entities
(get-in @entities [:room :entities :ego :drop-sound])
0.2
false)
(actions/run-action entities
(begin [this screen entities]
@@ -428,6 +432,8 @@
(-> e
(assoc-in [:room :entities :falling-bg :opacity] 1)
(assoc-in [:room :entities :sword-spin :opacity] 1))))
(actions/play-sound entities :swoosh 0.5)
(Thread/sleep 2000))
(defn show-big-bloodclot [entities time]
@@ -442,6 +448,10 @@
(defn fall-in [entities]
(Thread/sleep 1500)
(actions/play-sound entities
(get-in @entities [:room :entities :ego :drop-sound])
0.2
false)
(actions/run-action entities
(begin [this screen entities]
@@ -467,8 +477,8 @@
(assoc-in [:room :entities :falling-bg :opacity] 1)
(assoc-in [:room :entities :falling-ego :opacity] 1))))
(actions/play-sound entities :falling-ego 0.2)
(Thread/sleep 4000)
(actions/play-sound entities :falling-ego 0.1)
(Thread/sleep 3700)
(show-big-bloodclot entities 1000)
@@ -482,6 +492,7 @@
(Thread/sleep 2000))
(defn do-win [entities won?]
(Thread/sleep 1000)
(actions/fade entities 1.0 (fn [e]
(-> e
(assoc-in [:room :entities :penultimate :opacity] 1)
@@ -521,10 +532,11 @@
(show-big-bloodclot entities 0)
(Thread/sleep 1000)
(actions/play-sound entities :impact 0.5)
(actions/update-entities entities (fn [e]
(actions/update-entities entities (fn [s e]
(-> e
(update-in [:room :entities :bloodclot-swallow-top] #(actions/start-animation % :uhoh))
(update-in [:room :entities :bloodclot-swallow-bottom] #(actions/start-animation % :uhoh)))))
(update-in [:room :entities :bloodclot-swallow-top] #(actions/start-animation s % :uhoh))
(update-in [:room :entities :bloodclot-swallow-bottom] #(actions/start-animation s % :uhoh))))
:use-screen? true)
(Thread/sleep 2000)
(actions/play-sound entities :explode-sound 0.5)
@@ -544,7 +556,7 @@
(actions/update-entities entities (fn [e] (update-in e [:cam ] assoc :paused? true :x 160 :y 120)))
(actions/transition-background entities :space [55 80]
:time 4.0
:time 3.0
:transition-music? false
:type :white-fade
:between (fn [s e]
@@ -562,6 +574,8 @@
(update-in [:room :entities :grow-explode] (fn [g]
(particle-effect! g :reset)
(particle-effect! g :start)
(dotimes [_ 4]
(particle-effect! g :update 0.2))
g)))))

View File

@@ -155,8 +155,8 @@
bloodclot-swallow-bottom (utils/make-anim-seq atlas "bloodclot-swallow-bottom" [116 83] 0.2 (concat [0 0 0 0 0 0] (range 3) (repeat 100 2)))
bloodclot-swallow-top (utils/make-anim-seq atlas "bloodclot-swallow-top" [116 83] 0.2 (concat [0 0 0 0 0 0] (range 3) (repeat 100 2)))
bloodclot-swallow-bottom-uhoh (utils/make-anim-seq atlas "bloodclot-swallow-bottom" [116 83] 0.4 [0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ])
bloodclot-swallow-top-uhoh (utils/make-anim-seq atlas "bloodclot-swallow-top" [116 83] 0.4 [0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3])
bloodclot-swallow-bottom-uhoh (utils/make-anim-seq atlas "bloodclot-swallow-bottom" [116 83] 0.3 [2 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3])
bloodclot-swallow-top-uhoh (utils/make-anim-seq atlas "bloodclot-swallow-top" [116 83] 0.3 [2 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3])
falling-ego (utils/make-anim-seq atlas "falling-ego" [40 72] 0.2 (range 4))
hearts (into {}
(for [x (range 5)]
@@ -178,7 +178,7 @@
:interactions {}
:layers [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0 :scale-x 1 :scale-y 1)]
:update-fn trigger-tongue
:ego-hearts 1
:ego-hearts 2
:tongue-hearts 5
:sounds {:swoosh (utils/load-sound "tongue-fight/swoosh.ogg")
:big-swoosh (utils/load-sound "tongue-fight/big-swoosh.ogg")
@@ -338,11 +338,15 @@
:windup tongue-windup
:idle tongue-idle
:attack tongue-attack
:hit-sound (utils/load-sound "georgia/kick.ogg")
:slice-sound (utils/load-sound "tongue-fight/impact.ogg")
:attack-hit tongue-attack-hit
:anim-merges {tongue-idle {:origin-x 23 :origin-y 10}
tongue-windup {:origin-x 23 :origin-y 10}
tongue-attack {:origin-x 90 :origin-y 10}
tongue-attack-hit {:origin-x 100 :origin-y 10}}
:anim-sound-frames {tongue-attack {1 [:hit-sound (constantly 0.6)]}
tongue-attack-hit {1 [:slice-sound (constantly 0.6)]}}
:anim-start 0
:state :idle
:script (actions/get-script