diff options
| author | realtradam <[email protected]> | 2021-12-19 19:06:50 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-12-19 19:06:50 -0500 |
| commit | 844d8c194b48055ba60be4d185ad9ab688cce92a (patch) | |
| tree | 8058c12295b9a6e03a678be2b50b9b328291c0e0 /app/factories/ships/osprey.rb | |
| parent | bd645871ff96a45c23c05f6fc7a82ac1e2749616 (diff) | |
| download | SteelWings-844d8c194b48055ba60be4d185ad9ab688cce92a.tar.gz SteelWings-844d8c194b48055ba60be4d185ad9ab688cce92a.zip | |
Bullets, Health, Collision systems implemented. Renamed plane sprites.
Diffstat (limited to 'app/factories/ships/osprey.rb')
| -rw-r--r-- | app/factories/ships/osprey.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/factories/ships/osprey.rb b/app/factories/ships/osprey.rb new file mode 100644 index 0000000..1f57cb1 --- /dev/null +++ b/app/factories/ships/osprey.rb @@ -0,0 +1,22 @@ +class Factory + class Osprey + def self.new(x: x, y: y) + sprite = FF::Cmp::Sprite.new + sprite.props[:path] = 'sprites/kenny/Ships/Osprey.png' + FF::Ent.new( + FF::Cmp::Boid.new(x: x, y: y, vx: 25, vy: 25, w: 32, h: 32), + sprite, + FF::Cmp::BoidBounds.new(strength: 0.6), + FF::Cmp::BoidsAlignment.new(strength: 1), + FF::Cmp::BoidsSeparation.new(distance: 150, strength: 0.001), + FF::Cmp::BoidsCohesion.new(strength: 10000), + FF::Cmp::Hp.new(health: 100), + FF::Cmp::CollisionDamage.new(damage: 100), + FF::Cmp::Hitcircle.new(r: 12), + FF::Cmp::DebugVectorArrow[0], + FF::Cmp::SingletonCamera[0], + ) + end + end +end + |
