This is a slight refactoring of the code. I introduce a private ColliderFactory trait for Body that can be used to build the body. It basically turns what was a helper function into a method, and isolates the bit which determines what kind of rapier collider builder to return for a Heron entity.
This is a slight refactoring of the code. I introduce a private
ColliderFactory
trait for Body that can be used to build the body. It basically turns what was a helper function into a method, and isolates the bit which determines what kind of rapier collider builder to return for a Heron entity.