particled step.

This commit is contained in:
2015-02-18 17:39:36 -08:00
parent 4789df90f9
commit 914c18dfc6
3 changed files with 42 additions and 32 deletions

View File

@@ -6,22 +6,24 @@ lowMin: 100.0
lowMax: 100.0 lowMax: 100.0
- Count - - Count -
min: 0 min: 0
max: 200 max: 100
- Emission - - Emission -
lowMin: 5.0 lowMin: 2.0
lowMax: 5.0 lowMax: 2.0
highMin: 60.0 highMin: 1.0
highMax: 60.0 highMax: 1.0
relative: false relative: false
scalingCount: 1 scalingCount: 2
scaling0: 1.0 scaling0: 1.0
timelineCount: 1 scaling1: 1.0
timelineCount: 2
timeline0: 0.0 timeline0: 0.0
timeline1: 1.0
- Life - - Life -
lowMin: 2000.0 lowMin: 500.0
lowMax: 2000.0 lowMax: 500.0
highMin: 500.0 highMin: 1000.0
highMax: 1000.0 highMax: 5500.0
relative: false relative: false
scalingCount: 3 scalingCount: 3
scaling0: 1.0 scaling0: 1.0
@@ -71,15 +73,17 @@ timelineCount: 1
timeline0: 0.0 timeline0: 0.0
- Velocity - - Velocity -
active: true active: true
lowMin: 0.0 lowMin: 10.0
lowMax: 0.0 lowMax: 10.0
highMin: 5.0 highMin: 20.0
highMax: 5.0 highMax: 25.0
relative: false relative: false
scalingCount: 1 scalingCount: 2
scaling0: 1.0 scaling0: 1.0
timelineCount: 1 scaling1: 0.0
timelineCount: 2
timeline0: 0.0 timeline0: 0.0
timeline1: 0.94520545
- Angle - - Angle -
active: true active: true
lowMin: 90.0 lowMin: 90.0
@@ -101,24 +105,24 @@ active: false
active: false active: false
- Gravity - - Gravity -
active: true active: true
lowMin: 2.0 lowMin: 10.0
lowMax: 2.0 lowMax: 10.0
highMin: -10.0 highMin: -30.0
highMax: -10.0 highMax: -30.0
relative: false relative: false
scalingCount: 3 scalingCount: 3
scaling0: 0.0 scaling0: 0.0
scaling1: 0.7755102 scaling1: 0.79591835
scaling2: 1.0 scaling2: 1.0
timelineCount: 3 timelineCount: 3
timeline0: 0.0 timeline0: 0.0
timeline1: 0.6369863 timeline1: 0.24657534
timeline2: 0.9589041 timeline2: 0.9589041
- Tint - - Tint -
colorsCount: 3 colorsCount: 3
colors0: 1.0 colors0: 0.8
colors1: 1.0 colors1: 0.6392157
colors2: 1.0 colors2: 0.37254903
timelineCount: 1 timelineCount: 1
timeline0: 0.0 timeline0: 0.0
- Transparency - - Transparency -
@@ -129,13 +133,13 @@ highMax: 1.0
relative: false relative: false
scalingCount: 4 scalingCount: 4
scaling0: 0.0 scaling0: 0.0
scaling1: 1.0 scaling1: 0.3508772
scaling2: 0.75 scaling2: 0.0
scaling3: 0.0 scaling3: 0.0
timelineCount: 4 timelineCount: 4
timeline0: 0.0 timeline0: 0.0
timeline1: 0.2 timeline1: 0.001
timeline2: 0.8 timeline2: 0.7671233
timeline3: 1.0 timeline3: 1.0
- Options - - Options -
attached: false attached: false

View File

@@ -224,6 +224,8 @@
entities) entities)
(continue [this screen 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]) (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] [[target-x target-y] remainder] @targets-left]
(let [delta-x (- target-x from-x) (let [delta-x (- target-x from-x)
@@ -240,7 +242,9 @@
(do (swap! targets-left rest) (do (swap! targets-left rest)
(-> entities (-> entities
(assoc-in [:room :entities target-id :x] target-x) (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] (update-in entities [:room :entities target-id]
#(start-animation screen #(start-animation screen
(assoc (jump-to screen entities % [(+ moved-x from-x) (+ moved-y from-y)] true) (assoc (jump-to screen entities % [(+ moved-x from-x) (+ moved-y from-y)] true)

View File

@@ -427,6 +427,7 @@
:scale-y 20 :scale-y 20
:baseline 9500 :baseline 9500
:opacity 0.0) :opacity 0.0)
:step-particles (assoc (particle-effect "ego/step") :x 100 :y 100 :baseline 241)
:actions {:object nil :actions {:object nil
:channel (chan) :channel (chan)
:current nil :current nil
@@ -451,6 +452,7 @@
:inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000 :inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000
:mouse-in? (zone/box 278 0 320 42)) :mouse-in? (zone/box 278 0 320 42))
:fps (assoc (label "0" (color :white) ) :x 5 :baseline 0)}] :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])) (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]))])) (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])) (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 0.0 #_(get-in entities [:volume :value]) ))) (music! m :set-volume (get-in entities [:volume :value]) )))
(label! (:fps entities) :set-text (str (game :fps))) (label! (:fps entities) :set-text (str (game :fps)))