diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/TUTORIAL.md b/TUTORIAL.md old mode 100644 new mode 100755 diff --git a/UNLICENSE b/UNLICENSE old mode 100644 new mode 100755 diff --git a/project.clj b/project.clj old mode 100644 new mode 100755 diff --git a/src-java/play_clj/g3d_physics/ContactListener3D.java b/src-java/play_clj/g3d_physics/ContactListener3D.java old mode 100644 new mode 100755 diff --git a/src/play_clj/core.clj b/src/play_clj/core.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/core_basics.clj b/src/play_clj/core_basics.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/core_cameras.clj b/src/play_clj/core_cameras.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/core_graphics.clj b/src/play_clj/core_graphics.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/core_listeners.clj b/src/play_clj/core_listeners.clj old mode 100644 new mode 100755 index b9cdec4..54c638b --- a/src/play_clj/core_listeners.clj +++ b/src/play_clj/core_listeners.clj @@ -194,7 +194,7 @@ in the `screen`." (let [actor-set (->> entities vals (map :object) - (filter #(isa? (type %) Actor)) + (filter #(instance? Actor %)) set)] (doseq [^Actor a (clojure.set/difference (set (.getActors renderer)) actor-set )] (.remove a)) @@ -213,11 +213,11 @@ in the `screen`." (defn ^:private update-screen! ([{:keys [renderer world] :as screen}] - (when (isa? (type renderer) Stage) + (when (instance? Stage renderer) (update-stage! screen)) (update-physics! screen)) ([{:keys [renderer world] :as screen} entities] - (when (isa? (type renderer) Stage) + (when (instance? Stage renderer) (update-stage! screen entities)) (update-physics! screen entities) entities)) diff --git a/src/play_clj/core_utils.clj b/src/play_clj/core_utils.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/entities.clj b/src/play_clj/entities.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/g2d.clj b/src/play_clj/g2d.clj old mode 100644 new mode 100755 index 9372b26..c127b5f --- a/src/play_clj/g2d.clj +++ b/src/play_clj/g2d.clj @@ -40,11 +40,11 @@ (-> (or (u/load-asset arg Texture) (Texture. ^String arg)) TextureRegion.) - (isa? (type arg) Pixmap) + (instance? Pixmap arg) (-> ^Pixmap arg Texture. TextureRegion.) - (isa? (type arg) Texture) + (instance? Texture arg) (-> ^Texture arg TextureRegion.) - (isa? (type arg) TextureEntity) + (instance? TextureEntity ) (-> ^TextureRegion (:object arg) TextureRegion.) :else arg))) @@ -208,7 +208,8 @@ (animation! object :set-play-mode (play-mode :loop))" [object k & options] - `(u/call! ^Animation ~object ~k ~@options)) + (let [object (vary-meta object assoc :tag `Animation)] + `(u/call! ~object ~k ~@options))) (defn animation->texture "Returns a `texture` entity with a frame from `animation` based on the total diff --git a/src/play_clj/g2d_physics.clj b/src/play_clj/g2d_physics.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/g3d.clj b/src/play_clj/g3d.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/g3d_physics.clj b/src/play_clj/g3d_physics.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/math.clj b/src/play_clj/math.clj old mode 100644 new mode 100755 index d1c15bf..78445bc --- a/src/play_clj/math.clj +++ b/src/play_clj/math.clj @@ -110,7 +110,8 @@ (defmacro catmull-rom-spline! "Calls a single method on a `catmull-rom-spline`." [object k & options] - `(u/call! ^CatmullRomSpline ~object ~k ~@options)) + (let [object (vary-meta object assoc :tag `CatmullRomSpline)] + `(u/call! ^CatmullRomSpline ~object ~k ~@options))) ; circle diff --git a/src/play_clj/physics.clj b/src/play_clj/physics.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/repl.clj b/src/play_clj/repl.clj old mode 100644 new mode 100755 diff --git a/src/play_clj/ui.clj b/src/play_clj/ui.clj old mode 100644 new mode 100755 index e0ed460..e0a438b --- a/src/play_clj/ui.clj +++ b/src/play_clj/ui.clj @@ -58,7 +58,7 @@ based on the file at `path`. (align :center)" [k] - (u/gdx-field :scenes :scene2d :utils :Align (u/key->camel k))) + (u/gdx-field :utils :Align (u/key->camel k))) (defn cell! "Calls methods on a [Cell](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Cell.html)." diff --git a/src/play_clj/utils.clj b/src/play_clj/utils.clj old mode 100644 new mode 100755