diff options
| author | arngo <[email protected]> | 2021-12-19 03:34:13 -0500 |
|---|---|---|
| committer | arngo <[email protected]> | 2021-12-19 03:34:13 -0500 |
| commit | 271134c11b369a65097cbd2cd674563bf6c9b19f (patch) | |
| tree | b768a9e3b4e1483dd4ad2c7bcce045c37bc76527 /app/systems/start_game.rb | |
| parent | bd645871ff96a45c23c05f6fc7a82ac1e2749616 (diff) | |
| download | SteelWings-271134c11b369a65097cbd2cd674563bf6c9b19f.tar.gz SteelWings-271134c11b369a65097cbd2cd674563bf6c9b19f.zip | |
implement follow component + system
Diffstat (limited to 'app/systems/start_game.rb')
| -rw-r--r-- | app/systems/start_game.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/systems/start_game.rb b/app/systems/start_game.rb index cb29092..b71086e 100644 --- a/app/systems/start_game.rb +++ b/app/systems/start_game.rb @@ -32,6 +32,16 @@ FF::Sys.new('StartGame', priority: 50 ) do ) end + sprite = FF::Cmp::Sprite.new + sprite.props[:path] = 'sprites/kenny/Ships/ship_0011.png' + FF::Ent.new( + FF::Cmp::Boid.new(x: position_range.sample, y: position_range.sample, vx: 25, vy: 25, w: sprite.props[:w], h: sprite.props[:h]), + sprite, + debug_arrow, + FF::Cmp::SingletonCamera[0], + FF::Cmp::Follow.new(target: :mouse, strength: 500) + ) + FF::Stg.add( FF::Scn::BoidRules, FF::Scn::Debug, |
