Add type hints and rename function
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
(u/gdx-static-field :graphics :g2d :Animation
|
(u/gdx-static-field :graphics :g2d :Animation
|
||||||
~(or (first args) :normal))))
|
~(or (first args) :normal))))
|
||||||
|
|
||||||
(defn animation-texture
|
(defn animation->texture
|
||||||
([{:keys [total-time]} ^Animation animation]
|
([{:keys [total-time]} ^Animation animation]
|
||||||
(u/create-entity (.getKeyFrame animation total-time true)))
|
(u/create-entity (.getKeyFrame animation total-time true)))
|
||||||
([{:keys [total-time]} ^Animation animation is-looping?]
|
([{:keys [total-time]} ^Animation animation is-looping?]
|
||||||
|
|||||||
@@ -134,4 +134,5 @@
|
|||||||
|
|
||||||
(defn ^:private add-input!
|
(defn ^:private add-input!
|
||||||
[^InputProcessor p]
|
[^InputProcessor p]
|
||||||
(.addProcessor ^InputMultiplexer (input! :get-input-processor) p))
|
(let [^InputMultiplexer multi (input! :get-input-processor)]
|
||||||
|
(.addProcessor multi p)))
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
(map? arg)
|
(map? arg)
|
||||||
(Image. ^TextureRegion (:object arg))
|
(Image. ^TextureRegion (:object arg))
|
||||||
(string? arg)
|
(string? arg)
|
||||||
(Image. (Texture. arg))
|
(Image. (Texture. ^String arg))
|
||||||
:else
|
:else
|
||||||
(Image. arg)))
|
(Image. arg)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user