drops the coin correctly.

This commit is contained in:
Bryce Covert
2015-07-30 09:05:41 -07:00
parent e7629b8c96
commit a19f7ebd41
6 changed files with 56 additions and 23 deletions

View File

@@ -149,10 +149,12 @@
)
(defn update-path-location [speed screen entities entity]
(let [pos-f (- (path-point speed screen entities entity) (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))))
(if (:path entity)
(let [pos-f (- (path-point speed screen entities entity) (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)))
entity))
(defn find-override [entities [x y]]
(first (concat (filter #(and ((:mouse-in? %) entities x y)