diff options
| author | _Tradam <[email protected]> | 2021-12-19 23:15:39 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-19 23:15:39 -0500 |
| commit | 51fa40d59c7face1a7bf21ebc83e8df0f18ac09b (patch) | |
| tree | ffd358def9a9786b6ab6580dae8e56b1b834d511 | |
| parent | b9ae6e7fc8c770db21f88a92c674d6618ba502e1 (diff) | |
| download | SteelWings-51fa40d59c7face1a7bf21ebc83e8df0f18ac09b.tar.gz SteelWings-51fa40d59c7face1a7bf21ebc83e8df0f18ac09b.zip | |
cleanup and polish of sprites (#7)
| -rw-r--r-- | app/components/rules/bounds.rb | 2 | ||||
| -rw-r--r-- | app/factories/ships/osprey.rb | 14 | ||||
| -rw-r--r-- | app/systems/start_game.rb | 9 |
3 files changed, 20 insertions, 5 deletions
diff --git a/app/components/rules/bounds.rb b/app/components/rules/bounds.rb index 7b0c86e..0cec3bd 100644 --- a/app/components/rules/bounds.rb +++ b/app/components/rules/bounds.rb @@ -2,4 +2,4 @@ FF::Cmp.new('BoidBounds', xmax: 1280, xmin: -1280, ymax: 1280, ymin: -1280, - strength: 10) + strength: 1) diff --git a/app/factories/ships/osprey.rb b/app/factories/ships/osprey.rb index ff8cd19..1e76b17 100644 --- a/app/factories/ships/osprey.rb +++ b/app/factories/ships/osprey.rb @@ -2,9 +2,18 @@ class Factory class Osprey def self.new(x: x, y: y) sprite = FF::Cmp::Sprite.new - sprite.props[:path] = 'sprites/kenny/Ships/Osprey.png' + sprite.props[:path] = [ + 'sprites/kenny/Ships/WeebillGrey.png', + 'sprites/kenny/Ships/BuntingGrey.png', + 'sprites/kenny/Ships/NighthawkGrey.png', + 'sprites/kenny/Ships/MagpieGrey.png', + 'sprites/kenny/Ships/WaxwingGrey.png', + 'sprites/kenny/Ships/LongspurGrey.png', + 'sprites/kenny/Ships/WarblerGrey.png', + 'sprites/kenny/Ships/NutcrackerGrey.png', + ].sample FF::Ent.new( - FF::Cmp::Boid.new(x: x, y: y, vx: 0, vy: 0, w: 32, h: 32), + FF::Cmp::Boid.new(x: x, y: y, vx: -3, vy: -3, w: 32, h: 32), sprite, FF::Cmp::BoidBounds.new(strength: 0.6), FF::Cmp::BoidsAlignment.new(strength: 1), @@ -13,6 +22,7 @@ class Factory FF::Cmp::Hp.new(health: 100), FF::Cmp::CollisionDamage.new(damage: 100), FF::Cmp::Hitcircle.new(r: 12), + FF::Cmp::BoidMinimumSpeed.new(speed: 3), FF::Cmp::Team.new, FF::Cmp::SingletonDebugVectorArrow[0], FF::Cmp::SingletonCamera[0], diff --git a/app/systems/start_game.rb b/app/systems/start_game.rb index e329d1d..96332a2 100644 --- a/app/systems/start_game.rb +++ b/app/systems/start_game.rb @@ -33,9 +33,14 @@ FF::Sys.new('StartGame', priority: 50 ) do end sprite = FF::Cmp::Sprite.new - sprite.props[:path] = 'sprites/kenny/Ships/ship_0011.png' + sprite.props[:path] = [ + 'sprites/kenny/Ships/Pintail.png', + 'sprites/kenny/Ships/Osprey.png', + 'sprites/kenny/Ships/Falcon.png', + 'sprites/kenny/Ships/Grosbeak.png', + ].sample 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]), + FF::Cmp::Boid.new(x: position_range.sample, y: position_range.sample, vx: 25, vy: 25, w: 32, h: 32), sprite, debug_arrow, FF::Cmp::SingletonCamera[0], |
