blob: 3a4f25e8f26966846cb8e182b91f709e14d66928 (
plain)
1
2
3
4
5
6
7
8
9
|
FF::Scn::Render.add(
FF::Sys.new('UpdateBoidSprite', priority: 98) do
FF::Cmp::Boid.each do |boid|
sprite = boid.entities[0].components[FF::Cmp::Sprite][0]
sprite.props[:x] = boid.x - sprite.props[:w] / 2
sprite.props[:y] = boid.y - sprite.props[:h] / 2
end
end
)
|