Sha256: 1ce57dca62b5a3cc4e3ebe296d897b79185490a375450528aef51e8cb6138da0
Contents?: true
Size: 578 Bytes
Versions: 1
Compression:
Stored size: 578 Bytes
Contents
# dummy_spring.rb by Martin Prout # An example of duck-typing in ruby-processing # This class avoids the tests for null of the vanilla processing version class DummySpring def initialize; end def update(_x, _y); end def display; end # This is the key function where # we attach the spring to an x,y location # and the box object's location # @param x (will be mouse_x) # @param y (will be mouse_y) # @param box Box # @return new bound Spring def bind(x, y, box) spring = Spring.new spring.bind(x, y, box) spring end def destroy; end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pbox2d-0.5.0-java | examples/mouse_joint/dummy_spring.rb |