Allow sizing functions to work anywhere
This commit is contained in:
@@ -103,12 +103,12 @@
|
|||||||
(.setToOrtho camera false width height))
|
(.setToOrtho camera false width height))
|
||||||
|
|
||||||
(defn height!
|
(defn height!
|
||||||
[{:keys [width height] :as screen} new-height]
|
[screen new-height]
|
||||||
(size! screen (* new-height (/ width height)) new-height))
|
(size! screen (* new-height (/ (game :width) (game :height))) new-height))
|
||||||
|
|
||||||
(defn width!
|
(defn width!
|
||||||
[{:keys [width height] :as screen} new-width]
|
[screen new-width]
|
||||||
(size! screen new-width (* new-width (/ height width))))
|
(size! screen new-width (* new-width (/ (game :height) (game :width)))))
|
||||||
|
|
||||||
(defn move!
|
(defn move!
|
||||||
[{:keys [^Camera camera]} x y]
|
[{:keys [^Camera camera]} x y]
|
||||||
|
|||||||
Reference in New Issue
Block a user