hacking.
This commit is contained in:
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
TUTORIAL.md
Normal file → Executable file
0
TUTORIAL.md
Normal file → Executable file
0
project.clj
Normal file → Executable file
0
project.clj
Normal file → Executable file
0
src-java/play_clj/g3d_physics/ContactListener3D.java
Normal file → Executable file
0
src-java/play_clj/g3d_physics/ContactListener3D.java
Normal file → Executable file
0
src/play_clj/core.clj
Normal file → Executable file
0
src/play_clj/core.clj
Normal file → Executable file
0
src/play_clj/core_basics.clj
Normal file → Executable file
0
src/play_clj/core_basics.clj
Normal file → Executable file
0
src/play_clj/core_cameras.clj
Normal file → Executable file
0
src/play_clj/core_cameras.clj
Normal file → Executable file
0
src/play_clj/core_graphics.clj
Normal file → Executable file
0
src/play_clj/core_graphics.clj
Normal file → Executable file
6
src/play_clj/core_listeners.clj
Normal file → Executable file
6
src/play_clj/core_listeners.clj
Normal file → Executable file
@@ -194,7 +194,7 @@ in the `screen`."
|
|||||||
(let [actor-set (->> entities
|
(let [actor-set (->> entities
|
||||||
vals
|
vals
|
||||||
(map :object)
|
(map :object)
|
||||||
(filter #(isa? (type %) Actor))
|
(filter #(instance? Actor %))
|
||||||
set)]
|
set)]
|
||||||
(doseq [^Actor a (clojure.set/difference (set (.getActors renderer)) actor-set )]
|
(doseq [^Actor a (clojure.set/difference (set (.getActors renderer)) actor-set )]
|
||||||
(.remove a))
|
(.remove a))
|
||||||
@@ -213,11 +213,11 @@ in the `screen`."
|
|||||||
|
|
||||||
(defn ^:private update-screen!
|
(defn ^:private update-screen!
|
||||||
([{:keys [renderer world] :as screen}]
|
([{:keys [renderer world] :as screen}]
|
||||||
(when (isa? (type renderer) Stage)
|
(when (instance? Stage renderer)
|
||||||
(update-stage! screen))
|
(update-stage! screen))
|
||||||
(update-physics! screen))
|
(update-physics! screen))
|
||||||
([{:keys [renderer world] :as screen} entities]
|
([{:keys [renderer world] :as screen} entities]
|
||||||
(when (isa? (type renderer) Stage)
|
(when (instance? Stage renderer)
|
||||||
(update-stage! screen entities))
|
(update-stage! screen entities))
|
||||||
(update-physics! screen entities)
|
(update-physics! screen entities)
|
||||||
entities))
|
entities))
|
||||||
|
|||||||
0
src/play_clj/core_utils.clj
Normal file → Executable file
0
src/play_clj/core_utils.clj
Normal file → Executable file
0
src/play_clj/entities.clj
Normal file → Executable file
0
src/play_clj/entities.clj
Normal file → Executable file
9
src/play_clj/g2d.clj
Normal file → Executable file
9
src/play_clj/g2d.clj
Normal file → Executable file
@@ -40,11 +40,11 @@
|
|||||||
(-> (or (u/load-asset arg Texture)
|
(-> (or (u/load-asset arg Texture)
|
||||||
(Texture. ^String arg))
|
(Texture. ^String arg))
|
||||||
TextureRegion.)
|
TextureRegion.)
|
||||||
(isa? (type arg) Pixmap)
|
(instance? Pixmap arg)
|
||||||
(-> ^Pixmap arg Texture. TextureRegion.)
|
(-> ^Pixmap arg Texture. TextureRegion.)
|
||||||
(isa? (type arg) Texture)
|
(instance? Texture arg)
|
||||||
(-> ^Texture arg TextureRegion.)
|
(-> ^Texture arg TextureRegion.)
|
||||||
(isa? (type arg) TextureEntity)
|
(instance? TextureEntity )
|
||||||
(-> ^TextureRegion (:object arg) TextureRegion.)
|
(-> ^TextureRegion (:object arg) TextureRegion.)
|
||||||
:else
|
:else
|
||||||
arg)))
|
arg)))
|
||||||
@@ -208,7 +208,8 @@
|
|||||||
|
|
||||||
(animation! object :set-play-mode (play-mode :loop))"
|
(animation! object :set-play-mode (play-mode :loop))"
|
||||||
[object k & options]
|
[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
|
(defn animation->texture
|
||||||
"Returns a `texture` entity with a frame from `animation` based on the total
|
"Returns a `texture` entity with a frame from `animation` based on the total
|
||||||
|
|||||||
0
src/play_clj/g2d_physics.clj
Normal file → Executable file
0
src/play_clj/g2d_physics.clj
Normal file → Executable file
0
src/play_clj/g3d.clj
Normal file → Executable file
0
src/play_clj/g3d.clj
Normal file → Executable file
0
src/play_clj/g3d_physics.clj
Normal file → Executable file
0
src/play_clj/g3d_physics.clj
Normal file → Executable file
3
src/play_clj/math.clj
Normal file → Executable file
3
src/play_clj/math.clj
Normal file → Executable file
@@ -110,7 +110,8 @@
|
|||||||
(defmacro catmull-rom-spline!
|
(defmacro catmull-rom-spline!
|
||||||
"Calls a single method on a `catmull-rom-spline`."
|
"Calls a single method on a `catmull-rom-spline`."
|
||||||
[object k & options]
|
[object k & options]
|
||||||
`(u/call! ^CatmullRomSpline ~object ~k ~@options))
|
(let [object (vary-meta object assoc :tag `CatmullRomSpline)]
|
||||||
|
`(u/call! ^CatmullRomSpline ~object ~k ~@options)))
|
||||||
|
|
||||||
; circle
|
; circle
|
||||||
|
|
||||||
|
|||||||
0
src/play_clj/physics.clj
Normal file → Executable file
0
src/play_clj/physics.clj
Normal file → Executable file
0
src/play_clj/repl.clj
Normal file → Executable file
0
src/play_clj/repl.clj
Normal file → Executable file
2
src/play_clj/ui.clj
Normal file → Executable file
2
src/play_clj/ui.clj
Normal file → Executable file
@@ -58,7 +58,7 @@ based on the file at `path`.
|
|||||||
|
|
||||||
(align :center)"
|
(align :center)"
|
||||||
[k]
|
[k]
|
||||||
(u/gdx-field :scenes :scene2d :utils :Align (u/key->camel k)))
|
(u/gdx-field :utils :Align (u/key->camel k)))
|
||||||
|
|
||||||
(defn cell!
|
(defn cell!
|
||||||
"Calls methods on a [Cell](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Cell.html)."
|
"Calls methods on a [Cell](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Cell.html)."
|
||||||
|
|||||||
0
src/play_clj/utils.clj
Normal file → Executable file
0
src/play_clj/utils.clj
Normal file → Executable file
Reference in New Issue
Block a user