diff options
| author | realtradam <[email protected]> | 2021-08-09 09:15:38 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-08-09 09:15:38 -0400 |
| commit | 501ec02e894865836f2960b0bbc16b3448e3707f (patch) | |
| tree | ad2c1124e5ab5807dea1b11002cc5bf2df1226d9 /lib/rules/target.rb | |
| parent | 4e909c6b44794b76ef3a98c032ea90204b673f85 (diff) | |
| download | ruboids-501ec02e894865836f2960b0bbc16b3448e3707f.tar.gz ruboids-501ec02e894865836f2960b0bbc16b3448e3707f.zip | |
ruboids!
Diffstat (limited to 'lib/rules/target.rb')
| -rw-r--r-- | lib/rules/target.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rules/target.rb b/lib/rules/target.rb new file mode 100644 index 0000000..ffee93a --- /dev/null +++ b/lib/rules/target.rb @@ -0,0 +1,6 @@ +FF::Sys.new('Target', priority: 50) do + FF::Cmp::Boids.each do |boid| + boid.cx += ($x_target - boid.x) / $target_strength + boid.cy += ($y_target - boid.y) / $target_strength + end +end |
