intro sequence shaping up.

This commit is contained in:
2015-03-11 21:34:50 -07:00
parent 6eae1dddc3
commit 2f11012831
4 changed files with 151 additions and 21 deletions

View File

@@ -125,7 +125,7 @@
(assoc entity :x (vector-2! v :x) :y (vector-2! v :y)))))))
(defn update-path-location [speed screen entities entity]
(let [pos-f (- (* (:total-time screen) speed) (int (* (:total-time screen) speed)))
(let [pos-f (- (* (- (:total-time screen) (:path-start-time entity 0.0)) speed) (int (* (- (:total-time screen) (:path-start-time entity 0.0)) speed)))
v (vector-2 0 0)
a (catmull-rom-spline! (:path entity) :value-at v pos-f)]
(assoc entity :x (vector-2! v :x) :y (vector-2! v :y))))