particled step.
This commit is contained in:
@@ -224,6 +224,8 @@
|
||||
entities)
|
||||
|
||||
(continue [this screen entities]
|
||||
(when (= (rand-int 50) 2)
|
||||
(particle-effect! (:step-particles entities) :start))
|
||||
(let [{from-x :x from-y :y :keys [left right scale-x] :as target-entity} (get-in entities [:room :entities target-id])
|
||||
[[target-x target-y] remainder] @targets-left]
|
||||
(let [delta-x (- target-x from-x)
|
||||
@@ -240,7 +242,9 @@
|
||||
(do (swap! targets-left rest)
|
||||
(-> entities
|
||||
(assoc-in [:room :entities target-id :x] target-x)
|
||||
(assoc-in [:room :entities target-id :y] target-y)))
|
||||
(assoc-in [:room :entities target-id :y] target-y)
|
||||
(assoc-in [:step-particles :x] target-x)
|
||||
(assoc-in [:step-particles :y] target-y)))
|
||||
(update-in entities [:room :entities target-id]
|
||||
#(start-animation screen
|
||||
(assoc (jump-to screen entities % [(+ moved-x from-x) (+ moved-y from-y)] true)
|
||||
|
||||
@@ -427,6 +427,7 @@
|
||||
:scale-y 20
|
||||
:baseline 9500
|
||||
:opacity 0.0)
|
||||
:step-particles (assoc (particle-effect "ego/step") :x 100 :y 100 :baseline 241)
|
||||
:actions {:object nil
|
||||
:channel (chan)
|
||||
:current nil
|
||||
@@ -451,6 +452,7 @@
|
||||
:inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000
|
||||
:mouse-in? (zone/box 278 0 320 42))
|
||||
:fps (assoc (label "0" (color :white) ) :x 5 :baseline 0)}]
|
||||
(particle-effect! (:step-particles entities) :start)
|
||||
(music! (utils/get-current-music entities) :set-volume 0.0 #_(get-in entities [:volume :value]))
|
||||
|
||||
(utils/play-sound (get-in entities [:musics (actions/get-music (get-in entities [:room :music]) (get-in entities [:state :time]))]))
|
||||
@@ -490,7 +492,7 @@
|
||||
(play-key-sounds (get-in entities [:room :entities]))
|
||||
(doseq [m (vals (get-in entities [:musics]))]
|
||||
(when m
|
||||
(music! m :set-volume 0.0 #_(get-in entities [:volume :value]) )))
|
||||
(music! m :set-volume (get-in entities [:volume :value]) )))
|
||||
|
||||
|
||||
(label! (:fps entities) :set-text (str (game :fps)))
|
||||
|
||||
Reference in New Issue
Block a user