pbox2d 0.2.0-java → 0.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/box2d.jar +0 -0
- data/lib/pbox2d/box2d.rb +6 -0
- data/lib/pbox2d/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcf4d4f72a18e164769d8b310f0f421c49571b2f
|
4
|
+
data.tar.gz: 390e73409881fd369a7c5e772b4ee9cb4c5a755b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ae8ae1807f9e390e1ac79ba70d0835273e36f756ac5c7047130b1d122309013bb35ed0dbfef58601a7dcee0e170f6e913d721edb02b18a11d5fdaf907a4490
|
7
|
+
data.tar.gz: ff1c7997fa62935c1d616466ad0134483f8aa15227b4534c7afaf8efeff19e86a26d8e4720b103d33669a447e8f238941314755885179753ceb04fe8b15cae8f
|
data/README.md
CHANGED
@@ -58,6 +58,6 @@ The other thing you should know is there is a mismatch between the physics world
|
|
58
58
|
[Nature of Code book]:http://natureofcode.com/
|
59
59
|
[Sandi Metz]:http://www.poodr.com/
|
60
60
|
[this book]:http://www.crcpress.com/product/isbn/9781466565760
|
61
|
-
[zip]:https://github.com/ruby-processing/jbox2d/archive/0.
|
62
|
-
[tar]:https://github.com/ruby-processing/jbox2d/archive/0.
|
61
|
+
[zip]:https://github.com/ruby-processing/jbox2d/archive/0.3.0.zip
|
62
|
+
[tar]:https://github.com/ruby-processing/jbox2d/archive/0.3.0.tar.gz
|
63
63
|
[Wiki]:https://github.com/ruby-processing/jbox2d/wiki
|
data/lib/box2d.jar
CHANGED
Binary file
|
data/lib/pbox2d/box2d.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative 'version'
|
2
2
|
|
3
3
|
class Box2D < Java::ProcessingBox2d::Box2DProcessing
|
4
|
+
field_accessor :world # allow access to protected variable
|
4
5
|
|
5
6
|
def init_options(args = {})
|
6
7
|
scale = args[:scale] || 10.0
|
@@ -21,6 +22,11 @@ class Box2D < Java::ProcessingBox2d::Box2DProcessing
|
|
21
22
|
change_gravity(args.to_java(Java::float))
|
22
23
|
end
|
23
24
|
|
25
|
+
def add_listener(listener)
|
26
|
+
# in combination with field accessor we can access protected world
|
27
|
+
self.world.setContactListener(listener)
|
28
|
+
end
|
29
|
+
|
24
30
|
def version
|
25
31
|
format("pbox2d version %s", Pbox2D::VERSION)
|
26
32
|
end
|
data/lib/pbox2d/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pbox2d
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Martin Prout
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|