blob: 606a0be8ed6213b0f7ccc70815e18d5a304bf20b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
FF::Sys.new("Rejoin", priority: 40) do
FF::Cmp::BoidsSeparation.each do |sep|
#puts 'add align/cohesion'.upcase
sep.distance = 150
alignment_mgr = sep.entities[0].components[FF::Cmp::BoidsAlignment]
cohesion_mgr = sep.entities[0].components[FF::Cmp::BoidsCohesion]
if alignment_mgr.nil? || alignment_mgr.empty?
sep.entities[0].add FF::Cmp::BoidsAlignment.new(strength: 10)
end
if cohesion_mgr.nil? || cohesion_mgr.empty?
sep.entities[0].add FF::Cmp::BoidsCohesion.new(strength: 1000)
end
end
end
|