improving start page.

This commit is contained in:
2015-02-08 11:38:32 -08:00
parent 78479885b3
commit 0658616453
3 changed files with 58 additions and 21 deletions

View File

@@ -145,3 +145,8 @@
(f e (:total-time screen)))
entities
(vals tweens)))
(defn intersects? [e [x y]]
(and (:object e)
(< (:x e) x (+ (:x e) (or (:width e) (.getWidth (:object e)))))
(< (:y e) y (+ (:y e) (or (:height e) (.getHeight (:object e)))))))