Class: RubySketch::ChaseConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- RubySketch::ChaseConstraint
- Defined in:
- lib/rubysketch/constraint.rb
Overview
Moves a point toward the target every frame.
Instance Method Summary collapse
-
#target ⇒ Pin
Returns the target to chase.
-
#target=(target) ⇒ Sprite, ...
Sets the target to chase.
Methods inherited from Constraint
#active?, #collide=, #collide?, #damping, #damping=, #force, #force=, #remove, #removed?, #spring, #spring=, #sprites
Instance Method Details
#target ⇒ Pin
Returns the target to chase.
413 414 415 |
# File 'lib/rubysketch/constraint.rb', line 413 def target() Pin.new nil, pin__: @constraint__.target end |
#target=(target) ⇒ Sprite, ...
Sets the target to chase.
405 406 407 |
# File 'lib/rubysketch/constraint.rb', line 405 def target=(target) @constraint__.target = RubySketch.unwrap__ target end |