diff options
Diffstat (limited to 'app/factories')
| -rw-r--r-- | app/factories/bullet.rb | 5 | ||||
| -rw-r--r-- | app/factories/ships/osprey.rb | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/factories/bullet.rb b/app/factories/bullet.rb index 160613c..50a68c0 100644 --- a/app/factories/bullet.rb +++ b/app/factories/bullet.rb @@ -1,15 +1,16 @@ class Factory class Bullet - def self.new(damage: 10, x:, y:) + def self.new(x:, y:, damage: 10, vx: 10, vy: 0) puts 'new ent created' sprite = FF::Cmp::Sprite.new sprite.props[:path] = 'sprites/kenny/Tiles/tile_0000.png' FF::Ent.new( sprite, - FF::Cmp::Boid.new(x: x, y: y, vx: 10, w: 16, h: 16), + FF::Cmp::Boid.new(x: x, y: y, vx: vx, vy: vy, w: 16, h: 16), FF::Cmp::SingletonCamera[0], FF::Cmp::Hitcircle.new(r: 10), FF::Cmp::Hp.new(health: 1), + FF::Cmp::Team.new, FF::Cmp::CollisionDamage.new(damage: damage), ) end diff --git a/app/factories/ships/osprey.rb b/app/factories/ships/osprey.rb index 4dd5874..ff8cd19 100644 --- a/app/factories/ships/osprey.rb +++ b/app/factories/ships/osprey.rb @@ -4,7 +4,7 @@ class Factory 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), + FF::Cmp::Boid.new(x: x, y: y, vx: 0, vy: 0, w: 32, h: 32), sprite, FF::Cmp::BoidBounds.new(strength: 0.6), FF::Cmp::BoidsAlignment.new(strength: 1), @@ -13,6 +13,7 @@ class Factory FF::Cmp::Hp.new(health: 100), FF::Cmp::CollisionDamage.new(damage: 100), FF::Cmp::Hitcircle.new(r: 12), + FF::Cmp::Team.new, FF::Cmp::SingletonDebugVectorArrow[0], FF::Cmp::SingletonCamera[0], ) |
