Sha256: a2be0df13bec051e1ceac402c08a72ca4db639baa9a168780d217be056064138

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

# The Nature of Code
# Daniel Shiffman
# http://natureofcode.com

# This class avoids test for nil
class DummySpring
  def initialize; end

  # If it exists we set its target to the mouse location
  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
  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.4.1-java examples/mouse_joint/dummy_spring.rb