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
|
||||
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))
|
||||
|
||||
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)
|
||||
(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
|
||||
|
||||
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!
|
||||
"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
|
||||
|
||||
|
||||
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)"
|
||||
[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)."
|
||||
|
||||
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