diff --git a/desktop/asset-work/ego/slingshot.ogg b/desktop/asset-work/ego/slingshot.ogg new file mode 100644 index 00000000..c6a40584 Binary files /dev/null and b/desktop/asset-work/ego/slingshot.ogg differ diff --git a/desktop/asset-work/ego/slingshot.wav b/desktop/asset-work/ego/slingshot.wav new file mode 100644 index 00000000..da5bf877 Binary files /dev/null and b/desktop/asset-work/ego/slingshot.wav differ diff --git a/desktop/resources/ego/slingshot.ogg b/desktop/resources/ego/slingshot.ogg new file mode 100644 index 00000000..c6a40584 Binary files /dev/null and b/desktop/resources/ego/slingshot.ogg differ diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index 32e2a4bb..89ebd595 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -353,6 +353,13 @@ (explode entities) (actions/play-animation entities :ego :standup) + (Thread/sleep 1000) + (actions/update-entities entities (fn [e] + (update-in e [:room :entities :ego] dissoc :stand-override :talk-override ))) + (actions/do-dialogue entities + :ego "Hey!" + :ego "I won!") + (actions/glad entities) (actions/walk-straight-to entities :ego [340 55]) (actions/run-action entities (begin [this screen entities] @@ -371,6 +378,7 @@ (Thread/sleep 2000) (actions/do-stop entities :ego :face :left) (actions/transition-background entities :ending [165 49] :time 4.0) + (actions/resume-camera entities) (actions/do-dialogue entities :duke "Ladies and gentlemen." :duke "As the Duke of Remington, I'm pleased to inform you..." diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index f4c7f02e..cfdcfb40 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -21,17 +21,17 @@ (actions/run-action entities (begin [this screen entities] (-> entities - (assoc-in [:tweens :dawn-r] (tween/tween :dawn-r screen [:time-profiles :default :r] :current 0.63 60.0 :entities entities)) - (assoc-in [:tweens :dawn-g] (tween/tween :dawn-g screen [:time-profiles :default :g] :current 0.36 60.0 :entities entities)) - (assoc-in [:tweens :dawn-b] (tween/tween :dawn-b screen [:time-profiles :default :b] :current 0.23 60.0 :entities entities)) - (assoc-in [:tweens :hue-amount-v] (tween/tween :hue-amount-v screen [:time-profiles :default :hue-amount] :current 0.0 60.0 :entities entities)) - (assoc-in [:tweens :multiply-amount-v] (tween/tween :multiply-amount-v screen [:time-profiles :default :multiply-amount] :current 0.0 60.0 :entities entities)) + (assoc-in [:tweens :dawn-r] (tween/tween :dawn-r screen [:time-profiles :default :r] :current 0.63 50.0 :entities entities)) + (assoc-in [:tweens :dawn-g] (tween/tween :dawn-g screen [:time-profiles :default :g] :current 0.36 50.0 :entities entities)) + (assoc-in [:tweens :dawn-b] (tween/tween :dawn-b screen [:time-profiles :default :b] :current 0.23 50.0 :entities entities)) + (assoc-in [:tweens :hue-amount-v] (tween/tween :hue-amount-v screen [:time-profiles :default :hue-amount] :current 0.0 50.0 :entities entities)) + (assoc-in [:tweens :multiply-amount-v] (tween/tween :multiply-amount-v screen [:time-profiles :default :multiply-amount] :current 0.0 50.0 :entities entities)) - (assoc-in [:tweens :dawn-r-s] (tween/tween :dawn-r-s screen [:time-profiles :sprite :r] :current 0.63 60.0 :entities entities)) - (assoc-in [:tweens :dawn-g-s] (tween/tween :dawn-g-s screen [:time-profiles :sprite :g] :current 0.36 60.0 :entities entities)) - (assoc-in [:tweens :dawn-b-s] (tween/tween :dawn-b-s screen [:time-profiles :sprite :b] :current 0.23 60.0 :entities entities)) - (assoc-in [:tweens :hue-amount-v-s] (tween/tween :hue-amount-v-s screen [:time-profiles :sprite :hue-amount] :current 0.0 60.0 :entities entities)) - (assoc-in [:tweens :multiply-amount-v-s] (tween/tween :multiply-amount-v-s screen [:time-profiles :sprite :multiply-amount] :current 0.0 60.0 :entities entities)))) + (assoc-in [:tweens :dawn-r-s] (tween/tween :dawn-r-s screen [:time-profiles :sprite :r] :current 0.63 50.0 :entities entities)) + (assoc-in [:tweens :dawn-g-s] (tween/tween :dawn-g-s screen [:time-profiles :sprite :g] :current 0.36 50.0 :entities entities)) + (assoc-in [:tweens :dawn-b-s] (tween/tween :dawn-b-s screen [:time-profiles :sprite :b] :current 0.23 50.0 :entities entities)) + (assoc-in [:tweens :hue-amount-v-s] (tween/tween :hue-amount-v-s screen [:time-profiles :sprite :hue-amount] :current 0.0 50.0 :entities entities)) + (assoc-in [:tweens :multiply-amount-v-s] (tween/tween :multiply-amount-v-s screen [:time-profiles :sprite :multiply-amount] :current 0.0 50.0 :entities entities)))) (continue [this screen entities] entities) (done? [this screen entities] diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 70ae742d..17310c66 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -657,6 +657,7 @@ void main () :step-sound-2 (utils/load-sound "ego/step-2.ogg") :step-sound-3 (utils/load-sound "ego/step-3.ogg") :step-sound-4 (utils/load-sound "ego/step-4.ogg") + :shoot-sound (utils/load-sound "ego/slingshot.ogg") :inside-step-sound-1 (utils/load-sound "ego/inside-step-1.ogg") :inside-step-sound-2 (utils/load-sound "ego/inside-step-2.ogg") @@ -693,7 +694,9 @@ void main () (get-in ego [:right :grow] ) {1 [:grow-sound 0.75]} (get-in ego [:left :crowbar] ) {3 [:crowbar-sound 0.5]} (get-in ego [:right :crowbar] ) {3 [:crowbar-sound 0.5]} - + (get-in ego [:right :shoot] ) {14 [:shoot-sound 0.75]} + (get-in ego [:left :shoot] ) {14 [:shoot-sound 0.75]} + (get-in ego [:left :stand]) {11 [:blink 0.15] 44 [:blink 0.15] 77 [:blink 0.15] @@ -935,7 +938,7 @@ void main () (defn get-rendered [entities e] (merge e - (when (= :night (get-in entities [:state :time])) + (when (#{:night :sunrise} (get-in entities [:state :time])) (get-in entities [:time-profiles (:night-profile e :default)])))) diff --git a/desktop/src/advent/core/desktop_launcher.clj b/desktop/src/advent/core/desktop_launcher.clj index 02ef2609..ad9b705f 100644 --- a/desktop/src/advent/core/desktop_launcher.clj +++ b/desktop/src/advent/core/desktop_launcher.clj @@ -1,7 +1,7 @@ (ns advent.core.desktop-launcher (:require [advent.core :refer :all] [advent.utils :as utils] - #_[clojure.tools.nrepl.server]) + [clojure.tools.nrepl.server]) (:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration] [org.lwjgl.input Keyboard] [com.badlogic.gdx Gdx]) @@ -11,7 +11,7 @@ (defn -main [& [port]] - #_(try + (try (when port (let [{port :port} (clojure.tools.nrepl.server/start-server :port (Integer/parseInt port))] (doseq [port-file ["target/repl-port" ".nrepl-port"]]