lots of tweaks.
This commit is contained in:
@@ -657,10 +657,10 @@ void main()
|
||||
:x (first start-pos) :y (last start-pos)
|
||||
:id "ego"}
|
||||
|
||||
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [choose-step-sound 0.6]
|
||||
6 [choose-step-sound 0.6]}
|
||||
(get-in ego [:right :walk]) {2 [choose-step-sound 0.6]
|
||||
6 [choose-step-sound 0.6]}
|
||||
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [choose-step-sound 0.3]
|
||||
6 [choose-step-sound 0.3]}
|
||||
(get-in ego [:right :walk]) {2 [choose-step-sound 0.3]
|
||||
6 [choose-step-sound 0.3]}
|
||||
|
||||
(get-in ego [:left :talk] ) {2 [:blink 0.15]}
|
||||
(get-in ego [:right :talk] ) {2 [:blink 0.15]}
|
||||
@@ -841,7 +841,7 @@ void main()
|
||||
[{:keys [id sound volume-fn]} & rest] (get-in entities [:current-sounds :value])]
|
||||
(if id
|
||||
(do
|
||||
(sound! sound :set-volume id (volume-fn entities))
|
||||
(sound! sound :set-volume id (utils/scale-vol-from-fade entities (volume-fn entities)))
|
||||
(recur entities rest))
|
||||
entities)))
|
||||
|
||||
@@ -926,6 +926,30 @@ void main()
|
||||
(defn mouse-moved [{:keys [input-x input-y viewport] :as screen} [entities]]
|
||||
(utils/update-override screen (assoc-in entities [:cursor :last-pos] [input-x input-y])))
|
||||
|
||||
(defn add-georgia-to-all-rooms [screen rooms]
|
||||
(let [georgia-talk (utils/make-anim "ego/georgia.png" [30 30] 0.2 [0 1 0 1 0 0 1 0 1 2])
|
||||
georgia-stand (utils/make-anim "ego/georgia.png" [30 30] 0.3 [0 0 0 0 0 0 0 2 0 0 0 0 2])
|
||||
|
||||
georgia-face (rooms/make-entity :georgia-face
|
||||
(assoc (animation->texture screen georgia-stand)
|
||||
:talk georgia-talk
|
||||
:anim georgia-stand
|
||||
:stand georgia-stand
|
||||
:talk-color (Color/valueOf "ffabe0ff")
|
||||
:anim-start 0
|
||||
:x 100 :y 100 :baseline 242 :origin-x 15 :origin-y 15
|
||||
:opacity 0.0))
|
||||
georgia-cloud (assoc (particle-effect "particles/cloud-georgia") :x 100 :y 100 :baseline 241 :opacity 0.0)]
|
||||
(reduce (fn [rooms room-key]
|
||||
(update-in rooms [room-key :entities]
|
||||
assoc
|
||||
:georgia-face georgia-face
|
||||
:georgia-cloud georgia-cloud))
|
||||
rooms
|
||||
(keys rooms))))
|
||||
|
||||
|
||||
|
||||
(defscreen scene
|
||||
:on-timer
|
||||
(fn [screen [entities]]
|
||||
@@ -958,11 +982,13 @@ void main()
|
||||
:castle-gate (rooms.castle-gate/make screen)
|
||||
:outside-jail (rooms.outside-jail/make screen)
|
||||
:outside-castle (rooms.outside-castle/make screen)}
|
||||
rooms (add-georgia-to-all-rooms screen rooms)
|
||||
entities {:rooms rooms
|
||||
:step-particles (assoc (particle-effect "particles/step") :x 100 :y 100 :baseline 241)
|
||||
:cam {:zoom 0.95
|
||||
:paused? false
|
||||
:object nil}
|
||||
|
||||
:current-sounds {:object nil
|
||||
:value []}
|
||||
:musics {:object nil
|
||||
@@ -1061,6 +1087,7 @@ void main()
|
||||
entities (update-from-room screen entities)
|
||||
entities (update-from-hotspots screen entities)
|
||||
entities (assoc-in entities [:room :entities :ego :last-frame] (get-in entities [:room :entities :ego :object]))
|
||||
|
||||
entities (update-in entities [:room :entities] (fn [entities]
|
||||
(into entities
|
||||
(for [[id entity] entities]
|
||||
|
||||
Reference in New Issue
Block a user