summaryrefslogtreecommitdiffhomepage
path: root/app/systems/start_game.rb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-12-26 21:42:56 -0500
committerrealtradam <[email protected]>2021-12-26 21:42:56 -0500
commit5f8a4b6b17d6ada0097412b13605717dd5a310df (patch)
treecd3646042537e6c9e69ff2c31c99b816607acce7 /app/systems/start_game.rb
parent70b2499a8753331b68fb7a61a8882c9ff0b017d8 (diff)
downloadSteelWings-5f8a4b6b17d6ada0097412b13605717dd5a310df.tar.gz
SteelWings-5f8a4b6b17d6ada0097412b13605717dd5a310df.zip
added rate of fire, tweaked ai
Diffstat (limited to 'app/systems/start_game.rb')
-rw-r--r--app/systems/start_game.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/systems/start_game.rb b/app/systems/start_game.rb
index 4d6289e..9efbf14 100644
--- a/app/systems/start_game.rb
+++ b/app/systems/start_game.rb
@@ -18,7 +18,7 @@ FF::Sys.new('StartGame', priority: 50 ) do
{x: 700, y: 200},
{x: 150, y: 250},
]
- position_range = (500..1000).to_a
+ position_range = (400..(1280*2)).to_a
sprite = FF::Cmp::Sprite.new
sprite.props[:path] = 'sprites/background.png'
@@ -27,8 +27,9 @@ FF::Sys.new('StartGame', priority: 50 ) do
FF::Cmp::SingletonCamera[0],
FF::Cmp::Boid.new(h: 1920 * 2, w: 1920 * 2)
)
- 8.times do |pos|
- Factory::SampleEnemy.new(x: position_range.sample, y: position_range.sample)
+ posneg = [1,-1]
+ 20.times do |pos|
+ Factory::SampleEnemy.new(x: position_range.sample * posneg.sample, y: position_range.sample * posneg.sample)
end
sprite = FF::Cmp::Sprite.new
@@ -44,16 +45,16 @@ FF::Sys.new('StartGame', priority: 50 ) do
debug_arrow,
FF::Cmp::SingletonCamera[0],
FF::Cmp::SingletonMoveCamera[0],
- FF::Cmp::BoidBounds.new,
+ FF::Cmp::BoidBounds.new(strength: 3),
FF::Cmp::Follow.new(target: :mouse, strength: 0.007),
FF::Cmp::SingletonPlayer[0],
FF::Cmp::Team.new(team: 'player'),
FF::Cmp::Weapon.new,
FF::Cmp::BoidMinimumSpeed.new(speed: 5),
FF::Cmp::DecaySpeed.new(strength: 0.8),
- FF::Cmp::Hp.new(health: 100),
+ FF::Cmp::Hp.new(health: 300),
FF::Cmp::CollisionDamage.new(damage: 100),
- FF::Cmp::Hitcircle.new(r: 32),
+ FF::Cmp::Hitcircle.new(r: 16),
)